summaryrefslogtreecommitdiff
path: root/rdflib/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1456 from newinnovations/masterNicholas Car2021-11-211-0/+2
|\ | | | | Fix JSON-LD data import adds trailing slashes to IRIs (#1443)
| * Fix JSON-LD data import adds trailing slashes to IRIs (#1443)Martin van der Werff2021-10-281-0/+2
| | | | | | | | In norm_url leave url alone if it already contains a scheme/protocol.
* | Merge pull request #1452 from iafork/iwana-20211018T2122-pytestNicholas Car2021-11-191-1/+1
|\ \ | | | | | | Migrate from nosetest to pytest
| * | Migrate from nosetest to pytestIwan Aucamp2021-10-241-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replace all uses of nose with pytest. It also includes a pytest plugin for creating EARL reports for tests with a `rdf_test_uri` parameter. Some caveats: - HTML report directory is now htmlcov instead of coverage - There is some warning related to the EARL reporting plugin which I can't quite figure out: ``` .venv/lib64/python3.7/site-packages/_pytest/config/__init__.py:676 /home/iwana/sw/d/github.com/iafork/rdflib/.venv/lib64/python3.7/site-packages/_pytest/config/__init__.py:676: PytestAssertRewriteWarning: Module already imported so cannot be rewritten: test.earl self.import_plugin(import_spec) ``` This is not causing any problems as far as I can tell, but still annoying. - python setup.py test won't work anymore, I can make it work but this is not advised by pytest: https://github.com/pytest-dev/pytest-runner/#deprecation-notice - run_test.py is still there but it's not really referenced anymore from anywhere and the options it accepts are completely different as it's options were based on nose. I would say it should be removed entirely but for now it is basically just a wrapper around pytest that basically does nothing. - Removed references to test attributes as currently they are not being used anywhere anyway, I guess we can add them back if there is some use for them later. - A lot of tests are still marked to skip when really they should be marked with xfail. This is also affecting the RDFT test manifests and result in reports saying tests are skipped when really we know they will fail and they are only skipped for this reason. But there is no change here from before, and pytest makes it easier to dynamically do expected failures. Special thanks to Wes Turner for his advice and inputs on this process.
* | Add import of osGraham Higgins2021-11-151-0/+1
|/ | | | | | | | File "../test_magic_set.py", line 64, in test_AdornLiteral res = translateAlgebra(translateQuery(parsed_query)) File ".../rdflib/plugins/sparql/algebra.py", line 1427, in translateAlgebra os.remove("query.txt") name 'os' is not defined
* Merge pull request #1445 from Panaetius/masterNicholas Car2021-10-181-5/+12
|\ | | | | replace pkg_resources with importlib.metadata
| * Use version conditional imports to accomodate mypyIwan Aucamp2021-10-171-3/+4
| | | | | | | | | | | | | | | | | | | | | | This will eliminate these errors: ``` + mypy --show-error-context --show-error-codes rdflib rdflib/plugin.py:114: error: Module "importlib.metadata" has no attribute "entry_points" [attr-defined] rdflib/plugins/sparql/__init__.py:44: error: Module "importlib.metadata" has no attribute "entry_points" [attr-defined] Found 2 errors in 2 files (checked 110 source files) ```
| * replace pkg_resources with importlib.metadataRalf Grubenmann2021-10-141-3/+9
| |
* | Merge branch 'master' into ttl2ttl2Nicholas Car2021-10-177-22/+22
|\ \
| * | Fix typos discovered by codespellChristian Clauss2021-10-147-22/+22
| |/
* | updated commentsNicholas Car2021-10-021-36/+9
| |
* | PEP8 onlyNicholas Car2021-10-021-0/+1
| |
* | complete turtle2 serializer with testsNicholas Car2021-10-021-0/+331
|/
* Merge pull request #1407 from iafork/iwana-20210910T2303Nicholas Car2021-09-277-16/+21
|\ | | | | Fix mypy type errors and add mypy to .drone.yml
| * Fix mypy type errors and add mypy to .drone.ymlIwan Aucamp2021-09-107-16/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #1311 Add `mypy` to .drone.yml and fix type errors that come up. Not type checking examples or tests. Other changes: - fix return value for `Graph.serialize` (refs #1394) - remove default value for `rdflib.plugins.sparql.algebra.translateAlgebra` (refs #1322) - add .dockerignore to reduce context size and make docker quicker to run. - add .flake8 config to ignore line length as black is managing formatting. - add mypy to docker-compose, makefile and tox.ini - fix the way csv2rdf is invoked to ensure that the right code gets executed.
* | Use setName on TokenConverter to set the name propertyIwan Aucamp2021-09-111-7/+2
|/ | | | | | This works for both pyparsing 2 and 3. Fixes #1370
* blacked everything6.0.0Nicholas Car2021-07-2014-250/+523
|
* admin scripts & release 6.0.0 bumpNicholas Car2021-07-203-26/+28
|
* Add __init__ for shared jsonld moduleNatanael Arndt2021-07-171-0/+0
|
* fix docc build warningsNicholas Car2021-07-152-0/+2
|
* Fix testsEdmond Chuc2021-07-151-1/+1
|
* Merge branch 'master' into hsolbrig/masterEdmond Chuc2021-07-149-23/+1624
|\ | | | | | | | | | | | | # Conflicts: # rdflib/namespace/__init__.py # rdflib/plugins/sparql/operators.py # test/test_namespace.py
| * Add unit tests for issue #1294 with @expectedFailureIwan Aucamp2021-07-131-5/+5
| | | | | | | | | | Also add type annotations to rdflib.compare to make it easier to understand the code.
| * Merge pull request #1354 from RDFLib/json_ld_11Nicholas Car2021-07-127-0/+1590
| |\ | | | | | | JSON-LD Integration
| | * remove bad doctest declarations that are no longer required, were causing ↵Ashley Sommer2021-07-092-8/+1
| | | | | | | | | | | | subsequent tests to fail
| | * re-blacked JSON-LD codeAshley Sommer2021-07-082-3/+9
| | |
| | * integrate jsonld code into rdflib coreAshley Sommer2021-07-077-0/+1591
| | |
| * | Merge pull request #1213 from kernc/ClosedNamespace_extends_strNicholas Car2021-07-121-1/+1
| |\ \ | | | | | | | | ENH: Make ClosedNamespace extend Namespace
| | * \ Merge remote-tracking branch 'origin/master' into ClosedNamespace_extends_strEdmond Chuc2021-07-0613-202/+714
| | |\ \ | | | |/ | | | | | | | | | | | | | | | | # Conflicts: # rdflib/namespace.py # test/test_namespace.py
| | * | Simplify statementEdmond Chuc2021-07-061-1/+1
| | | |
| | * | Minor refactor/restlye for Py3.6+Kernc2020-12-171-1/+1
| | | |
| * | | Fix typoIwan Aucamp2021-07-091-2/+2
| | | | | | | | | | | | | | | | NoteToSparql -> NodeToSparql
| * | | Add unit test for #919 and more type hints for sparqlconnector and sparqlstoreIwan Aucamp2021-07-072-23/+34
| | |/ | |/| | | | | | | Issue #919 is already fixed, this just confirms it.
* | | Refactor usage of rdf:langString.Edmond Chuc2021-07-091-5/+1
| | |
* | | Refactor for DefinedNamespace behaviourEdmond Chuc2021-07-081-1/+1
| | |
* | | Merge branch 'master' into hsolbrig/masterEdmond Chuc2021-07-0829-1078/+1832
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # rdflib/__init__.py # rdflib/compat.py # rdflib/namespace/__init__.py # rdflib/plugins/parsers/rdfxml.py # rdflib/plugins/serializers/rdfxml.py # rdflib/tools/csv2rdf.py # test/test_dawg.py # test/test_namespace.py # test/test_nt_misc.py # test/test_rdfxml.py # test/test_seq.py # test/test_trig.py # test/testutils.py
| * | Merge pull request #1154 from FlorianLudwig/support_date_typeNicholas Car2021-07-031-3/+15
| |\ \ | | | | | | | | support day, month and year function for date
| | * | reformat edited files using blackFlorian Ludwig2020-10-231-2/+1
| | | |
| | * | support day, nonth and year function for dateFlorian Ludwig2020-10-231-3/+16
| | | |
| * | | Merge branch 'master' into BerkeleyDBNicholas Car2021-07-022-4/+439
| |\ \ \
| | * \ \ Merge pull request #1322 from GreenfishK/translate_algebraNicholas Car2021-06-301-0/+430
| | |\ \ \ | | | | | | | | | | | | Implemented function translateAlgebra. This functions takes a SPARQL …
| | | * | | bugfix for HAVING and FILTER NOT EXISTS. Two new tests included to cover ↵GreenfishK2021-05-251-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | these bugfixes
| | | * | | Bugfix occurring with more complex queries that have multiple graph patterns ↵GreenfishK2021-05-201-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and solution modifiers. Added test (see test_integration__complex_query1.txt) A potential bug has been found which occurs when non-aggregation variables are translated into Aggregate-Sample by the translateQuery function. A back-translation of the algebra will get rid of the "sample aggregation function" but only in cases when variables are not bound (see test_integration__complex_query1.txt) and the code under "elif node.name == "AggregateJoin"" where I include a treatment for SAMPLE)
| | | * | | Implemented function translateAlgebra. This functions takes a SPARQL query ↵GreenfishK2021-05-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | algebra as an input and returns the query text. Tests are in test/translate_algebra. I did not follow any specific test framework like Nose but wrote my own one. Automated tests did not pass for python 3.7. Trying again
| | | * | | Implemented function translateAlgebra. This functions takes a SPARQL query ↵GreenfishK2021-05-181-0/+421
| | | | | | | | | | | | | | | | | | | | | | | | algebra as an input and returns the query text. Tests are in test/translate_algebra. I did not follow any specific test framework like Nose but wrote my own one.
| | * | | | Merge pull request #1340 from iafork/iwana-issue1336Nicholas Car2021-06-301-4/+9
| | |\ \ \ \ | | | | | | | | | | | | | | Fix SPARQL update parsing to handle arbitrary amounts of triples in inserts
| | | * | | | Fix SPARQL update parsing to handle arbitrary amounts of triples in insertsIwan Aucamp2021-06-201-4/+9
| | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pyparsing handling of recursive rules is limited by python's recursion limit and the rule that should handle multiple triples in data inserts is recursive. The consequence of this is that the amount of triples that can be inserted becomes limited by python's recursion limit. To address this the rule has been rewritten to not be recursive. @rchateauneu thanks for the help with rule rewriting.
| * | | | | Merge branch 'master' of https://github.com/RDFLib/rdflib into berkeleydbNicholas Car2021-06-286-19/+28
| |\ \ \ \ \ | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # docs/intro_to_sparql.rst # examples/conjunctive_graphs.py # examples/simple_example.py # examples/sleepycat_example.py # tox.ini
| | * | | | Merge pull request #1320 from rchateauneu/speedup_add_triple_contextNicholas Car2021-06-261-7/+16
| | |\ \ \ \ | | | | | | | | | | | | | | Speedup of __add_triple_context
| | | * | | | Speedup of __add_triple_contextRemi Chateauneu2021-05-171-7/+16
| | | |/ / /