-
Notifications
You must be signed in to change notification settings - Fork 68
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 pre-commit workflow including ruff #207
Conversation
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.
Looks good. I tested with a couple sequence, did not see any issues.
I also added the config for pre-commi ci now. This allows automated fixes in PRs and will check monthly for updates of the different pre-commit hooks that we use. If we want to activate it, @sravan953 hast to login at https://pre-commit.ci/ and add an installation for pypulseq (just select the repo - thats all). 11ad246 is a good example that pre-commit.ci would have fixed automatically 👆 |
@FrankZijlstra are you fine with merging it? Or you wanna have some extra time to review it as well? |
I had a quick look and though I'm not familiar with RUFF and how to set it up, from looking at the style changes in the files I think it looks good. Maybe it would be a good idea to add a note to the readme about how to set up pre-commit (basically what you put here)? I haven't tested it with my sequences, but looking at the changes I don't see anything that would break. So I'm fine with committing this now. If I remember correctly I still have a branch where I added all the sequence examples to the test_sequence unit tests. And then it shouldn't be too hard to put the new tests in a PR soon(ish), and we can check a bit more elaborate set of sequences automatically. |
closes #197
Probably nobody wants to review all changes manually, but maybe you can checkout this PR and just check that your last ~10 pypulseq sequences and/or related projects still work fine @FrankZijlstra @btasdelen and maybe even @mavel101 @wtclarke
IMO, this is a necessary step towards a better maintainable package and it will simplify to proceed with #95 and #123
Some infos about pre-commit:
pyproject.toml
pip install pre-commit
pre-commit install
commandgit commit -m "your msg" --no-verify
. Note that this does NOT skip the pre-commit GitHub workflow.Some further infos about RUFF:
tests
orseq_examples
)pyproject.toml
file.