mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-22 18:12:00 +03:00
Fix installed model URL method and CI test
This commit is contained in:
parent
586ec16114
commit
e106e502bb
4
.github/azure-steps.yml
vendored
4
.github/azure-steps.yml
vendored
|
@ -60,8 +60,8 @@ steps:
|
|||
condition: eq(variables['python_version'], '3.8')
|
||||
|
||||
- script: |
|
||||
python -W error -m spacy info ca_core_news_sm --url
|
||||
displayName: 'Test info --url CLI'
|
||||
python -W error -m spacy info ca_core_news_sm | grep -q download_url
|
||||
displayName: 'Test download_url in info CLI'
|
||||
condition: eq(variables['python_version'], '3.8')
|
||||
|
||||
- script: |
|
||||
|
|
|
@ -138,7 +138,7 @@ def info_installed_model_url(model: str) -> Optional[str]:
|
|||
"""
|
||||
try:
|
||||
dist = importlib_metadata.distribution(model)
|
||||
data = dist.read_text("direct_url.json")
|
||||
data = json.loads(dist.read_text("direct_url.json"))
|
||||
return data["url"]
|
||||
except importlib_metadata.PackageNotFoundError:
|
||||
# no such package
|
||||
|
|
Loading…
Reference in New Issue
Block a user