Add docs for package command

This commit is contained in:
ines 2017-03-21 11:19:21 +01:00
parent 3f4e3fda1d
commit 09b24bc5a9
2 changed files with 38 additions and 1 deletions

View File

@ -62,7 +62,7 @@ class CLI(object):
@plac.annotations(
input_dir=("directory with model data", "positional", None, str),
output_dir=("output directory", "positional", None, str),
force=("force overwriting of existing output directory", "flag", "f", bool)
force=("force overwriting of existing folder in output directory", "flag", "f", bool)
)
def package(self, input_dir, output_dir, force=False):
"""

View File

@ -103,3 +103,40 @@ p
+cell #[code --help], #[code -h]
+cell flag
+cell Show help message and available arguments.
+h(2, "package") Package
+tag experimental
p
| Generate a #[+a("/docs/usage/models#own-models") model Python package]
| from an existing model data directory. All data files are copied over,
| and the meta data can be entered directly from the command line. While
| this feature is still experimental, the templates for the
| #[+src(gh("spacy-dev-resources", "templates/model/setup.py")) setup.py] and
| #[+src(gh("spacy-dev-resources", "templates/model/en_morel_name/__init__.py")) __init__.py]
| are downloaded from GitHub. This means you need to be connected to the
| internet to use this command.
+code(false, "bash").
python -m spacy package [input_dir] [output_dir] [--force]
+table(["Argument", "Type", "Description"])
+row
+cell #[code input_dir]
+cell positional
+cell Path to directory containing model data.
+row
+cell #[code output_dir]
+cell positional
+cell Directory to create package folder in.
+row
+cell #[code --force], #[code -f]
+cell flag
+cell Force overwriting of existing folder in output directory.
+row
+cell #[code --help], #[code -h]
+cell flag
+cell Show help message and available arguments.