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

Extract extra metadata from a 'dic' object #170

Open
CasperWA opened this issue Oct 9, 2023 · 1 comment
Open

Extract extra metadata from a 'dic' object #170

CasperWA opened this issue Oct 9, 2023 · 1 comment
Assignees
Labels
dic2owl Issue or PR related specifically to the dic2owl Python package enhancement New feature or request question Further information is requested

Comments

@CasperWA
Copy link
Contributor

CasperWA commented Oct 9, 2023

Is there a way to extract metadata from the dic object like _dictionary_audit.version?
onto.set_version(version="XXX")

Comment made by @jesper-friis about the Generator._add_metadata() method.

@CasperWA CasperWA added enhancement New feature or request question Further information is requested dic2owl Issue or PR related specifically to the dic2owl Python package labels Oct 9, 2023
@jamesrhester
Copy link

jamesrhester commented Nov 9, 2023

The top level attributes in the dictionary are available by accessing the dictionary main block using the data block name. For cif_core this is CORE_DIC. So for example, if d is a CifDic:

>>> d["CORE_DIC"]["_dictionary.version"]
'3.2.0'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dic2owl Issue or PR related specifically to the dic2owl Python package enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants