Skip to content

Commit a1d1f71

Browse files
committed
Add rdflib and RDFC10 changes to changelog
1 parent bbbb2db commit a1d1f71

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
11
# pyld ChangeLog
22

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+
336
## 3.1.0 - unreleased
437

538
### Fixed

0 commit comments

Comments
 (0)