-
Notifications
You must be signed in to change notification settings - Fork 6
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
Added pre-commit configuration for black & isort. #16
Conversation
Want to just go all-in on |
Why not, that would require us to choose a different build backend. Do you have anything in mind? |
4f71dc3
to
80a88d4
Compare
I think it's possible to still use setuptools now, but I've also used |
Ok, I am not sure if we would get rid of setup.cfg completly because some tools might only support that, but let's see |
Codecov Report
@@ Coverage Diff @@
## main #16 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 3 9 +6
Lines 157 418 +261
Branches 35 48 +13
==========================================
+ Hits 157 418 +261
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
@ipmb Moved most of the stuff into pyproject.toml. I'd ask you to review this very carefully before merging -- there might be dragons.
Programming Language :: Python :: 3.11 | ||
|
||
[options] | ||
packages = find: |
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.
The find stuff is no longer needed, setuptools & setuptools_scm seems to do the correct thing.
[zest.releaser] | ||
tag-signing = yes | ||
date-format = %%-d %%B %%Y | ||
tag-format = v{version} | ||
|
||
[check-manifest] | ||
ignore = |
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.
Dropped this and opted to include tests
in the sdist -- let me know if you have a problem with that?
tests/* | ||
|
||
[coverage:run] | ||
source = goodconf |
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.
Dropped because I don't know what was using it, maybe the old way of running coverage required it?
[coverage:report] | ||
show_missing = true | ||
skip_covered = true | ||
[flake8] |
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.
Flake8 doesn't support pyproject.toml yet, I could only move it into .flake8
, but as long as zest stays we can keep setup.cfg?
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, we can keep setup.cfg
for now. Moving to ruff
(via flake8-to-ruff
might be an option, but that's low priority.
dropping this here in case the situation changes: PyCQA/flake8#234
I was able to run |
Hi Peter, I have added support for pre-commit to ensure that the code stays black/isort/flake8 formatted. I basically took the existing configuration from Django. Would you mind approving the workflow so we can see how it looks like?
I have also tightened the permissions of the workflows etc… Let me know if you dislike something.