Add core Python/Matplotlib version contract checks#613
Open
cvanelteren wants to merge 7 commits intomainfrom
Open
Add core Python/Matplotlib version contract checks#613cvanelteren wants to merge 7 commits intomainfrom
cvanelteren wants to merge 7 commits intomainfrom
Conversation
Introduce a shared tools/ci/version_support.py helper that derives the supported Python versions, supported Matplotlib versions, and the core CI test matrix directly from pyproject.toml. This removes the duplicated inline parser from the main workflow and gives the project a single source of truth for the version contract that matters most to UltraPlot. Add ultraplot/tests/test_core_versions.py to assert that Python classifiers stay aligned with requires-python, that the matrix workflow uses the shared helper, that the test-map workflow stays pinned to the oldest supported Python/Matplotlib pair, and that the publish workflow builds with a supported Python version. Also expand the PR change filter so workflow, tool, and version-policy changes still trigger the relevant checks.
Add concise docstrings to the shared version-support helper and the new version-contract tests so it is immediately clear which piece derives the supported ranges, which piece shapes the CI matrix, and what each test is protecting against.
for more information, see https://pre-commit.ci
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This comment was marked as off-topic.
This comment was marked as off-topic.
5 tasks
Stop inferring supported Python and Matplotlib minors from half-open ranges alone, because that breaks across major-version upgrades. Define the supported core versions explicitly in pyproject, validate them against the declared bounds, reuse the shared helper from noxfile, and add regression coverage for a future 3.x to 4.x Matplotlib transition.
Use direct range filtering for candidate core versions so version checks work cleanly across major-version boundaries. Keep same-major arithmetic expansion only as a fallback, and add a regression test covering a 3.x to 4.x Matplotlib transition.
Collaborator
Author
|
The goal is to extend this to warn us if python or matplotlib can be updated |
Teach Dependabot to monitor the project Python dependencies in pyproject.toml so Matplotlib and related package bumps are proposed automatically alongside the existing GitHub Actions updates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce a shared tools/ci/version_support.py helper that derives the supported Python versions, supported Matplotlib versions, and the core CI test matrix directly from pyproject.toml. This removes the duplicated inline parser from the main workflow and gives the project a single source of truth for the version contract that matters most to UltraPlot.
Add ultraplot/tests/test_core_versions.py to assert that Python classifiers stay aligned with requires-python, that the matrix workflow uses the shared helper, that the test-map workflow stays pinned to the oldest supported Python/Matplotlib pair, and that the publish workflow builds with a supported Python version. Also expand the PR change filter so workflow, tool, and version-policy changes still trigger the relevant checks.