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

Unit Tests RDF Serialisation #75

Closed
6 tasks done
robons opened this issue Jul 6, 2021 · 1 comment
Closed
6 tasks done

Unit Tests RDF Serialisation #75

robons opened this issue Jul 6, 2021 · 1 comment
Assignees

Comments

@robons
Copy link
Contributor

robons commented Jul 6, 2021

Serialisation of our RDF models can be triggered by creating an rdflib.Graph and passing it to the model.to_graph(...) method on the model.

graph = rdflib.Graph()
model.to_graph(graph)
# you can now query `graph` as you would any RDF datastore.
  • Add Unit-test framework to sharedmodel package.
  • Test overriding of attributes in subclass - do we see the overriden triple outputted whilst the original triple is suppressed?
  • Test that Resource[T] is serialised properly for both ExistingResource and NewResource types (ensures recursive serialisation for NewResource types).
  • Test that circular Resource[T] references are serialised properly.
  • Test that multiple Triples can be specified in an annotation. Ensure they both get serialised properly.
  • Test exceptions are raised when PropertyStatus.mandatory triples have no value provided when serializing, but recommended/optional silently pass where values haven't been provided.
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

No branches or pull requests

2 participants