Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore spacy.cli.project API #13053

Merged
merged 2 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions spacy/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,17 @@
from .package import package # noqa: F401
from .pretrain import pretrain # noqa: F401
from .profile import profile # noqa: F401
from .train import train_cli # noqa: F401
from .validate import validate # noqa: F401
from .project.assets import project_assets # type: ignore[attr-defined] # noqa: F401
from .project.clone import project_clone # type: ignore[attr-defined] # noqa: F401
from .project.document import ( # type: ignore[attr-defined] # noqa: F401
project_document,
)
from .project.dvc import project_update_dvc # type: ignore[attr-defined] # noqa: F401
from .project.pull import project_pull # type: ignore[attr-defined] # noqa: F401
from .project.push import project_push # type: ignore[attr-defined] # noqa: F401
from .project.run import project_run # type: ignore[attr-defined] # noqa: F401
from .train import train_cli # type: ignore[attr-defined] # noqa: F401
from .validate import validate # type: ignore[attr-defined] # noqa: F401


@app.command("link", no_args_is_help=True, deprecated=True, hidden=True)
Expand Down
Empty file added spacy/cli/project/__init__.py
Empty file.
1 change: 1 addition & 0 deletions spacy/cli/project/assets.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from weasel.cli.assets import *
1 change: 1 addition & 0 deletions spacy/cli/project/clone.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from weasel.cli.clone import *
1 change: 1 addition & 0 deletions spacy/cli/project/document.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from weasel.cli.document import *
1 change: 1 addition & 0 deletions spacy/cli/project/dvc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from weasel.cli.dvc import *
1 change: 1 addition & 0 deletions spacy/cli/project/pull.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from weasel.cli.pull import *
1 change: 1 addition & 0 deletions spacy/cli/project/push.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from weasel.cli.push import *
1 change: 1 addition & 0 deletions spacy/cli/project/remote_storage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from weasel.cli.remote_storage import *
1 change: 1 addition & 0 deletions spacy/cli/project/run.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from weasel.cli.run import *
5 changes: 5 additions & 0 deletions spacy/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1061,3 +1061,8 @@ def test_debug_data_trainable_lemmatizer_not_annotated():

data = _compile_gold(train_examples, ["trainable_lemmatizer"], nlp, True)
assert data["no_lemma_annotations"] == 2


def test_project_api_imports():
from spacy.cli import project_run
from spacy.cli.project.run import project_run # noqa: F401, F811