Add env vars for debug and disabled

This commit is contained in:
Ines Montani 2023-02-23 13:47:29 +01:00
parent 2b469a8449
commit 0a87fd8d22
No known key found for this signature in database
1 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,9 @@
from pathlib import Path
import os
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():
@ -8,7 +11,7 @@ def main():
# TODO: ideally we want to set disable=True for local development, but
# not sure yet how to best determine that?
static = StaticRadicli.load(FILE)
static = StaticRadicli.load(FILE, debug=IS_DEBUG, disable=IS_DISABLED)
static.run()
from spacy.cli import setup_cli