Skip to content

Commit

Permalink
Fix install
Browse files Browse the repository at this point in the history
Ensure `dic2owl` is installable through CI.
  • Loading branch information
CasperWA committed Aug 30, 2021
1 parent 2a902e6 commit 53f434a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dic2owl_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -U -r dic2owl/requirements.txt
pip install -U -e dic2owl
pip install bandit pylint safety mypy pytest pytest-cov
- name: Run bandit
Expand Down
7 changes: 2 additions & 5 deletions dic2owl/dic2owl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@
For more information on how to run the CLI, run `dic2owl --help` in your
terminal.
"""
# pylint: disable=line-too-long

__version__ = "0.1.0"
__author__ = (
"Jesper Friis <[email protected]>, "
"Casper Welzel Andersen <[email protected]>, "
"Francesca Lønstad Bleken <[email protected]>"
)
__author__ = "Jesper Friis <[email protected]>, Casper Welzel Andersen <[email protected]>, Francesca Lønstad Bleken <[email protected]>"
__author_email__ = "[email protected]"
16 changes: 10 additions & 6 deletions dic2owl/dic2owl/dic2owl.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class Generator:
dicfile: File name of CIF dictionary to generate an ontology for.
base_iri: Base IRI of the generated ontology.
comments: Sequence of comments to add to the ontology itself.
"""

# TODO:
Expand All @@ -86,9 +87,15 @@ def __init__(

# Load cif-ddl ontology and append it to imported ontologies
# TODO - update the url below when the dic2owl branch is merged into
# master...
#cif_ddl = 'https://raw.githubusercontent.com/emmo-repo/CIF-ontology/main/ontology/cif-ddl.ttl'
cif_ddl = 'https://raw.githubusercontent.com/emmo-repo/CIF-ontology/dic2owl/ontology/cif-ddl.ttl'
# main...
# cif_ddl = (
# "https://raw.githubusercontent.com/emmo-repo/CIF-ontology/main/"
# "ontology/cif-ddl.ttl"
# )
cif_ddl = (
"https://raw.githubusercontent.com/emmo-repo/CIF-ontology/dic2owl"
"/ontology/cif-ddl.ttl"
)
self.ddl = self.world.get_ontology(str(cif_ddl)).load()
self.ddl.sync_python_names()
self.onto.imported_ontologies.append(self.ddl)
Expand Down Expand Up @@ -268,6 +275,3 @@ def main(dicfile: Union[str, Path], ttlfile: Union[str, Path]) -> Generator:
)

return gen # XXX - just for debugging


main('cif_core.dic', 'cif_core.ttl')

0 comments on commit 53f434a

Please sign in to comment.