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

Support for semantic annotations in the captured provenance using ontologies #26

Merged
merged 26 commits into from
Dec 6, 2023

Conversation

kohlerca
Copy link
Collaborator

This PR adds the functionality to extend the captured provenance with semantic information defined in one or more ontologies.

For example, function executions are represented by the FunctionExecution class in the Alpaca ontology. However, the concept that represents the process implemented by the function could be defined in a domain-specific ontology, and this class could be added as an additional rdf:type triple to the FunctionExecution individual, thereby embedding semantic information.

The ontology annotations are defined through a dictionary that is added as a special attribute to Python objects (__ontology__). Two types of Python objects are supported: functions and data objects (i.e., objects instantiated from a Python class). Alpaca will detect the presence of the ontology annotations and use them appropriately when creating the serialized RDF graph.

The ontology annotations can describe the function or data object as well as extended information associated to them:

  • arguments and returns if the Python object is a function;
  • attributes and annotations if the Python object is a data object (attributes and annotations distinction is the same as the one adopted by the Alpaca provenance model).

The references to ontology classes/individuals must be URIs. CURIEs (i.e., abbreviated URIs that use a prefix) are allowed by defining namespaces.

More details are on the documentation page.

Cristiano Köhler added 22 commits March 8, 2023 15:28
Implemented unit tests.
…pplications).

OntologyInformation interface class made private.
Updated and completed unit tests.
# Conflicts:
#	alpaca/decorator.py
#	alpaca/serialization/prov.py
…on returns that are containers and are captured with the container_output option in Provenance
… to the function with an ontology (regular inputs and container inputs)
Cristiano Köhler added 4 commits November 21, 2023 13:55
@kohlerca kohlerca merged commit 72ed34c into main Dec 6, 2023
6 checks passed
@kohlerca kohlerca deleted the feature/ontology_support branch October 21, 2024 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant