RDFLib / rdflib

RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.
https://rdflib.readthedocs.org
BSD 3-Clause "New" or "Revised" License
2.17k stars 556 forks source link

RDF 1.1 tests & support #450

Closed joernhees closed 2 years ago

joernhees commented 9 years ago

we should properly test & support RDF 1.1.

I see the following TODOs: (help welcome)

As discussed in #400 backwards compatibility would be nice.

Any thoughts on this welcome @RDFLib/rdflib

niklasl commented 9 years ago

+1. Solving #436 is probably part of this work.

ghost commented 2 years ago

As far as I can tell from the W3's What's New in RDF 1.1 RDFLib now fully supports it.

aucampia commented 2 years ago

I'm not sure we are running all these test suites, and even if we are I think we are skipping large amounts of them.

ghost commented 2 years ago

I guess it's worth checking that the desired coverage is achieved. grepping for read_manifest turns up, for example, https://github.com/RDFLib/rdflib/blob/57f993d770725a871e4b0f66889208c7d9e91457/test/test_trig_w3c.py#L92 and the tests in the corresponding folder match those of the W3 test suite

Elsewhere, these tests call read_manifest and run the corresponding tests:

test/test_trig_w3c.py test/test_parsers/test_nquads_w3c.py test/test_parsers/test_turtle_w3c.py test/test_parsers/test_nt_w3c.py

Seem to be missing the 1.1 rdfxml tests (the rdfxml 1.0 tests don't use read_manifest but test/test_rdfxml.py instead) and the RDF 1.1 Semantics tests.

Most of the skipped tests (in skiptests.list) are sparql11 tests

ghost commented 2 years ago

Further to this. I'm working on collecting up the test suites into a single test_suites directory to live in consistent_test_data and it appears that tests/n3 is unused apart from a couple of specific tests because renamingn3 to _n3 only produces these two failures:

FAILED test/test_n3.py::TestN3Case::test_issue156 - FileNotFoundError: [Errno 2] No such file or directory: '.../test/n3/issue156.n3'
FAILED test/test_misc/test_parse_file_guess_format.py::FileParserGuessFormatTest::test_n3 - FileNotFoundError: [Errno 2] No such file or directory: '.../test/n3/example-lots_of_graphs.n3'

Uh-huh, the n3 suite was originally for checking n3 serialization roundtripping and atm, I'm not entirely sure that test has been replaced by a later version, so I recovered and updated gromgull's test code, pro tem. Tests out okay but we probably don't actually need it if notation3 roundtripping is already being comprehensively tested.

aucampia commented 2 years ago

I will hold off with fixing reporting then. I would prefer we do open a new issue for this though. Also I think it may make sense to just put test data in 'test/data/' as that already implies that is test data and it should be consistent from the outset.

aucampia commented 2 years ago

Maybe we should make an issue for tracking test reorg also to discuss layout.

ghost commented 2 years ago

Also I think it may make sense to just put test data in 'test/data/' as that already implies that is test data and it should be consistent from the outset.

Agreed.