spaCy/spacy
Paul O'Leary McCann b4e457d9fe
Accept multiple code files in all CLI commands (#12101)
* Add support for multiple code files to all relevant commands

Prior to this, only the package command supported multiple code files.

* Update docs

* Add debug data test, plus generic fixtures

One tricky thing here: it's tempting to create the config by creating a
pipeline in code, but that requires declaring the custom components
here. However the CliRunner appears to be run in the same process or
otherwise have access to our registry, so it works even without any
code arguments. So it's necessary to avoid declaring the components in
the tests.

* Add debug config test and restructure

The code argument imports the provided file. If it adds item to the
registry, that affects global state, which CliRunner doesn't isolate.
Since there's no standard way to remove things from the registry, this
instead uses subprocess.run to run commands.

* Use a more generic, parametrized test

* Add output arg for assemble and pretrain

Assemble and pretrain require an output argument. This commit adds
assemble testing, but not pretrain, as that requires an actual trainable
component, which is not currently in the test config.

* Add evaluate test and some cleanup

* Mark tests as slow

* Revert argument name change

* Apply suggestions from code review

Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>

* Format API CLI docs

* isort

* Fix imports in tests

* isort

* Undo changes to package CLI help

* Fix python executable and lang code in test

* Fix executable in another test

---------

Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>
Co-authored-by: Raphael Mitsch <r.mitsch@outlook.com>
2023-08-01 15:24:02 +02:00
..
cli Accept multiple code files in all CLI commands (#12101) 2023-08-01 15:24:02 +02:00
displacy 🐛 Escape annotated HTML tags in span renderer (#12817) 2023-07-13 17:33:05 +02:00
kb Merge branch 'upstream_master' into sync_v4 2023-07-19 16:37:31 +02:00
lang isort all the things 2023-06-26 11:41:03 +02:00
matcher cython fixes and cleanup 2023-07-19 17:41:29 +02:00
ml remove unnecessary line 2023-07-20 14:08:29 +02:00
pipeline Recommend lookups tables from URLs or other loaders (#12283) 2023-07-31 15:54:35 +02:00
tests Accept multiple code files in all CLI commands (#12101) 2023-08-01 15:24:02 +02:00
tokens cython fixes and cleanup 2023-07-19 17:41:29 +02:00
training Merge branch 'upstream_master' into sync_v4 2023-07-19 16:37:31 +02:00
__init__.pxd * Seems to be working after refactor. Need to wire up more POS tag features, and wire up save/load of POS tags. 2014-10-24 02:23:42 +11:00
__init__.py isort all the things 2023-06-26 11:41:03 +02:00
__main__.py Tidy up 2020-06-22 00:45:40 +02:00
about.py Recommend lookups tables from URLs or other loaders (#12283) 2023-07-31 15:54:35 +02:00
attrs.pxd merge fixes (2) 2023-07-19 16:38:37 +02:00
attrs.pyx ci: add cython linter (#12694) 2023-07-19 12:03:31 +02:00
compat.py isort all the things 2023-06-26 11:41:03 +02:00
default_config_distillation.cfg Add the configuration schema for distillation (#12201) 2023-01-31 13:06:02 +01:00
default_config_pretraining.cfg Add new parameter for saving every n epoch in pretraining (#8912) 2021-08-12 11:14:48 +02:00
default_config.cfg Add training.before_update callback (#11739) 2022-11-23 17:54:58 +01:00
errors.py Recommend lookups tables from URLs or other loaders (#12283) 2023-07-31 15:54:35 +02:00
glossary.py isort all the things 2023-06-26 11:41:03 +02:00
language.py Recommend lookups tables from URLs or other loaders (#12283) 2023-07-31 15:54:35 +02:00
lexeme.pxd isort all the things 2023-06-26 11:41:03 +02:00
lexeme.pyi isort all the things 2023-06-26 11:41:03 +02:00
lexeme.pyx Merge branch 'upstream_master' into sync_v4 2023-07-19 16:37:31 +02:00
lookups.py Recommend lookups tables from URLs or other loaders (#12283) 2023-07-31 15:54:35 +02:00
morphology.pxd ci: add cython linter (#12694) 2023-07-19 12:03:31 +02:00
morphology.pyx cython fixes and cleanup 2023-07-19 17:41:29 +02:00
parts_of_speech.pxd cython fixes and cleanup 2023-07-19 17:41:29 +02:00
parts_of_speech.pyx Drop Python 2.7 and 3.5 (#4828) 2019-12-22 01:53:56 +01:00
pipe_analysis.py isort all the things 2023-06-26 11:41:03 +02:00
py.typed Add py.typed 2021-03-16 09:48:31 +01:00
schemas.py isort all the things 2023-06-26 11:41:03 +02:00
scorer.py isort all the things 2023-06-26 11:41:03 +02:00
strings.pxd isort all the things 2023-06-26 11:41:03 +02:00
strings.pyi isort all the things 2023-06-26 11:41:03 +02:00
strings.pyx cython fixes and cleanup 2023-07-19 17:41:29 +02:00
structs.pxd Merge branch 'upstream_master' into sync_v4 2023-07-19 16:37:31 +02:00
symbols.pxd Merge branch 'upstream_master' into sync_v4 2023-07-19 16:37:31 +02:00
symbols.pyx Merge branch 'upstream_master' into sync_v4 2023-07-19 16:37:31 +02:00
tokenizer.pxd Merge branch 'upstream_master' into sync_v4 2023-07-19 16:37:31 +02:00
tokenizer.pyx Merge branch 'upstream_master' into sync_v4 2023-07-19 16:37:31 +02:00
ty.py isort all the things 2023-06-26 11:41:03 +02:00
typedefs.pxd isort all the things 2023-06-26 11:41:03 +02:00
typedefs.pyx Tidy up rest 2017-10-27 21:07:59 +02:00
util.py Merge branch 'upstream_master' into sync_v4 2023-07-19 16:37:31 +02:00
vectors.pyx merge fixes 2023-07-19 16:38:29 +02:00
vocab.pxd ci: add cython linter (#12694) 2023-07-19 12:03:31 +02:00
vocab.pyi isort all the things 2023-06-26 11:41:03 +02:00
vocab.pyx Merge branch 'upstream_master' into sync_v4 2023-07-19 16:37:31 +02:00