Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

text: fix pytest config #1846

Merged
merged 1 commit into from Apr 18, 2022

Conversation

aucampia
Copy link
Member

@aucampia aucampia commented Apr 18, 2022

Summary of changes

pytest was using config from tox.ini preferentially and ignoring config
from setup.cfg, as a side-effect doctests were not running on
code/docstrings in rdflib/.

The reason why some pytest config was in tox.ini instead of setup.cfg
was because of these issues:

As a compromise to fix this I have opted for moving all pytest config to
pyproject.toml:

This seems sensible as pyproject.toml is standarized by PEPs and
eventually most things from setup.cfg will end up in there anyway.

Also:

  • remove the pytest ignore on test/translate_algebra as tests in there
    have been running and passing for some time.
  • fixed path to test data in rdflib/plugins/parsers/nquads.py.

Checklist

  • Checked that there aren't other open pull requests for
    the same change.
  • Checked that all tests and type checking passes.
  • Considered granting push permissions to the PR branch,
    so maintainers can fix minor issues and keep your PR up to date.

@aucampia aucampia marked this pull request as draft April 18, 2022 09:25
@aucampia aucampia force-pushed the iwana-20220418T1104-clean_rdflib branch from 1008515 to 1a6bb34 Compare April 18, 2022 09:59
pytest was using config from `tox.ini` preferentially and ignoring config
from `setup.cfg`, as a side-effect doctests were not running on
code/docstrings in `rdflib/`.

The reason why some pytest config was in `tox.ini` instead of `setup.cfg`
was because of these issues:
- pypa/pip#5182
- pytest-dev/pytest#3062

As a compromise to fix this I have opted for moving all pytest config to
`pyproject.toml`:
- https://docs.pytest.org/en/stable/reference/customize.html#pyproject-toml

This seems sensible as `pyproject.toml` is standarized by PEPs and
eventually most things from `setup.cfg` will end up in there anyway.

Also:
- remove the pytest ignore on `test/translate_algebra` as tests in there
  have been running and passing for some time.
- fixed path to test data in `rdflib/plugins/parsers/nquads.py`.
@aucampia aucampia force-pushed the iwana-20220418T1104-clean_rdflib branch from 1a6bb34 to be32bb6 Compare April 18, 2022 12:44
@aucampia aucampia marked this pull request as ready for review April 18, 2022 12:52
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason why some pytest config was in tox.ini instead of setup.cfg
was because of these issues:

Ahh, so that's why. Definitely worth moving to pyproject.toml

@aucampia
Copy link
Member Author

Thanks for the review @gjhiggins

@aucampia aucampia merged commit e79c840 into RDFLib:master Apr 18, 2022
@aucampia aucampia deleted the iwana-20220418T1104-clean_rdflib branch May 7, 2022 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant