-
Notifications
You must be signed in to change notification settings - Fork 10
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
Pin ruff version to avoid spurious test failures #2053
Merged
Merged
Conversation
This file contains 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
waxlamp
force-pushed
the
pin-ruff-version
branch
from
October 21, 2024 20:07
471c4b5
to
071a2d9
Compare
waxlamp
force-pushed
the
pin-ruff-version
branch
from
October 22, 2024 00:41
cc4200b
to
a9f549a
Compare
This avoids breakeages that can slow things down when the version of ruff advances and gets picked up by CI, but remains at a "stable" version in local environments. In this case, local linting/formatting results can diverge from what happens in CI, which then causes a scramble to make the versions equal "between dev and prod" (so to speak). The version specifier is `~=0.6.2` to keep the version that gets installed to any from the 0.6.x series that is at least 0.6.2. According to the ruff docs, patch-level bumps represent bugfixes, when minor-level bumps are breaking changes (hence the divergence we have observed). We avoid setting the version in pyproject.toml (using [this setting](https://docs.astral.sh/ruff/settings/#required-version)) so that we can put in place a CI step that *does* install the latest version and shows us any divergences.
waxlamp
force-pushed
the
pin-ruff-version
branch
from
October 22, 2024 01:08
a9f549a
to
0077366
Compare
mvandenburgh
approved these changes
Oct 22, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestion about invoking ruff
, either way this looks good to me.
Co-authored-by: Mike VanDenburgh <[email protected]>
mvandenburgh
approved these changes
Oct 22, 2024
🚀 PR was released in |
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.
Since ruff is fast moving and freely publishes new versions with breaking changes, it behooves us to pin a ruff version so that local dev and CI don't go out of sync with each other, complicating the review process for PRs.
This PR pins ruff to the 0.6.x minor series and adds a version report to each test (to make version numbers easier to determine in the future).
(See commit messages for details.)