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

Would you be open to accepting a PR to introduce tox? #234

Open
kurtmckee opened this issue Dec 10, 2024 · 2 comments · May be fixed by #244
Open

Would you be open to accepting a PR to introduce tox? #234

kurtmckee opened this issue Dec 10, 2024 · 2 comments · May be fixed by #244
Assignees
Labels
enhancement New feature or request

Comments

@kurtmckee
Copy link
Contributor

kurtmckee commented Dec 10, 2024

Running the test suite locally currently has the following disadvantages:

  • Defining the tests in Makefile renders the test suite inaccessible on Windows
  • Developers must set up a virtual environment and install dependencies prior to running make test
  • Only one Python version can be tested at a time, causing the test suite to fall short of 100% coverage

I'd like to introduce a tox configuration so that developers like myself can simply clone the repo and run tox to exercise the entire test suite across all supported Python versions on any given platform.

Is this something you'd be open to?

@kurtmckee kurtmckee added the enhancement New feature or request label Dec 10, 2024
@zmievsa
Copy link
Owner

zmievsa commented Dec 11, 2024

I'd love to have this! Thanks for explaining the rationale too!

@kurtmckee
Copy link
Contributor Author

Awesome! I'll work to get this done. 👍

kurtmckee added a commit to kurtmckee/pr-cadwyn that referenced this issue Dec 23, 2024
This commit introduces the following changes:

* Add a tox config to run the test suite against Python 3.10+.
* Test CLI rendering on Windows.
* Use tox exclusively for running tests in CI.

Decisions made:

* 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
kurtmckee added a commit to kurtmckee/pr-cadwyn that referenced this issue Dec 23, 2024
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
@kurtmckee kurtmckee linked a pull request Dec 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants