| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
Replaced "access" with "accessed".
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>.
|
| |
|
| |
Changed `cdterms` to `dcterms`, see <https://github.com/RDFLib/rdflib/issues/2196> for more info.
|
| |
|
| |
Update everything to reflect release version 6.3.1.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Update the changelog and other parts to prepare for the 6.3.0 release.
This will be tagged to 6.3.0.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
Newer black is out.
Other changes:
- Set lower limit for sphinx to version 5 as version 4 causes problems
with type hints.
|
| |
|
| |
Newer black is out.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
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 in all places where the version is specified to ensure we are using the latest version.
|
| |\
| |
| | |
Update sphinx requirement from <5 to <6
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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`.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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.
|
| |\ |
|
| | |
| |
| |
| | |
for more information, see https://pre-commit.ci
|
| |\ \
| |/ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| | |
Co-authored-by: Iwan Aucamp <aucampia@gmail.com>
|
| |\ \
| |/ |
|
| | |
| |
| |
| |
| |
| | |
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
|
| | | |
|
| | | |
|
| | | |
|
| |\ \
| |/ |
|
| | |
| |
| |
| |
| | |
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.
|
| | |\
| | |
| | | |
Improved tox config
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- 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.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |\ \
| | |/ |
|
| | | |\
| | | |
| | | |
| | | |
| | | | |
Add documentation about type hints
CI errors are unrelated to changes and are fixed in https://github.com/RDFLib/rdflib/pull/1759
|