-
Notifications
You must be signed in to change notification settings - Fork 20
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-config.yaml #67
Conversation
for more information, see https://pre-commit.ci
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.
I see some formatting has happened ;)
The main feedback is to change the setup.cfg configuration - you can take a look at phys2bids' or nigsp's one to see how to set pre-commit and its hooks up!
This may benefit from having a look at #41 (?) |
for more information, see https://pre-commit.ci
Co-authored-by: Stefano Moia <[email protected]>
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
@smoia @me-pic @m-miedema I believe this is ready, feel free to have a look |
@me-pic @m-miedema @smoia This should be ready to merge. I opened physiopy/prep4phys#2 for the failing neurokit tests, since they are outdated and I suppose they will be addressed in another PR (or will be re-written completely). For the time being I just added a |
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 the changes worked, good job!
Did you run tests locally? If not, could you do that, please? If they break on something like the old workflows, that's fine, but otherwise it's good to check that the blacking of the scripts didn't break anything (shouldn't, but just to be sure!)
write-changes = | ||
count = | ||
quiet-level = 3 | ||
|
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.
Might be worth adding black config as well?
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.
There is no support for setup.cfg
(issue), we would have to add a pyproject.toml
instead.
I don't see any desired configuration option other than perhaps the --exclude
option.
However, I don't see any real benefit in excluding files like versioneer.py
and not having style uniformity. Let me know your thoughts.
@smoia I ran them locally yes, they have the same behavior as in master branch currently. |
setup.cfg
Outdated
tests | ||
versioneer.py | ||
ignore = E126, E203, E402, W503 | ||
max-line-length = 99 |
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.
Sorry, you are right about black in setup.cfg.
I got confused with extended Flake8 settings to match Black:
ignore = E126, E402, W503, F401, F811
max-line-length = 88
extend-ignore = E203, E501
extend-select = B950
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.
Done
This is awesome though! |
@smoia @m-miedema @me-pic this should be ready to go now |
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.
Awesome!
Add a pre-commit configuration file, as in phys2bids
Proposed Changes
Change Type
bugfix
(+0.0.1)minor
(+0.1.0)major
(+1.0.0)refactoring
(no version update)test
(no version update)infrastructure
(no version update)documentation
(no version update)other
Checklist before review