-
Notifications
You must be signed in to change notification settings - Fork 3
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
Moving to Ruff and pyproject.toml
#204
base: master
Are you sure you want to change the base?
Conversation
Checks now pass here, but still not on my machine, would be good to figure this out as my setup is fairly standard iiuc. |
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.
Okay, just a few comments for the moment. I need to install conda and then will run the tests and test out spinning up a project using the cookiecutter.
I am unable to locally pass
@HarrisonWilde Have you been able to get all checks passing locally? |
Mine actually fails locally too, I am not sure if I ever got that one working but it works fine on the CI so I stopped trying. I have a feeling it is related to the test itself which may be wrong (could also be due to the addition of the ruff step, perhaps something in the generated repo doesn't pass? I have tried to test this locally and it isn't the case but it is hard to say). |
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.
Overall, everything looks good. I can't resolve the tests, but also can't resolve the tests in the base master
branch, so not too concerned there. Will need to be a wider look at tests at some point in the future.
To me, the settings you've put in place for ruff
make sense, but probably those who have worked on previous projects will have more concrete input, particularly on docstring styling or particular approaches we use here.
default_cell_metadata_filter = "-all" | ||
|
||
[tool.ruff.lint] | ||
select = ["ANN", "B", "C", "D", "E", "F", "I", "N", "W"] |
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 like a reasonable selection! Will be mainly interested how people using the current code base feel. Particularly around mandating a docstring convention? But I am all for it!
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.
Yeah, I noticed that was enabled in current flake8 config, I don't usually support those but just tried to stay close for now
# S101 - warns about assert being removed when compiled | ||
# D100 - warns about missing module-level docstrings | ||
ignore = ["S101", "D100"] | ||
mccabe = { max-complexity = 10 } |
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.
Yes please!
Fixes #195 and fixes #196 (they are pretty closely linked here). Not quite passing all tests but have switched fully to ruff and as a result ditched most of the other config files.
I cannot for the life of me get all tests to pass, because of weird issues in the makefile I have begun to address (This also fixes #203), one of which is the bug in the
conda-remove
step but now I cannot get the pre-commit hooks and install to work at the same time, seems to be some issue with conda on my system.Main things to discuss before full PR are:
isort
, etc.Checklist: