feat: use weasel as spacy project command (#12473)

* feat: use weasel as spacy project command

* build: use constrained requirement for weasel

* feat: add weasel to the library requirements

* build: update weasel to new version

* build: use specific weasel tag

* build: use weasel-0.1.0rc1 from PyPI

* fix: remove weasel from requirements.txt

* fix: requirements.txt and setup.cfg need to reflect each other

* feat: remove legacy spacy project code
This commit is contained in:
Basile Dura 2023-06-07 11:15:00 +02:00 committed by GitHub
parent dc2f7fffd1
commit 4788ab2013
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 2 deletions

View File

@ -12,6 +12,7 @@ catalogue>=2.0.6,<2.1.0
typer>=0.3.0,<0.8.0
pathy>=0.10.0
smart-open>=5.2.1,<7.0.0
weasel>=0.1.0rc1
# Third party dependencies
numpy>=1.15.0
requests>=2.13.0,<3.0.0

View File

@ -51,6 +51,7 @@ install_requires =
wasabi>=0.9.1,<1.2.0
srsly>=2.4.3,<3.0.0
catalogue>=2.0.6,<2.1.0
weasel>=0.1.0rc1
# Third-party dependencies
typer>=0.3.0,<0.8.0
pathy>=0.10.0

View File

@ -16,6 +16,8 @@ from thinc.util import gpu_is_available
from configparser import InterpolationError
import os
from weasel import app as project_cli
from ..compat import Literal
from ..util import import_file, run_command, registry, logger, ENV_VARS
@ -52,11 +54,10 @@ Opt = typer.Option
app = typer.Typer(name=NAME, help=HELP)
benchmark_cli = typer.Typer(name="benchmark", help=BENCHMARK_HELP, no_args_is_help=True)
project_cli = typer.Typer(name="project", help=PROJECT_HELP, no_args_is_help=True)
debug_cli = typer.Typer(name="debug", help=DEBUG_HELP, no_args_is_help=True)
init_cli = typer.Typer(name="init", help=INIT_HELP, no_args_is_help=True)
app.add_typer(project_cli)
app.add_typer(project_cli, name="project", help=PROJECT_HELP, no_args_is_help=True)
app.add_typer(debug_cli)
app.add_typer(benchmark_cli)
app.add_typer(init_cli)

View File

@ -11,6 +11,9 @@ from click import NoSuchOption
from packaging.specifiers import SpecifierSet
from thinc.api import Config, ConfigValidationError
from weasel.cli.remote_storage import RemoteStorage
from weasel.cli.run import _check_requirements
from spacy import about
from spacy.cli import info
from spacy.cli._util import walk_directory