From d5ff0fecf8317e311494615699d693d1146e7aa2 Mon Sep 17 00:00:00 2001 From: svlandeg Date: Wed, 30 Dec 2020 14:01:13 +0100 Subject: [PATCH] add docs --- spacy/tests/test_cli.py | 1 - website/docs/api/cli.md | 25 ++++++++++++++++--------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/spacy/tests/test_cli.py b/spacy/tests/test_cli.py index 3442e0f6e..bfbee677a 100644 --- a/spacy/tests/test_cli.py +++ b/spacy/tests/test_cli.py @@ -25,7 +25,6 @@ def test_cli_info(): raw_data = info(tmp_dir, exclude=[""]) assert raw_data["lang"] == "nl" assert raw_data["components"] == ["textcat"] - assert raw_data["source"] == str(tmp_dir) def test_cli_converters_conllu_to_docs(): diff --git a/website/docs/api/cli.md b/website/docs/api/cli.md index 5a6143a38..e99166af8 100644 --- a/website/docs/api/cli.md +++ b/website/docs/api/cli.md @@ -61,20 +61,27 @@ markup to copy-paste into [GitHub issues](https://github.com/explosion/spaCy/issues). ```cli -$ python -m spacy info [--markdown] [--silent] +$ python -m spacy info [--markdown] [--silent] [--exclude] ``` +> #### Example +> +> ```cli +> $ python -m spacy info en_core_web_lg --markdown +> ``` + ```cli -$ python -m spacy info [model] [--markdown] [--silent] +$ python -m spacy info [model] [--markdown] [--silent] [--exclude] ``` -| Name | Description | -| ------------------------------------------------ | ----------------------------------------------------------------------------------------- | -| `model` | A trained pipeline, i.e. package name or path (optional). ~~Optional[str] \(positional)~~ | -| `--markdown`, `-md` | Print information as Markdown. ~~bool (flag)~~ | -| `--silent`, `-s` 2.0.12 | Don't print anything, just return the values. ~~bool (flag)~~ | -| `--help`, `-h` | Show help message and available arguments. ~~bool (flag)~~ | -| **PRINTS** | Information about your spaCy installation. | +| Name | Description | +| ------------------------------------------------ | --------------------------------------------------------------------------------------------- | +| `model` | A trained pipeline, i.e. package name or path (optional). ~~Optional[str] \(positional)~~ | +| `--markdown`, `-md` | Print information as Markdown. ~~bool (flag)~~ | +| `--silent`, `-s` 2.0.12 | Don't print anything, just return the values. ~~bool (flag)~~ | +| `--exclude`, `-e` | Comma-separated keys to exclude from the print-out. Defaults to `"labels"`. ~~Optional[str]~~ | +| `--help`, `-h` | Show help message and available arguments. ~~bool (flag)~~ | +| **PRINTS** | Information about your spaCy installation. | ## validate {#validate new="2" tag="command"}