-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from INCATools/list_issue
Bug fixes
- Loading branch information
Showing
12 changed files
with
272 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Publish to test PyPI | ||
|
||
# Expect this action to be triggered manually before | ||
|
||
on: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-publish: | ||
name: Publish Python distributions to PyPI | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install Deployment Tools | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Install Project Dependencies | ||
run: | | ||
pip install -r requirements.txt | ||
- name: Auto-Generate schema documentation | ||
run: PYTHONPATH=./src:$PYTHONPATH python -m dosdp document --schema -o ./src/schema/ | ||
- name: Package Distribution | ||
run: >- | ||
python | ||
setup.py | ||
sdist | ||
bdist_wheel | ||
- name: Deploy Package | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_TEST_PASSWORD }} | ||
run: | | ||
twine upload --repository-url https://test.pypi.org/legacy/ dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import os | ||
from ruamel.yaml import YAML | ||
from jsonschema import Draft7Validator | ||
|
||
SCHEMA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "../schema/dosdp_schema.yaml") | ||
|
||
|
||
ryaml = YAML(typ='safe') | ||
with open(SCHEMA_PATH) as stream: | ||
dosdp_schema = ryaml.load(stream) | ||
|
||
Draft7Validator.check_schema(dosdp_schema) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
src/schema/test/negative_test_set/not_schema_compliant.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
pattern_name: acute | ||
|
||
pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/acute.yaml | ||
|
||
description: 'This pattern is applied to diseases that are described as having an acute onset, i.e. the sudden appearance of disease manifestations over a short period of time. | ||
Examples: [acute bronchiolitis](http://purl.obolibrary.org/obo/MONDO_0020680), | ||
[acute liver failure](http://purl.obolibrary.org/obo/MONDO_0019542)' | ||
|
||
contributors: | ||
- https://orcid.org/0000-0002-6601-2165 | ||
- https://orcid.org/0000-0001-5208-3432 | ||
|
||
classes: | ||
acute: PATO:0000389 | ||
disease: MONDO:0000001 | ||
|
||
relations: | ||
has modifier: RO:0002573 | ||
|
||
annotationProperties: | ||
exact_synonym: oio:hasExactSynonym | ||
related_synonym: oio:hasRelatedSynonym | ||
|
||
vars: | ||
disease: '''disease''' | ||
|
||
name: | ||
text: acute %s | ||
vars: | ||
- disease | ||
|
||
# axioms is not valid | ||
axioms: | ||
- annotationProperty: exact_synonym | ||
text: '%s, acute' | ||
vars: | ||
- disease | ||
|
||
annotations: | ||
# property is not valid | ||
- property: exact_synonym | ||
text: '%s, acute' | ||
vars: | ||
- disease | ||
|
||
def: | ||
text: Acute form of %s. | ||
vars: | ||
- disease | ||
|
||
equivalentTo: | ||
text: '%s and ''has modifier'' some ''acute''' | ||
vars: | ||
- disease |
47 changes: 47 additions & 0 deletions
47
src/schema/test/negative_test_set/undeclared_annotation_prop.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
pattern_name: acute | ||
|
||
pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/acute.yaml | ||
|
||
description: 'This pattern is applied to diseases that are described as having an acute onset, i.e. the sudden appearance of disease manifestations over a short period of time. | ||
Examples: [acute bronchiolitis](http://purl.obolibrary.org/obo/MONDO_0020680), | ||
[acute liver failure](http://purl.obolibrary.org/obo/MONDO_0019542)' | ||
|
||
contributors: | ||
- https://orcid.org/0000-0002-6601-2165 | ||
- https://orcid.org/0000-0001-5208-3432 | ||
|
||
classes: | ||
acute: PATO:0000389 | ||
disease: MONDO:0000001 | ||
|
||
relations: | ||
has modifier: RO:0002573 | ||
|
||
annotationProperties: | ||
# exact_synonym: oio:hasExactSynonym | ||
related_synonym: oio:hasRelatedSynonym | ||
|
||
vars: | ||
disease: '''disease''' | ||
|
||
name: | ||
text: acute %s | ||
vars: | ||
- disease | ||
|
||
annotations: | ||
- annotationProperty: exact_synonym | ||
text: '%s, acute' | ||
vars: | ||
- disease | ||
|
||
def: | ||
text: Acute form of %s. | ||
vars: | ||
- disease | ||
|
||
equivalentTo: | ||
text: '%s and ''has modifier'' some ''acute''' | ||
vars: | ||
- disease |
50 changes: 50 additions & 0 deletions
50
src/schema/test/positive_test_set/patterns/abnormallyHyperplasticAnatomicalEntity.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
pattern_name: abnormallyHyperplasticAnatomicalEntity.yaml | ||
|
||
pattern_iri: http://purl.obolibrary.org/obo/upheno/patterns-dev/abnormallyHyperplasticAnatomicalEntity.yaml | ||
|
||
description: 'Hyperplastic anatomical entity, for example, thyroid gland hyperplasia. The increase in size of the anatomical entitiy is due to an increase in cell number,' | ||
|
||
examples: | ||
- http://purl.obolibrary.org/obo/HP_0008249 | ||
- http://purl.obolibrary.org/obo/MP_0000630 | ||
- http://purl.obolibrary.org/obo/MP_0013765 | ||
|
||
contributors: | ||
- https://orcid.org/0000-0001-8314-2140 | ||
|
||
classes: | ||
abnormal: PATO:0000460 | ||
anatomical_entity: UBERON:0001062 | ||
hyperplastic: PATO:0000644 | ||
|
||
relations: | ||
characteristic_of: RO:0000052 | ||
has_modifier: RO:0002573 | ||
has_part: BFO:0000051 | ||
|
||
annotationProperties: | ||
exact_synonym: oio:hasExactSynonym | ||
|
||
vars: | ||
anatomical_entity: "'anatomical_entity'" | ||
|
||
name: | ||
text: "%s hyperplasia" | ||
vars: | ||
- anatomical_entity | ||
|
||
annotations: | ||
- annotationProperty: exact_synonym | ||
text: "hyperplastic %s" | ||
vars: | ||
- anatomical_entity | ||
|
||
def: | ||
text: "The increased size of the %s is due to an increase in cell number (hyperplasia)." | ||
vars: | ||
- anatomical_entity | ||
|
||
equivalentTo: | ||
text: "'has_part' some ('hyperplastic' and ('characteristic_of' some %s) and ('has_modifier' some 'abnormal'))" | ||
vars: | ||
- anatomical_entity |