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

elucidation needs to be instantiated before actually filled with values. #813

Open
francescalb opened this issue Dec 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@francescalb
Copy link
Collaborator

Example below:

For some reason, the 3rd last line is needed, otherwise setting the eludation raises an error.

from ontopy import get_ontology
onto = get_ontology().load()
from ontopy.utils import english

with onto:
    class IntrinsicMagneticMaterialProperty(onto.Property):
       """Intrinsic magnetic material Properties."""
       prefLabel = english("IntrinsicMagneticMaterialProperty")
       EMMO_967080e5_2f42_4eb2_a3a9_c58143e835f9 = english("Intrinsic properties of a magnetic material.")

with onto:
    class IntrinsicMagneticMaterialProperty2(onto.Property):
       """Intrinsic magnetic material Properties. 2"""
       prefLabel = english("IntrinsicMagneticMaterialProperty2")

    IntrinsicMagneticMaterialProperty2.elucidation
    IntrinsicMagneticMaterialProperty2.elucidation = english("Intrinsic properties of a magnetic material 2.")
onto.save('test.ttl')
@francescalb francescalb added the bug Something isn't working label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant