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

Capture and serialization of object values #27

Merged
merged 10 commits into from
Dec 6, 2023
Merged

Capture and serialization of object values #27

merged 10 commits into from
Dec 6, 2023

Conversation

kohlerca
Copy link
Collaborator

@kohlerca kohlerca commented Nov 21, 2023

This PR adds functionality to store values of simple object types in the captured provenance.

The built-in Python types str, bool, int, float and complex, and the NumPy numeric types (e.g., numpy.float64) are stored by default. The values are stored in RDF using the prov:value property.

The user can store the values of additional (more complex) types using the store_values setting via the function alpaca_setting. This setting accepts a list of strings defining the full Python path to the object. For example, to store values of dictionaries, the list should have the 'builtins.dict' entry. In this case, the value is obtained by type casting the object to a string using str.

@kohlerca kohlerca merged commit e228585 into main Dec 6, 2023
6 checks passed
@kohlerca kohlerca deleted the feature/value branch December 6, 2023 09:16
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