mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-03 13:14:11 +03:00
Merge remote-tracking branch 'upstream/develop' into feature/doc-fixes
This commit is contained in:
commit
97d99f7efa
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
|||
SHELL := /bin/bash
|
||||
|
||||
ifndef SPACY_EXTRAS
|
||||
override SPACY_EXTRAS = spacy-lookups-data jieba pkuseg==0.0.25 sudachipy sudachidict_core
|
||||
override SPACY_EXTRAS = spacy-lookups-data==0.4.0.dev0 jieba pkuseg==0.0.25 sudachipy sudachidict_core
|
||||
endif
|
||||
|
||||
ifndef PYVER
|
||||
|
|
|
@ -4,4 +4,5 @@ __version__ = "3.0.0a16"
|
|||
__release__ = True
|
||||
__download_url__ = "https://github.com/explosion/spacy-models/releases/download"
|
||||
__compatibility__ = "https://raw.githubusercontent.com/explosion/spacy-models/master/compatibility.json"
|
||||
__projects__ = "https://github.com/explosion/spacy-boilerplates"
|
||||
__projects__ = "https://github.com/explosion/projects"
|
||||
__projects_branch__ = "v3"
|
||||
|
|
|
@ -16,6 +16,7 @@ def project_clone_cli(
|
|||
name: str = Arg(..., help="The name of the template to clone"),
|
||||
dest: Optional[Path] = Arg(None, help="Where to clone the project. Defaults to current working directory", exists=False),
|
||||
repo: str = Opt(about.__projects__, "--repo", "-r", help="The repository to clone from"),
|
||||
branch: str = Opt(about.__projects_branch__, "--branch", "-b", help="The branch to clone from")
|
||||
# fmt: on
|
||||
):
|
||||
"""Clone a project template from a repository. Calls into "git" and will
|
||||
|
@ -30,7 +31,13 @@ def project_clone_cli(
|
|||
project_clone(name, dest, repo=repo)
|
||||
|
||||
|
||||
def project_clone(name: str, dest: Path, *, repo: str = about.__projects__) -> None:
|
||||
def project_clone(
|
||||
name: str,
|
||||
dest: Path,
|
||||
*,
|
||||
repo: str = about.__projects__,
|
||||
branch: str = about.__projects_branch__,
|
||||
) -> None:
|
||||
"""Clone a project template from a repository.
|
||||
|
||||
name (str): Name of subdirectory to clone.
|
||||
|
|
|
@ -893,7 +893,7 @@ can provide any other repo (public or private) that you have access to using the
|
|||
<!-- TODO: update example once we've decided on repo structure -->
|
||||
|
||||
```cli
|
||||
$ python -m spacy project clone [name] [dest] [--repo]
|
||||
$ python -m spacy project clone [name] [dest] [--repo] [--branch]
|
||||
```
|
||||
|
||||
> #### Example
|
||||
|
@ -908,13 +908,14 @@ $ python -m spacy project clone [name] [dest] [--repo]
|
|||
> $ python -m spacy project clone template --repo https://github.com/your_org/your_repo
|
||||
> ```
|
||||
|
||||
| Name | Description |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `name` | The name of the template to clone, relative to the repo. Can be a top-level directory or a subdirectory like `dir/template`. ~~str (positional)~~ |
|
||||
| `dest` | Where to clone the project. Defaults to current working directory. ~~Path (positional)~~ |
|
||||
| `--repo`, `-r` | The repository to clone from. Can be any public or private Git repo you have access to. ~~str (option)~~ |
|
||||
| `--help`, `-h` | Show help message and available arguments. ~~bool (flag)~~ |
|
||||
| **CREATES** | The cloned [project directory](/usage/projects#project-files). |
|
||||
| Name | Description |
|
||||
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `name` | The name of the template to clone, relative to the repo. Can be a top-level directory or a subdirectory like `dir/template`. ~~str (positional)~~ |
|
||||
| `dest` | Where to clone the project. Defaults to current working directory. ~~Path (positional)~~ |
|
||||
| `--repo`, `-r` | The repository to clone from. Can be any public or private Git repo you have access to. ~~str (option)~~ |
|
||||
| `--branch`, `-b` | The branch to clone from. Defaults to `master`. ~~str (option)~~ |
|
||||
| `--help`, `-h` | Show help message and available arguments. ~~bool (flag)~~ |
|
||||
| **CREATES** | The cloned [project directory](/usage/projects#project-files). |
|
||||
|
||||
### project assets {#project-assets tag="command"}
|
||||
|
||||
|
|
|
@ -327,8 +327,9 @@ model, and the output dimension will be
|
|||
> can_resize = pipe.is_resizable()
|
||||
> ```
|
||||
>
|
||||
> With custom resizing implemented by a component:
|
||||
>
|
||||
> ```python
|
||||
> ### Custom resizing
|
||||
> def custom_resize(model, new_nO):
|
||||
> # adjust model
|
||||
> return model
|
||||
|
|
|
@ -65,6 +65,8 @@ project template and copies the files to a local directory. You can then run the
|
|||
project, e.g. to train a pipeline and edit the commands and scripts to build
|
||||
fully custom workflows.
|
||||
|
||||
<!-- TODO: update with real example project -->
|
||||
|
||||
```cli
|
||||
python -m spacy project clone some_example_project
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue
Block a user