summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1682 from aucampia/iwana-20220122T0047-term_class_diagmasterNicholas Car2022-01-226-9/+89
|\ | | | | Add a class diagram for terms.
| * Add a class diagram for terms.Iwan Aucamp2022-01-226-9/+89
|/ | | | | | | | | | | | | | | | | The diagram is based on the diagram created by Graham Higgins (@gjhiggins) in https://github.com/RDFLib/rdflib/issues/1526 This shows the class heirarchy of various terms such as Identifier, IdentifiedNode, URIRef, Literal, etc. The diagram is in [plantuml](https://plantuml.com/class-diagram) and compiled to svg by the [kroki extension for sphinx](https://github.com/sphinx-contrib/kroki). Diagrams can be rendered from the plantuml at https://kroki.io/. Other changes: - Some updates to the "Writing RDFLib Documentation" page.
* Merge pull request #1681 from aucampia/iwana-20220120T2304-namespace_typingNicholas Car2022-01-212-50/+78
|\ | | | | Add typing to rdflib.namespace
| * Add typing to rdflib.namespaceIwan Aucamp2022-01-202-50/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Everything is as typed as it can be in here, there is maybe some improvement that can be made to `__new__` in some places but I think there may be some runtime changes needed there so I don't want to change that now, the inferred return types are close enough. Some of the type hints are based on pytest-monkeytype output which was slightly tuned for simplicity and with some additional typing for methods that are not being tested. This changeset contains type changes only and does not change runtime behaviour.
* | Merge pull request #1680 from ajnelson-nist/add_identified_nodeNicholas Car2022-01-213-31/+28
|\ \ | |/ |/| Add IdentifiedNode abstract intermediary class
| * Add IdentifiedNode abstract intermediary classAlex Nelson2022-01-183-31/+28
|/ | | | | | | | | | | | | | | | | This patch adds and exposes an intermediary class `IdentifiedNode` as a superclass of `URIRef` and `BNode`. From review of the subclass methods for identical implementations, two appeared to be able to move into this superclass. Thanks to Nicholas Car for finding this pragmatic name. This patch addresses at least some of Issue 1526. References: * https://github.com/RDFLib/rdflib/issues/1526 Cc: Nicholas Car <nicholas.car@surroundaustralia.com> Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
* Merge pull request #1675 from RDFLib/dependabot/pip/sphinx-4.4.0Nicholas Car2022-01-181-1/+1
|\ | | | | Bump sphinx from 4.3.2 to 4.4.0
| * Bump sphinx from 4.3.2 to 4.4.0dependabot/pip/sphinx-4.4.0dependabot[bot]2022-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 4.3.2 to 4.4.0. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/4.x/CHANGES) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v4.3.2...v4.4.0) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
* | Merge pull request #1677 from aucampia/iwana-20220117T0015-prefix_dotNicholas Car2022-01-183-0/+7
|\ \ | | | | | | Add a test case for a prefix followed by dot in Turtle format
| * | Add a test case for a prefix followed by dot in Turtle formatIwan Aucamp2022-01-183-0/+7
|/ /
* | Merge pull request #1663 from aucampia/iwana-20220112T2104-fix_nt_unquoteIwan Aucamp2022-01-1829-85/+899
|\ \ | |/ |/| Merging without second review as this is extensively tested against crafted expectations and the turtle parser which uses different code for unquoting.
| * Eliminate the use of `str.translate` in unquotingIwan Aucamp2022-01-162-5/+3
| | | | | | | | | | | | `str.translate` is not faster than dict lookup for this case, which is a one char lookup. For more info see https://github.com/RDFLib/rdflib/pull/1663#issuecomment-1013923380
| * typosNicholas Car2022-01-161-2/+2
| |
| * Fixed the handling of escape sequences in the ntriples and nquads parsers.Iwan Aucamp2022-01-1529-85/+901
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | These parsers will now correctly handle strings like `"\\r"`. The time it takes for these parsers to parse strings with escape sequences will be increased, and the increase will be correlated with the amount of escape sequences that occur in a string. For strings with many escape sequences the parsing speed seems to be almost 4 times slower. Also: - Add graph variant test scaffolding. Multiple files representing the same graph can now easily be tested to be isomorphic by just adding them in `test/variants`. - Add more things to `testutils.GraphHelper`, including some methods that does asserts with better messages. Also include some tests for GraphHelper. - Add some extra files to test_roundtrip, set the default identifier when parsing, and change verbose flag to rather be based on debug logging. - move one test from `test/test_issue247.py` to variants. - Fix problems with `.editorconfig` which prevents it from working properly. - Add xfail tests for a couple of issues This includes xfails for the following issues: - https://github.com/RDFLib/rdflib/issues/1216 - https://github.com/RDFLib/rdflib/issues/1649
* Merge pull request #1651 from aucampia/iwana-20211230T2020-code_of_conductNicholas Car2022-01-155-1/+137
|\ | | | | Add Contributor Covenant Code of Conduct
| * Add Contributor Covenant Code of ConductIwan Aucamp2022-01-085-1/+137
| | | | | | | | | | | | | | | | | | | | | | | | This is prompted by @westurner's comments on [rdflib-dev](https://groups.google.com/g/rdflib-dev/c/mdd7rxL9_8I). The code of conduct is added as markdown so that GitHub recognizes it (see https://github.com/github/feedback/discussions/9442). Also: - Add myst-parser in docs extras so that we can compile the code of conduct into docs.
* | Merge pull request #1659 from gtfierro/fix-issue-1492Nicholas Car2022-01-152-7/+16
|\ \ | | | | | | Make unregister_custom_function idempotent
| * | fix testGabe Fierro2022-01-131-1/+1
| | |
| * | use simplified implementation of function; change test name to be more ↵Gabe Fierro2022-01-132-5/+11
| | | | | | | | | | | | descriptive
| * | make unregister_custom_function idempotent by raising warning, not exceptionGabe Fierro2022-01-102-3/+6
| | |
* | | Merge pull request #1667 from aucampia/iwana-20220114T2226-fix_importNicholas Car2022-01-151-1/+1
|\ \ \ | | | | | | | | Eliminate star import
| * | | Eliminate star importIwan Aucamp2022-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | This breaks pycln which I'm trying to integrate with pre-commit in a separate branch.
* | | | Merge pull request #1656 from RDFLib/roundtrip_hextNicholas Car2022-01-155-12/+153
|\ \ \ \ | |/ / / |/| | | Allow hext to participate in RDF format roundtripping
| * | | Update rdflib/plugins/parsers/hext.pyNicholas Car2022-01-151-1/+1
| | | | | | | | | | | | Co-authored-by: Iwan Aucamp <aucampia@gmail.com>
| * | | Merge pull request #1657 from aucampia/iwana-20220109T1436-roundtrip_hext_fixesroundtrip_hextNicholas Car2022-01-100-0/+0
| |\ \ \ | | | | | | | | | | One typing fix and removal of redundant casts
| | * | | One typing fix and removal of redundant castsIwan Aucamp2022-01-092-10/+7
| | | | |
| * | | | Update rdflib/plugins/parsers/hext.pyNicholas Car2022-01-101-1/+1
| | | | | | | | | | | | | | | Co-authored-by: Iwan Aucamp <aucampia@gmail.com>
| * | | | Update rdflib/plugins/serializers/hext.pyNicholas Car2022-01-101-1/+1
| | | | | | | | | | | | | | | Co-authored-by: Iwan Aucamp <aucampia@gmail.com>
| * | | | Update rdflib/plugins/parsers/hext.pyNicholas Car2022-01-101-3/+1
| | | | | | | | | | | | | | | Co-authored-by: Iwan Aucamp <aucampia@gmail.com>
| * | | | Update rdflib/plugins/parsers/hext.pyNicholas Car2022-01-101-3/+1
| | | | | | | | | | | | | | | Co-authored-by: Iwan Aucamp <aucampia@gmail.com>
| * | | | Update rdflib/plugins/parsers/hext.pyNicholas Car2022-01-101-1/+1
| | | | | | | | | | | | | | | Co-authored-by: Iwan Aucamp <aucampia@gmail.com>
| * | | | Update rdflib/plugins/parsers/hext.pyNicholas Car2022-01-101-1/+1
| | | | | | | | | | | | | | | Co-authored-by: Iwan Aucamp <aucampia@gmail.com>
| * | | | Update rdflib/plugins/serializers/hext.pyNicholas Car2022-01-101-0/+1
| |/ / / | | | | | | | | Co-authored-by: Iwan Aucamp <aucampia@gmail.com>
| * | | allow hext to participate in RDF format roundtrippingnicholascar2022-01-095-16/+160
| | |/ | |/|
* | | Merge pull request #1660 from aucampia/iwana-20220110T2208-remove_narrowNicholas Car2022-01-132-36/+0
|\ \ \ | | | | | | | | Remove narrow build detection
| * | | Delete test_wide_python.pyNicholas Car2022-01-111-13/+0
| | | | | | | | | | | | Deleting this test to complete removal of narrow/wide distinction
| * | | Remove narrow build detectionIwan Aucamp2022-01-101-23/+0
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before Python 3.3 and [PEP 393](https://www.python.org/dev/peps/pep-0393/) (which came in with Python 3.3) there was a distinction between narrow and wide python builds. However this is no longer the situation, and `chr(0x10FFFF)` should not raise `ValueError` on any python build. From [PEP 393](https://www.python.org/dev/peps/pep-0393/): > The Unicode string type is changed to support multiple internal > representations, depending on the character with the largest Unicode > ordinal (1, 2, or 4 bytes). This will allow a space-efficient > representation in common cases, but give access to full UCS-4 on all > systems. For compatibility with existing APIs, several representations > may exist in parallel; over time, this compatibility should be phased > out. The distinction between narrow and wide Unicode builds is dropped. From [Python 3.7 docs for Unicode Objects and Codecs](https://docs.python.org/3.7/c-api/unicode.html) docs regarding `Py_UNICODE`: > Changed in version 3.3: In previous versions, this was a 16-bit type > or a 32-bit type depending on whether you selected a “narrow” or “wide” > Unicode version of Python at build time.
* | | Merge pull request #1647 from gjhiggins/conjunctive-graph-operators-testNicholas Car2022-01-102-0/+144
|\ \ \ | | | | | | | | add test of ConjunctiveGraph operators
| * | | Update test/test_conjunctivegraph_operator_combinations.py Graham Higgins2022-01-061-10/+10
| | | | | | | | | | | | | | | | | | | | thanks! Co-authored-by: Iwan Aucamp <aucampia@gmail.com>
| * | | add test of ConjunctiveGraph operators, clarify the situation w.r.t issue #225Graham Higgins2022-01-062-0/+144
| | | |
* | | | Merge pull request #1653 from aucampia/iwana-20220108T1650-nquads_suffixNicholas Car2022-01-102-0/+3
|\ \ \ \ | |_|_|/ |/| | | add nquads to recognised file extensions
| * | | Add tests for nquads suffixIwan Aucamp2022-01-081-0/+2
| | | |
| * | | add nquads to recognised file extensionsGraham Higgins2022-01-081-0/+1
| | |/ | |/|
* | | Merge pull request #1652 from ↵Nicholas Car2022-01-101-11/+0
|\ \ \ | | | | | | | | | | | | | | | | aucampia/iwana-20220108T1634-dont_change_suffix_map Don't update `SUFFIX_FORMAT_MAP` in `plugins/parsers/jsonld.py`
| * | | Don't update `SUFFIX_FORMAT_MAP` in `plugins/parsers/jsonld.py`Iwan Aucamp2022-01-081-11/+0
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | `jsonld` will already be in `SUFFIX_FORMAT_MAP`, so the code being removed here should have no effect. There are already tests for this and the tests would fail of the removed code did anything, see: https://github.com/RDFLib/rdflib/blob/b2fdaf5a1f45c09694dbd8925ab6b6dee84436b4/test/test_parse_file_guess_format.py#L23-L34
* | | Merge pull request #1654 from gjhiggins/change-tests-to-use-urn-exampleNicholas Car2022-01-107-79/+79
|\ \ \ | |/ / |/| | change tests to use urn:example
| * | change tests to use urn:exampleGraham Higgins2022-01-087-79/+79
|/ /
* | fix typos in READMEnicholascar2022-01-071-3/+3
|/
* Merge pull request #1645 from GreenfishK/translate_algebra_testsNicholas Car2022-01-066-8/+53
|\ | | | | added three tests to cover changes made by the pull request #1361
| * Update rdflib/plugins/sparql/algebra.py Filip Kovacevic2022-01-061-1/+0
| | | | | | | | | | removing logging Co-authored-by: Iwan Aucamp <aucampia@gmail.com>