summaryrefslogtreecommitdiff
path: root/docs
Commit message (Collapse)AuthorAgeFilesLines
* fix: correct imports and `__all__` (#2340)Iwan Aucamp2023-04-122-1/+51
| | | | | | | | Disable [`implicit_reexport`](https://mypy.readthedocs.io/en/stable/config_file.html#confval-implicit_reexport) and eliminate all errors reported by mypy after this. This helps ensure that import statements import from the right module and that the `__all__` variable is correct.
* docs: fix typo in security considerations documentationElliot Ford2023-04-071-1/+1
| | | Replaced "access" with "accessed".
* build: upgrade sphinx and change flake8 and related to only install on ↵Iwan Aucamp2023-03-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | python >=3.8 (#2288) The main aim of this change is to get to a newer version of Sphinx. However, if just Sphinx is upgraded, poetry can't do version solving because of the version of `importlib-metadata` that flake8 needs: ```console $ poetry install Updating dependencies Resolving dependencies... (0.6s) Because no versions of flakeheaven match >3.2.1,<4.0.0 and flakeheaven (3.2.1) depends on flake8 (>=4.0.1,<5.0.0), flakeheaven (>=3.2.1,<4.0.0) requires flake8 (>=4.0.1,<5.0.0). And because no versions of flake8 match >4.0.1,<5.0.0 and flake8 (4.0.1) depends on importlib-metadata (<4.3), flakeheaven (>=3.2.1,<4.0.0) requires importlib-metadata (<4.3). And because sphinx (5.3.0) depends on importlib-metadata (>=4.8) and no versions of sphinx match >5.3.0,<6.0.0, flakeheaven (>=3.2.1,<4.0.0) is incompatible with sphinx (>=5.3.0,<6.0.0). So, because rdflib depends on both sphinx (^5.3.0) and flakeheaven (^3.2.1), version solving failed. ``` To make things work, flake8 and related is only installed for Python >=3.8, where the built-in `importlib.metadata` is used instead of the `importlib-metadata` package. This means no more flake8 on python 3.7, but it is a reasonable trade-off to get to a newer version of Sphinx, and Python 3.7 support will be dropped by 2023-06-27 anyway. Other changes: - Changed Read the Docs to use the Sphinx version from poetry instead of the custom version that was in `devtools/requirements-rtd.txt`. - Added `typing-extensions` to the poetry `docs` dependency group as it is needed for docs to build correctly. - Changed the tox `docs` environment to be closer to the Read the Docs environment. Closes <https://github.com/RDFLib/rdflib/issues/2272>.
* docs: fix typo in NamespaceManager documentation (#2291)Charles Tapley Hoyt2023-03-191-1/+1
| | | Changed `cdterms` to `dcterms`, see <https://github.com/RDFLib/rdflib/issues/2196> for more info.
* chore: prepare for release 6.3.1 (#2285)6.3.1Iwan Aucamp2023-03-181-28/+38
| | | Update everything to reflect release version 6.3.1.
* docs: don't use kroki (#2284)Iwan Aucamp2023-03-174-63/+64
| | | | | | | | | The Kroki server is currently experiencing some issues which breaks our build, this change eliminates the use of Kroki in favour of directly using the generated SVG images which is checked into git alongside the PlantUML sources. I also added a task to the Taskfile to re-generate the SVG images from the PlantUML sources by calling docker.
* chore: prepare for release 6.3.0 (#2276)6.3.0Iwan Aucamp2023-03-161-1/+1
| | | | | Update the changelog and other parts to prepare for the 6.3.0 release. This will be tagged to 6.3.0.
* docs: document avaiable security measures (#2270)Iwan Aucamp2023-03-163-0/+142
| | | | | | | | | docs: document available security measures Several security measures can be used to mitigate risk when processing potentially malicious input. This change adds documentation about available security measures and examples and tests that illustrate their usage.
* build(deps-dev): bump black from 22.12.0 to 23.1.0 (#2248)dependabot[bot]2023-03-111-1/+1
|
* feat: add parser type hints (#2232)Iwan Aucamp2023-03-051-0/+1
| | | | | | | | | | | | | Add type hints to: - `rdflib/parser.py` - `rdflib/plugins/parser/*.py` - some JSON-LD utils - `rdflib/exceptions.py`. This is mainly because the work I'm doing to fix <https://github.com/RDFLib/rdflib/issues/1844> is touching some of this parser stuff and the type hints are useful to avoid mistakes. No runtime changes are included in this PR.
* build: move to poetry for dependency management; consolidate more settings ↵Jeffrey C. Lerman2023-01-174-53/+47
| | | | | | | | | | | | | | | | | | | | | | | into pyproject.toml (#2187) Replaced setuptools with poetry which provides simpler dependency management, dependency locking and virtual environment management. This makes it easier for new developers to get a sane development environment (i.e. just `poetry install`) and also makes our CI pipeline more reproducable as now most development tools and libraries will only change through dependabot which will reduce the build failures on main and make breaking changes in dependencies more visible with dependabot PRs. Other changes: - moved isort, mypy and coverage config from setup.cfg to pyproject.toml - Changes in the generated rdflib wheel: - removed wheel extras related to development (i.e. `tests`, `docs`, `dev`) as poetry dependency groups should be used instead. - Added an extra group `lxml` with a dependency on lxml. - Added version ranges to dependencies, and tests to ensure these version ranges are valid. - Changes to tests: - Change pyparsing related tests so they work with older pyparsing. - Made the html5lib related tests conditional on html5lib existing. - Runtime changes: - Use importlib.metadata to set `__version__`. - Changed the devcontainer and related config to avoid contamination and interference with the host environment. Co-authored-by: Iwan Aucamp <aucampia@gmail.com> Co-authored-by: Edmond Chuc <edmond.chuc@outlook.com>
* build: update black to 22.12.0 (#2186)Iwan Aucamp2022-12-272-2/+2
| | | | | | | Newer black is out. Other changes: - Set lower limit for sphinx to version 5 as version 4 causes problems with type hints.
* build: update black to 22.10.0 (#2163)Iwan Aucamp2022-11-191-1/+1
| | | Newer black is out.
* build(deps-dev): bump black from 22.6.0 to 22.8.0 (#2109)dependabot[bot]2022-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * build(deps-dev): bump black from 22.6.0 to 22.8.0 Bumps [black](https://github.com/psf/black) from 22.6.0 to 22.8.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/22.6.0...22.8.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Change black version in more places Found dangling references with this: ```bash grep --exclude-dir={.venv,.git,.tox,.mypy_cache,w3c,_build,rdflib.egg-info} -ri 22.6.0 ./ ``` Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Iwan Aucamp <aucampia@gmail.com>
* chore: rename default branch to `main` (#2101)Iwan Aucamp2022-09-048-64/+132
| | | | | | | | | | | | | | | | We are still using a somewhat outmoded name for our default branch, this PR captures the decision to change it as a decision record and prepares the rest of the repo for this change. Once merged, the main branch of RDFLib will be renamed using the procedure documented [here](https://github.com/github/renaming). Other changes: - Add area for decision records (this may be merged in another PR before this one). - Remove duplicated sections from `docs/upgrade4to5.rst` as they cause problems when using `sphinx.ext.autosectionlabel` and serve no purpose.
* docs: Add a contributing guide (#2082)Iwan Aucamp2022-08-232-0/+53
| | | | | | | | Added `docs/CONTRIBUTING.md` with some details of how to contribute to RDFLib. This file should be picked up by GitHub and satisfy one of the checklist items under the [Community Standards](https://github.com/RDFLib/rdflib/community) page.
* feat: Add type hints to rdflib.graph (#2080)Iwan Aucamp2022-08-231-4/+15
| | | | | | | | | | | | More or less complete type hints for the rdflib.graph module. Other changes: - Improved/simplified type hints in `rdflib.store` and store plugins. - Add type ignores for various type errors that occur with the type hints. This is split-off from <https://github.com/RDFLib/rdflib/pull/1850>. This PR does not change runtime behaviour.
* feat: add type hints for `rdflib.store` and `rdflib.plugins.stores` (#2057)Iwan Aucamp2022-07-301-0/+6
| | | | | | | | | | | | | | | | | | | | Add type hints and aliases for `rdflib.store` and `rdflib.plugins.stores` and also add a couple of more type hints and aliases to `rdflib.graph`. This PR contains no runtime changes. Other changes: - Changed some imports to be more specific (e.g. `import from rdflib.graph` instead of `import from rdflib`). This is to reduce the probability of circular imports. - Ignore `E231` (missing whitespace after ',') in flake8 as black is managing the whitespaces and seems to be bumping heads with flake8 with spaces after `,` sometimes. - Install `berkeleydb-stubs` when doing extensive testing with tox. - Added `devtools/diffrtpy.py` which is a script that can be used with `git difftool` to generate compact diffs for python code. This should make it a lot easier to review PRs that change type hints to verify that they don't have a runtime impact.
* build: Gitpod integration and Google Cloud Shell Button (#2034)Iwan Aucamp2022-07-201-2/+2
| | | | | | | | | | | | | | | | Add Gitpod integration mainly intended to make it easier for contributors to work with RDFLib. Other changes: - Add a button for Google cloud shell integration, it is maybe not as nice as Gitpod but it provides a lot more free hours than Gitpod and it does work with the devcontainer based workflow even if the editor does not integrate with devcontainers directly. - Removed additional python versions from the devcontainer dockerfile. This is mainly to make the devcontainer less unwieldy and quicker to build. - Slim down the devcontainer Dockerfile by removing some unneeded packages, this will make it faster to build.
* docs: fix sphinx nitpicky issues (#2036)Iwan Aucamp2022-07-1811-46/+84
| | | | | | | | | | | | | Enable nitpicky mode for Sphinx and fix all warnings and errors that occur when running with nitpicky enabled. Other changes: - Add a tox environment for building docs (-docs). This is so we can test building docs on various versions of python as there seems to be some differences in warnings between different versions. This tox environment is enabled for linux CI builds. - Change readthedocs to use python 3.9 as earlier versions do not handle `@typing.overload` with type aliases. - Fixes https://github.com/RDFLib/rdflib/issues/1878
* build: remove drone config (#2037)Iwan Aucamp2022-07-181-4/+4
| | | | | | | | Remove drone config so that drone does not run anymore as it is not doing anything that GitHub Actions does not do while GitHub Actions does many things that drone does not do, and it does it mostly by invoking go-task. - See also https://github.com/RDFLib/rdflib/discussions/1669
* Prepare for 6.2.0 release (#2023)6.2.0Iwan Aucamp2022-07-161-1/+1
| | | | | | This should bring master branch to a point where we can tag and publish 6.2.0. Co-authored-by: Edmond Chuc <37032744+edmondchuc@users.noreply.github.com>
* Update black to 22.6.0 (#2015)Iwan Aucamp2022-07-131-1/+1
| | | | Update black to 22.6.0 in all places where the version is specified to ensure we are using the latest version.
* Merge pull request #1975 from RDFLib/dependabot/pip/sphinx-lt-6Natanael Arndt2022-06-201-1/+1
|\ | | | | Update sphinx requirement from <5 to <6
| * Update sphinx requirement from <5 to <6dependabot[bot]2022-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates the requirements on [sphinx](https://github.com/sphinx-doc/sphinx) to permit the latest version. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/5.x/CHANGES) - [Commits](https://github.com/sphinx-doc/sphinx/compare/v0.1.61611...v5.0.0) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
* | correct italic markup in plugin stores docs (#1977)Elliot Ford2022-06-041-2/+2
|/
* style: enable and baseline flakeheaven (#1928)Iwan Aucamp2022-05-151-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | * Enable and baseline flakeheaven This patch adds flakeheaven with a baseline, the baseline ignores all existing errors and only reports on new errors. The benefit with this approach is that we can get full flake8 on new changes without having to first address the flake8 warnings with our existing codebase. Baselined errors can still be seen with: - `flakeheaven lint --baseline /dev/null` - `flake8` This also adds a flakeheaven to GitHub Actions in a way which will result in independent reporting. Other changes: - Simplified caching behaviour in GitHub Actions - Removed flake8-black because it does not work well https://github.com/peterjc/flake8-black/issues/59 - Remove redundant/duplicated config for flake8 Co-authored-by: Christian Clauss <cclauss@me.com>
* test: run doctest on rst files in `docs/` (#1875)Iwan Aucamp2022-05-041-3/+3
| | | | | | | | | | | Currently there are only two files with doctests inside, but it is best that we always run doctests just to ensure things are sane. Other changes: - added `doctest: +SKIP` to make doctests inside `docs/rdf_terms.rst` pass. Fixes https://github.com/RDFLib/rdflib/issues/1791
* build: add Taskfile with development tasks (#1867)Iwan Aucamp2022-04-301-0/+99
| | | | | | | | | | | | | | | | | | | | | | | Added Taskfile with development tasks This patch adds a Taskfile with various tasks that is useful for RDFLib development. Details of the available tasks can be seen from `task help` output and some more information is included in the RDFLib developers guide. For more information about Taskfiles see https://taskfile.dev/#/usage. The GitHub action pipeline was also changed to now use tasks from the Taskfile which simplifies the pipeline quite a bit. This patch also adds development container which can be used to run various development task and which can also be used with development container enabled tools such as VSCode or GitHub codespaces. This is all being done in preperation for moving coveralls reporting to the GitHub actions workflow. Other changes: - Removed the `Makefile` and associated `test/Dockerfile` as it is now replaced by a `Taskfile.yml`.
* Also remove `examples/film.py` from docsIwan Aucamp2022-04-241-7/+0
|
* docs: switch to sphinx-autodoc-typehintsIwan Aucamp2022-04-192-1/+7
| | | | | | | | | | | | | | | | | | | | Currently rdflib is relying on sphinx-autodoc's built in handling for type hints, this however has some deficiencies as it does not handle stuff inside `if TYPE_CHECKING:` and thus only work in cases where there are no potential for circular dependencies. This patch changes sphinx to use sphinx-autodoc-typehints instead, the documentation generated by this plugin looks slightly different but as a positive it correctly works with things defined inside `if TYPE_CHECKING:` guards. Also: - moved the `_NamespaceSetString` type alias to `rdflib._type_checking` This is so that `sphinx-autodoc-typehints` recognizes it up, as it does not handle type aliases that are defined inside `if TYPE_CHECKING:` guards in imported files. - remove sphinx requirements from requirements.dev.txt and replaced it with -r docs/sphinx-requirements.txt to reduce redundancy.
* docs: change term reference to italicizedIwan Aucamp2022-04-151-2/+2
| | | | | | For `:term:` to work there must be a corresponding glossary error, this is currently resulting in a warning and just being passed through as plain text, changing it to italicized as that seems more appropriate.
* Merge remote-tracking branch 'upstream/master' into default_prefixesIwan Aucamp2022-04-151-1/+1
|\
| * [pre-commit.ci] auto fixes from pre-commit.com hookspre-commit-ci[bot]2022-04-151-1/+1
| | | | | | | | for more information, see https://pre-commit.ci
* | Merge branch 'master' into default_prefixesNicholas Car2022-04-153-2/+9
|\ \ | |/
| * docs: fix sphinx warningsIwan Aucamp2022-04-143-60/+66
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes all sphinx warnings and also changes sphinx building to treat warnings as errors so that we don't introduce new warnings. Also: - ci: fail on sphinx warnings. - ci: don't use GitHub actions to build docs as this is being done by readthedocs.org. - build: supress "more than one target found for cross-reference" warnings from sphinx autodoc.
* | Update docs/namespaces_and_bindings.rstNicholas Car2022-04-051-1/+1
| | | | | | Co-authored-by: Iwan Aucamp <aucampia@gmail.com>
* | Merge remote-tracking branch 'upstream/master' into default_prefixesIwan Aucamp2022-04-041-1/+1
|\ \ | |/
| * Update to black 22.3.0 because of issue with click (#1780)Iwan Aucamp2022-03-301-1/+1
| | | | | | | | | | | | See this https://github.com/psf/black/pull/2966 Also simplified pre-commit config of black based on a suggestion from https://github.com/jack1142 in https://github.com/psf/black/issues/2493#issuecomment-1081987650
* | ensure all core Stores contain prefix replace optionnicholascar2022-03-302-2/+17
| |
* | 'none' optionnicholascar2022-03-281-21/+71
| |
* | docco improvementsnicholascar2022-03-271-1/+1
| |
* | Merge branch 'master' into default_prefixesnicholascar2022-03-275-13/+190
|\ \ | |/
| * Add pull request guidelines and template.Iwan Aucamp2022-03-191-1/+51
| | | | | | | | | | This is mainly to help people understand how we process PRs and what they can do to make it more likely for their PRs to be processed qickly.
| * Merge pull request #1691 from aucampia/iwana-20220124T2147-better_toxNicholas Car2022-03-181-8/+13
| |\ | | | | | | Improved tox config
| | * Improved tox configIwan Aucamp2022-03-161-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removed some redundant options. - Created a covreport environment for reporting coverage for all environments. - Make it possible to run a custom command instead of pytest. - Make it possible to run an extra command - Make it possible to change the mypy command - Use extras instead of using requirements files. - Improve rebuild speed of docs environment by not using an ephemeral doctree dir. Also: - Update setup.py - Remove berkleydb and networkx from tests_require and tests extra group as they are not always needed for tests. - Added separate extra groups for berkleydb and networkx - Added a dev extras group with dev tools. - Update github actions - Use tox to run tests. - Run flake8 only once instead of for every OS and python version. - Change docs job to rather be more generic for potential future tox environments.
| * | Fix black version in developers.rsteggplants2022-03-171-1/+1
| | |
| * | Use a fixed version of black instead of a range.Iwan Aucamp2022-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seems at least for me black wants an exact version ```console $ .venv/bin/black --version black, 22.1.0 (compiled: yes) $ .venv/bin/black rdflib Oh no! 💥 💔 💥 The required version `22` does not match the running version `22.1.0`! $ .venv/bin/black --required-version 22 rdflib Oh no! 💥 💔 💥 The required version `22` does not match the running version `22.1.0`! $ .venv/bin/black --required-version 22.1.0 rdflib All done! ✨ 🍰 ✨ 116 files left unchanged. ``` Also revert back to the local hook for pre-commit as this is needed when using a fixed version.
| * | Merge remote-tracking branch 'upstream/master' into fix_blackIwan Aucamp2022-03-162-0/+122
| |\ \ | | |/
| | * Merge pull request #1751 from aucampia/iwana-20220227T2010-doc_type_hintsIwan Aucamp2022-03-152-0/+122
| | |\ | | | | | | | | | | | | | | | | Add documentation about type hints CI errors are unrelated to changes and are fixed in https://github.com/RDFLib/rdflib/pull/1759