Skip to content
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

Import from web instead of local files #27

Closed
wants to merge 3 commits into from

Conversation

jesper-friis
Copy link
Collaborator

To reduce issues with import errors

self.cd = CifDic(dicfile, do_dREL=False)
self.cif_top = ontology_dir() / cif_top
if not cif_top:
self.cif_top = f'{release_site}/{__version__}/cif_top.ttl'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, but this expects that the version of the dic2owl package is the same as the latest overall version of the ontology.

I think we should add some automatic extraction of the latest ontology release version instead. Perhaps solely use GH releases for this and retrieve the latest? Or perhaps go through the git tags and get the latest from there, once we've decided on the proper versioning and tagging scheme?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Should we then define top_version in init.py to have the related version expressed in a single place?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think __ontology_version__ would be better? This would then refer to the version of cif.ttl as well as the repository as a whole - i.e., git tags and GH releases.

I'll try to flesh out this description in #28 through a README edit :)

dic2owl/dic2owl/generate_cif.py Outdated Show resolved Hide resolved
dic2owl/dic2owl/generate_cif.py Show resolved Hide resolved
dic2owl/dic2owl/generate_cif.py Show resolved Hide resolved
@jesper-friis
Copy link
Collaborator Author

jesper-friis commented Apr 24, 2021

The aim or this PR was to include an explicit url to cif_top in owl:imports of the generated cif_core.ttl. However, it seems that even though that we give an explicit url to cif_top when loading it in generate_cif.py, it is the ontology IRI http://emmo.info/domain-crystallography/cif_top that gets serialised.

I think we could close this PR for now and instead concentrate on how we want to publish the ontologies.

@jesper-friis
Copy link
Collaborator Author

The aim or this PR was to include an explicit url to cif_top in owl:imports of the generated cif_core.ttl. However, it seems that even though that we give an explicit url to cif_top when loading it in generate_cif.py, it is the ontology IRI http://emmo.info/domain-crystallography/cif_top that gets serialised.

I think we could skip this PR for now and instead concentrate on how we want to publish the ontologies.

@CasperWA CasperWA force-pushed the import-explicit-version-of-cif_top branch from bcf5c5d to 4ec4ed6 Compare August 18, 2021 08:55
@CasperWA CasperWA force-pushed the import-explicit-version-of-cif_top branch from c95fa8f to e802a0f Compare August 18, 2021 13:10
@CasperWA
Copy link
Contributor

According to the comment above I'll close this PR. Since the central dic2owl generation file will also be updated in #52 the minor changes here are obsolete.

@CasperWA CasperWA closed this Aug 18, 2021
@CasperWA CasperWA deleted the import-explicit-version-of-cif_top branch August 18, 2021 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants