-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding skills. See #23 #28
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,11 @@ commands = | |
python -m pytest tests/ {posargs} | ||
|
||
|
||
# | ||
# Install in the tox environment all dependencies | ||
# and run the model generation. | ||
# Note that this won't run tests. | ||
# | ||
[testenv:model] | ||
deps = | ||
. | ||
|
@@ -42,12 +47,16 @@ allowlist_externals = | |
sitepackages = True | ||
|
||
commands_pre = | ||
python -m spacy download en_core_web_trf | ||
# Eventually download en_core_web_trf. | ||
python -c "import spacy; m='en_core_web_trf'; spacy.util.is_package(m) or spacy.cli.download(m)" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We download the model only if it's not already there. This saves a lot of time (and CO2) |
||
# Ensure sparql is populated. | ||
pytest tests/test_sparql.py | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test if sparql is ok before rebuilding the model. If this fails, then the sparql server is not up and running. |
||
|
||
commands = | ||
python model/model.py | ||
rm generated/output -fr | ||
mkdir -p generated/output | ||
pytest tests/test_localdb_base.py | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. after the build, we test that new skills are there. |
||
python -m spacy package ./generated/en_core_web_trf_esco_ner ./generated/output --build wheel | ||
|
||
bash -c '[ "{posargs}" == "upload" ] && python -m spacy huggingface-hub push generated/output/en_core_web_trf_esco_ner*/dist/*.whl' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verify that both old and new skills are accessible, using a parametric test.