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

Add linter #687

Merged
merged 9 commits into from
Mar 8, 2024
Merged

Add linter #687

merged 9 commits into from
Mar 8, 2024

Conversation

jarrodmillman
Copy link
Contributor

Not sure folks are interested in this, but pre-commit has been pretty helpful for the other projects I work on. This does introduce some linting noise, but it is ignored by git and GitHub. I am happy to close this or modify it as folks see fit.

If you don't want to add this via pre-commit, I could make a separate PR that just updates the source files with pyupgrade and flynt to remove a ton of older Python cruft.

Thoughts?

@rgommers
Copy link
Member

This seems like a useful set of changes to me. And I'm fine with adding the pre-commit yaml file. It doesn't seem to be triggering bot PRs, and the selected linter option seem okay (adding too many is a problem for usability, the ones here are okay with me).

I'll merge this soon unless there are any concerns. I haven't reviewed the full diff yet, but I assume they're all valid changes since they-re tool generated.

@jarrodmillman
Copy link
Contributor Author

Just a reminder: This will need to be merged with a "Create a merge commit" for the .git-blame-ignore-revs commits to be valid.

.github/workflows/lint.yml Outdated Show resolved Hide resolved
.pre-commit-config.yaml Outdated Show resolved Hide resolved
@rgommers
Copy link
Member

Would you mind fixing the merge conflicts?

@jarrodmillman
Copy link
Contributor Author

@rgommers This should be ready to go. Is there anything else I can do to help with the next release?

@jarrodmillman
Copy link
Contributor Author

@rgommers We decided to make pywavelets an optional dependency of scikit-image so we could get 3.12 wheels out:
https://pypi.org/project/scikit-image/0.22.0rc1/

But it would still be nice to get 3.12 wheels for pywt out soon. Let me know if I can help. I am happy to do release management for the next release if it would be helpful.

@jarrodmillman
Copy link
Contributor Author

@rgommers Any updates on this or a new release? I am happy to handle the release if it would help. Thanks!!

@jarrodmillman
Copy link
Contributor Author

@rgommers It would be great to get 3.12 binaries out soon. This is the only scikit-image (optional) dependency that doesn't support Python 3.12.

@rgommers
Copy link
Member

Apologies for the delay @jarrodmillman . New release is up now. I'll deal with remaining PR reviews that were not needed for 1.5.0, including this one, afterwards (hopefully tomorrow).

@rgommers rgommers added this to the v1.6.0 milestone Mar 8, 2024
Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I went through everything now - most of the diff is reordering of imports, moving to f-strings, and minor style changes. There were only a couple of lines to check more carefully; all looked fine and CI is green.

The new CI job required a bump and a small fix for other new code that was merged after this PR was opened. I don't expect it to be a burden; if it fails it should be obvious from the CI log what needs fixing. Development velocity on this repo is pretty low though; if the new lint job fails too much on average it can be disabled in the future (I expect it's fine though, since 5 months later only a few tweaks were needed).

In it goes! Thanks again Jarrod.

@rgommers rgommers merged commit 2cbba46 into PyWavelets:master Mar 8, 2024
15 checks passed
@jarrodmillman jarrodmillman deleted the ruff branch March 13, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants