| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
| |
This mirrors the similar parser registrations below in the same file.
With this commit, an Accept header can be used directly to serialize a
response, making putting up a SPARQL compatible endpoint trivial.
|
| |
|
|
|
| |
also unskips an old test on travis tha otherwise failed locally due
to now unresolved SPARQLWrapper exception ref
|
| |
|
|
|
|
|
|
| |
opinions is mainly: no to long lines, but not at any cost.
notation3.py crashses autopep :D
Also rdflib/__init__.py gets completely broken
|
| |\
| |
| | |
remove rdfa and microdata parsers from core RDFLib
|
| | |
| |
| |
| |
| |
| |
| | |
They were unteasted and falling behind their individual repos on
github.
They remain installable as plugins.
|
| |/
|
|
| |
and a single parser for graph-based results
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
NTriples in RDF1.1 are utf8 encoded.
This is backwards compatible, but you can have nicer output if you
know the consumer will support nt11/utf-8
Fixes #695
|
| |
|
|
|
|
|
| |
Also cleaned up N3 parser a bit, and added a Turtle flag, so that
special N3 features are not accepted when parsing as turtle.
Fixes #273 - now we should add some tests :)
|
| | |
|
| |
|
|
| |
related to #277
|
| |\
| |
| | |
Register parsers and serializers with mime-type
|
| | |
| |
| |
| |
| | |
Like this it is now possible to use mime-types for the format argument
of Graph.parse and Graph.serialize.
|
| |/ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$ flake8 rdflib --exclude=pyRdfa,host,extras,transform,rdfs,pyMicrodata
rdflib/graph.py:192: W801 redefinition of unused 'BytesIO' from line 189
rdflib/graph.py:194: W402 'BytesIO' imported but unused
rdflib/graph.py:680:80: E501 line too long (80 > 79 characters)
rdflib/graph.py:682:80: E501 line too long (80 > 79 characters)
rdflib/graph.py:686:80: E501 line too long (83 > 79 characters)
rdflib/graph.py:690:80: E501 line too long (83 > 79 characters)
rdflib/graph.py:692:80: E501 line too long (83 > 79 characters)
rdflib/graph.py:695:80: E501 line too long (83 > 79 characters)
rdflib/graph.py:698:80: E501 line too long (83 > 79 characters)
rdflib/parser.py:21: W801 redefinition of unused 'BytesIO' from line 19
rdflib/compat.py:12: W801 redefinition of unused 'defaultdict' from line 10
rdflib/py3compat.py:10: W801 redefinition of unused 'wraps' from line 7
rdflib/py3compat.py:81: W806 redefinition of function 'b' from line 44
rdflib/py3compat.py:87: W806 redefinition of function 'format_doctest_out' from line 50
rdflib/py3compat.py:97: W806 redefinition of function 'type_cmp' from line 61
rdflib/term.py:54: W801 redefinition of unused 'md5' from line 52
rdflib/store.py:73: W801 redefinition of unused 'BytesIO' from line 71
rdflib/query.py:10: W801 redefinition of unused 'BytesIO' from line 8
rdflib/__init__.py:73: W402 'plugin' imported but unused
rdflib/__init__.py:74: W402 'query' imported but unused
rdflib/util.py:43: W806 redefinition of function 'sign' from line 50
rdflib/plugins/parsers/hturtle.py:25: W801 redefinition of unused 'html5lib' from line 24
rdflib/plugins/parsers/ntriples.py:141: W402 'BytesIO' imported but unused
rdflib/plugins/parsers/structureddata.py:23: W801 redefinition of unused 'html5lib' from line 22
|
| | |
|
| |
|
|
| |
'structured data' parser as a separate branch. The code is, hopefully, prepared for Python 3, too, though no proper testing can be done due to the missing Python 3 version of the html5 parser.
|
| |
|
|
| |
Test fixes.
|
| |
|
|
| |
https://github.com/mammadori/rdflib/commit/494429bfad09532b33eee49d197cba997b59f277
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
as plugin points
|
| |
|
|
| |
Moving parsers and serializer implementations into rdflib.plugins package
|
| | |
|
| |
|
|
| |
Moving to rdfextra for the time being
|
| |
|
|
| |
with known_issue and sparql
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
moved rdfxml parser bits into module of that name
|
| | |
|
| |
|
|
| |
Fixes issue 59
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- only generate prefixes for predicates (thus much less gratuitous);
- use prefix if bound uri is used as subject or object (common in ontologies);
- prefixes are used for datatypes (if bound in the graph);
- integer and float literals are outputted as is (as supported by turtle and n3);
- prepared to use plain boolean literals in place (not active since the n3 parser doesn't yet support those..);
- for "rdf:nil" (the empty list), "()" is used;
- for n3 only, "=" is used for "owl:sameAs", and "=>" for log:implies;
- 4 space indents (not 5) and no spurious trailing spaces;
- space before periods;
- no newline before @prefix declarations, one after;
- added serializer flag "spacious" (defaults to False); if True:
- use two newlines after prefix declarations
- one extra newline at end of document
- top-level bnodes as "[]" instead of surrounding statements;
- nested bnodes start with "[ ", ends with " ]";
- some space/indent tweaks for n3 graph literals .
Changes to other parts:
- Added some more n3 test files and altered some n3 test code.
- The "n3()" method of "term.Literal" now uses the new "_literal_n3" method, which takes some optional parameters and is used directly by the turtle+n3 serializers.
- Added a bunch of doctests in Literal's "n3" and "_literal_n3".
- Registered "turtle" as a serialization format (due to the tokens ("=", "=>") supported by N3 but not by Turtle).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
permission to do so by Ivan Herman).
The changes in short are:
* Removed "rdflib/syntax/parsers/RDFaParser.py".
* Added new new "rdflib/syntax/parsers/rdfa/" *package* (new RDFaParser in "__init__.py").
* Adapted "rdflib/plugin.py" to use new parser.
Code is mainly copied verbatim from pyRdfa, with some minor cleanup and documentation adaptation.
Tests have been adapted:
* Removed old "test/test_rdfa.py" and "test/{ntriples,rdfdiff}.py" (only used by old test).
* Removed old files in "test/rdfa" and added a new test module along with a subdir containing a copy the W3C RDFa testsuite.
Furthermore: the class "IsomorphicTestableGraph" has been moved from "test_sparql/BisonSPARQLParser/test.py" to a new module "rdflib.graphutils", and renamed to "IsomorphicGraph".
(.. Note: IsomorphicGraph is currently used to make up for sparql bugs which cause some tests to fail where they should not. As of this change, all rdfa tests pass.)
(.. Also note that the "BisonSPARQLParser/test.py" didn't work before and still doesn't.)
|
| |
|
|
| |
backend.
|
| |
|
|
| |
layout.
|
| |
|
|
| |
fixes along the way
|
| | |
|