amagioss / py_rdfc10

Implementation of RDF canonicalization using W3 spec
1 stars 0 forks source link

RDF Canonicalization in Python

This is an implementation of the RDF Dataset Canonicalization algorithm, also referred to as RDFC-1.0. The algorithm has been published by the W3C RDF Dataset Canonicalization and Hash Working Group.

The implementation here is based on typescript implementation present in the following repository:

Also implements

Installation

pip install .

Running tests

All test cases are in tests directory. To run tests, use the following command:


# Run tests on installed package
pytest --import-mode=importlib -v -s ./tests/test_rdfc10.py 

# Graph diff test 
pytest  --import-mode=importlib -v -s ./tests/test_rdfc10.py -k test_graph_diff

# Hash test
pytest -v -s ./tests/test_rdfc10.py -k test_to_hash

Limitations