mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-07 21:33:13 +03:00
Add env vars for debug and disabled
This commit is contained in:
parent
2b469a8449
commit
0a87fd8d22
|
@ -1,6 +1,9 @@
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
import os
|
||||||
|
|
||||||
FILE = Path(__file__).parent / "cli.json"
|
FILE = Path(__file__).parent / "cli.json"
|
||||||
|
IS_DEBUG = "SPACY_CLI_DEBUG" in os.environ
|
||||||
|
IS_DISABLED = "SPACY_CLI_NO_STATIC" in os.environ
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
@ -8,7 +11,7 @@ def main():
|
||||||
|
|
||||||
# TODO: ideally we want to set disable=True for local development, but
|
# TODO: ideally we want to set disable=True for local development, but
|
||||||
# not sure yet how to best determine that?
|
# not sure yet how to best determine that?
|
||||||
static = StaticRadicli.load(FILE)
|
static = StaticRadicli.load(FILE, debug=IS_DEBUG, disable=IS_DISABLED)
|
||||||
static.run()
|
static.run()
|
||||||
|
|
||||||
from spacy.cli import setup_cli
|
from spacy.cli import setup_cli
|
||||||
|
|
Loading…
Reference in New Issue
Block a user