|
1 | 1 | # pyld ChangeLog |
2 | 2 |
|
| 3 | +## 4.0.0 - unreleased |
| 4 | + |
| 5 | +### Added |
| 6 | + |
| 7 | +- migrate `canon.py` to `rdflib` |
| 8 | + - added `rdflib` dependency in all relevant config and code files. |
| 9 | + - added `util.py`: |
| 10 | + - added the functions `from_legacy_dataset()` and `to_legacy_dataset()` to convert an `rdflib.Dataset` to an RDFJS-like `dict` and back wherever needed. |
| 11 | + - added unittests in `tests/test_util.py` for these functions. |
| 12 | +- implement RDFC1.0 |
| 13 | + - added new class `RDFC10` (subclass of `URDNA2015`) in `canon.py` |
| 14 | + - added the RDFC1.0 test-suite in `tests/runtests.py` |
| 15 | + - added support for testing blank-node identifier maps. |
| 16 | + - added support for testing with different hashing algorithms |
| 17 | + |
| 18 | +### Changed |
| 19 | + - migrate `canon.py` to `rdflib`: |
| 20 | + - now use `rdflib` for RDF term type checking (e.g., checking is something is a bnode), looping over triples/quads, nquads serialization and constructing RDF terms (custom deepcopy is no longer needed) |
| 21 | + - move nquads parsing from`JsonLdProcessor.normalize()` to `URDNA2015.main()` so all parsing and serialization is handled by the same class. |
| 22 | + - move the main logic to `URDNA2015._canonicalize(self, dataset: Dataset)` while keeping input and output in `URDNA2015.main()`. The method `URDNA2015._canonicalize(self, dataset: Dataset)` accepts an `rdflib.Dataset` and returns a tuple with |
| 23 | + - the canonicalized result as a nquads `str` and |
| 24 | + - the blank node identifier map as `dict`. |
| 25 | + - the method `URDNA2015 .main(self, dataset: str | dict | Dataset, options)` now |
| 26 | + - accepts a `rdflib.Dataset` object in addition to an nquads `str` or the original RDFJS-like`dict`. |
| 27 | + - returns |
| 28 | + - a `str`: the serialized nquads result, or |
| 29 | + - a `dict`: the result as RDFJS-like dataset or the blank node identifier map when the new parameter `outputMap` is `True`. |
| 30 | + - the hashing algorithm is now an class attribute `URDNA2015.hash_algorithm` so it configurable (required for RDFC1.0) |
| 31 | + - the `permutations()` function now uses `itertools.permutations` instead of a custom implementation. |
| 32 | + - replacements for rdflib's `_nq_row` and `_quoteLiteral` (these should eventually move to a fix for rdflib's nquads serializer). |
| 33 | + - (re-)enabled all skipped URDNA2015, URDNA2012 tests in `tests/runtests.py` |
| 34 | + - if the result of a test is a dict and the expected value is a string, the expected value is now parsed as JSON (needed for testing blank-node identifier maps). |
| 35 | + |
3 | 36 | ## 3.1.0 - unreleased |
4 | 37 |
|
5 | 38 | ### Fixed |
|
23 | 56 | v1/v2, Ed25519-2020, JWS-2020) to vendored on-disk copies. Refresh with |
24 | 57 | `make download-bundled-contexts`. |
25 | 58 |
|
| 59 | +>>>>>>> 638d888 (Add to changelog) |
| 60 | +
|
26 | 61 | ## 3.0.0 - 2026-04-02 |
27 | 62 |
|
28 | 63 | ### Changed |
|
0 commit comments