From 0a87fd8d229a8f48e423c769ce0e22d5876e2915 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Thu, 23 Feb 2023 13:47:29 +0100 Subject: [PATCH] Add env vars for debug and disabled --- spacy/__main__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spacy/__main__.py b/spacy/__main__.py index b14611c79..bfe671ef4 100644 --- a/spacy/__main__.py +++ b/spacy/__main__.py @@ -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