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

Introduce tox #244

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Introduce tox #244

wants to merge 2 commits into from

Conversation

kurtmckee
Copy link
Contributor

@kurtmckee kurtmckee commented Dec 23, 2024

This PR introduces a tox configuration that standardizes all of the project testing using tox.

It does not eliminate the Makefile, but pushes all of the work into the tox configuration so that all platforms (whether Linux, macOS, or Windows) and runner environments (whether locally or in CI) are running the test suite in the same way.

Commit highlights

  • Add pyright as a dev dependency.

  • Add tox configurations that run pyright and mkdocs on Python 3.10.

    This matches the Python version currently used in CI.

  • Add a tox config to run the test suite against Python 3.10+.

  • Fix a CLI rendering test on Windows.

  • Update CI to install tox and tox-uv.

  • Use tox to execute the test suite in CI.

    This ensures that CI and local testing mirror each other.

Decisions made

  • tox-uv (and thus, tox) is not added as a dev dependency.

    tox-uv depends on uv, which would add uv
    as a locked dependency in uv.lock.
    This seems circular, so tox-uv is not a dev dependency.

  • The mkdocs --strict mode appears to work similar to
    the existing architecture in CI, which greps CLI output
    for the would "ERROR".

    However, it may be that --strict mode fails fast,
    so this might not be strictly equivalent to output grepping.

  • Coverage files are no longer stored in coverage/;
    they are instead stored in .coverage* files.

    This is not a deliberate decision, but a side-effect.

Closes #234

@kurtmckee kurtmckee force-pushed the tox-issue-234 branch 5 times, most recently from 287f27a to 6626240 Compare December 23, 2024 22:08
Commit highlights
-----------------

* Add pyright as a dev dependency.
* Add tox configurations that run pyright and mkdocs on Python 3.10.

  This matches the Python version currently used in CI.

* Add a tox config to run the test suite against Python 3.10+.
* Fix a CLI rendering test on Windows.
* Update CI to install tox and tox-uv.
* Use tox to execute the test suite in CI.

  This ensures that CI and local testing mirror each other.

Decisions made
--------------

* tox-uv (and thus, tox) is not added as a dev dependency.

  tox-uv depends on uv, which would add uv
  as a locked dependency in `uv.lock`.
  This seems circular, so tox-uv is not a dev dependency.

* The mkdocs ``--strict`` mode appears to work similar to
  the existing architecture in CI, which greps CLI output
  for the would "ERROR".

  However, it may be that ``--strict`` mode fails fast,
  so this might not be strictly equivalent to output grepping.

* Coverage files are no longer stored in `coverage/`;
  they are instead stored in `.coverage*` files.

  This is not a deliberate decision, but a side-effect.

Closes zmievsa#234
@zmievsa
Copy link
Owner

zmievsa commented Dec 30, 2024

Hi! Thanks for publishing! Still looking into it but can't guarantee when I'll be able to get to it due to holidays.

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.

Would you be open to accepting a PR to introduce tox?
2 participants