Reintroduce tox and thoroughly test the project#160
Conversation
1ada4e7 to
0348295
Compare
|
@kurtmckee I really like this contribution! Since MR #164, there are some minor branch conflicts. The title suggests that there was tox implemented before. Is there a reason tox was removed in the first place? |
|
I'll fix the conflicts shortly. Tox was dropped in v6 with a note that users can simply refer to CI runs. However, CI is disabled by default on forks and CI doesn't run against PRs from first-time contributors, so while its removal was intentional, I don't think that this is a good situation for first-time contributors. |
This commit introduces the following major changes: * Use tox. * Test the project against both `unidecode` and `text_unidecode`. Previously, `unidecode` was untested. * Drop support for Python 3.7, 3.8, and 3.9. CI was unable to run because Python 3.7 is no longer available. In addition, Python 3.9 and lower are all end-of-life. * Test against PyPy 3.11 and Python 3.14. * Test type annotations using mypy. Previously, type annotations were untested. * Install and test all supported Python interpreters in CI at once. * Use tox, and the tox-uv plugin, exclusively in CI. This eliminates differences between local and CI testing. * Run CI against pull requests. * Collect, combine, and report coverage for all Python versions and dependencies, locally and in CI. In addition, this commit introduces the following minor changes: * Fix typing issues identified by mypy. Note that `text_unidecode` is untyped and must be type-ignored. * Remove almost all coverage `pragma: nocover` lines. * Fix incorrect copy/pasted comments in `ci.yml` and `main.yml`. * Upgrade `actions/checkout` to v5 and `actions/setup-python` to v6.
0348295 to
1ef698f
Compare
Awesome, thanks. That makes a lot of sense. |
This commit introduces the following major changes:
unidecodeandtext_unidecode.Previously,
unidecodewas untested.CI was unable to run because Python 3.7 is no longer available.
In addition, Python 3.9 and lower are all end-of-life.
Previously, type annotations were untested.
This eliminates differences between local and CI testing.
for all Python versions and dependencies, locally and in CI.
In addition, this commit introduces the following minor changes:
Note that
text_unidecodeis untyped and must be type-ignored.pragma: nocoverlines.ci.ymlandmain.yml.actions/checkoutto v5 andactions/setup-pythonto v6.Taken together, these changes improve the health of the project by ensuring that the test suite can be run locally, tests all dependencies, runs successfully in CI, and that there is no drift between CI and local testing.
Here is an example of a CI run using the code in this PR.