mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-04 21:50:35 +03:00
Only include runtime-relevant config in package CLI dependency detection (#9211)
This commit is contained in:
parent
d74870d38c
commit
20f63e7154
|
@ -203,9 +203,11 @@ def get_third_party_dependencies(
|
||||||
own_packages = ("spacy", "spacy-legacy", "spacy-nightly", "thinc", "srsly")
|
own_packages = ("spacy", "spacy-legacy", "spacy-nightly", "thinc", "srsly")
|
||||||
distributions = util.packages_distributions()
|
distributions = util.packages_distributions()
|
||||||
funcs = defaultdict(set)
|
funcs = defaultdict(set)
|
||||||
for path, value in util.walk_dict(config):
|
# We only want to look at runtime-relevant sections, not [training] or [initialize]
|
||||||
if path[-1].startswith("@"): # collect all function references by registry
|
for section in ("nlp", "components"):
|
||||||
funcs[path[-1][1:]].add(value)
|
for path, value in util.walk_dict(config[section]):
|
||||||
|
if path[-1].startswith("@"): # collect all function references by registry
|
||||||
|
funcs[path[-1][1:]].add(value)
|
||||||
for component in config.get("components", {}).values():
|
for component in config.get("components", {}).values():
|
||||||
if "factory" in component:
|
if "factory" in component:
|
||||||
funcs["factories"].add(component["factory"])
|
funcs["factories"].add(component["factory"])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user