-
Notifications
You must be signed in to change notification settings - Fork 102
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
Use Hatch for project management #384
Conversation
Much more to try out
Tring some things out in CI as well.
Trying to get the build output accurate.
This is workaround to do an editable install of gitlint-core: See pypa/hatch#589 Also further refines a bunch of other CI and pyproject.toml items.
- Removed remaining requirements files - Cleaned up pyproject.toml files
Also includes some pyproject.toml tweaks
The package description is now using README.md which reduces the number of descriptions to maintain.
54326a6
to
3b2389d
Compare
https://peps.python.org/pep-0625/ though you can disable
https://hatch.pypa.io/latest/plugins/builder/sdist/#default-file-selection so building from sdist is reproducible
not yet
|
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.
LGTM 🔥
For my own future reference:
From PEP-625 I found https://packaging.python.org/en/latest/specifications/binary-distribution-format/ which specifies:
Had to read carefully, but think I figured it out. The build docs mention:
So if the builds needs to be reproducible from sdist, hatch needs to know which files to ignore in the sdist tarball. When building the sdist tarball using hatch itself, I don't think any of the git ignored files would still be included in the tarball since hatch would've already respected the |
- Use hatch build builds and script running. - Removes setuptools build files and requirements*.txt files. - Updates contributor docs accordingly.
This release was primarily focussed on modernizing gitlint's build and test tooling (details: #378). General Python 3.6 no longer supported (EOL since 2021-12-23) (#379) This is the last release to support the sh library (used under-the-hood to execute git commands) by setting GITLINT_USE_SH_LIB=1. This is already disabled by default since v0.18.0. Features Allow for a single commit in the --commits cmd-line param (#412) Gitlint now separates FILE_ENCODING (always UTF-8) from TERMINAL_ENCODING (terminal dependent), this should improve issues with unicode. Use gitlint --debug to inspect these values. (#424) Bugfixes ignore-by-author-name crashes without --staged (#445) Various documentation fixes (#401, #433) - Thanks scop Development Adopted hatch for project management (#384). This significantly improves the developer workflow, please read the updated CONTRIBUTING page. Adopted ruff for linting, replacing pylint (#404) Gitlint now publishes dev builds on every commit to main (#429) Gitlint now publishes a latest_dev docker image on every commit to main (#451) (#452) Dependencies updated Many improvements to the CI/CD worfklows Improve unit test coverage (#453) Integration test fixes on windows (#392, #397) Devcontainer improvements (#428) Removal of Dockerfile.dev (#390) Fix most integration tests on Windows Fix Windows unit tests (#383) Introduce a gate/check GHA job (#375) Full Release details in CHANGELOG.md.
This release was primarily focussed on modernizing gitlint's build and test tooling (details: #378). General Python 3.6 no longer supported (EOL since 2021-12-23) (#379) This is the last release to support the sh library (used under-the-hood to execute git commands) by setting GITLINT_USE_SH_LIB=1. This is already disabled by default since v0.18.0. Features Allow for a single commit in the --commits cmd-line param (#412) Gitlint now separates FILE_ENCODING (always UTF-8) from TERMINAL_ENCODING (terminal dependent), this should improve issues with unicode. Use gitlint --debug to inspect these values. (#424) Bugfixes ignore-by-author-name crashes without --staged (#445) Various documentation fixes (#401, #433) - Thanks scop Development Adopted hatch for project management (#384). This significantly improves the developer workflow, please read the updated CONTRIBUTING page. Adopted ruff for linting, replacing pylint (#404) Gitlint now publishes dev builds on every commit to main (#429) Gitlint now publishes a latest_dev docker image on every commit to main (#451) (#452) Dependencies updated Many improvements to the CI/CD worfklows Improve unit test coverage (#453) Integration test fixes on windows (#392, #397) Devcontainer improvements (#428) Removal of Dockerfile.dev (#390) Fix most integration tests on Windows Fix Windows unit tests (#383) Introduce a gate/check GHA job (#375) Full Release details in CHANGELOG.md.
Initial implementation of project management using hatch.
@ofek: Appreciate if you can give this a quick review, but understand if you don't have time!
Required follow-up
./run_tests.sh
stats
script that replaces./run_tests.sh --stats
, consider whether still wantedclean
script that cleans up more directories that onlydist
(which is whathatch clean
does)gitlint --version
checks.yaml
, deduplicate between Linux and Windows. The CI script isn’t really the focus of this PR.Questions
CC: @ofek
I love hatch - thanks for maintaining it! These are all just minor things.
I noticed the
gitlint-core
packages have the dash replaced with underscore, e.g.:gitlint_core-0.19.0.dev2.tar.gz
. AFAIK, setuptools keeps the dash. Is this just a build-tool implementation detail or is there some PEP or other rationale I’m not aware of? Just trying to learn :)Why is the
.gitignore
included in the build? I’ve tried adding it to the excluded files and also tried settingignore-vcs = true
under[tool.hatch.build]
but that didn’t work.Is there a way to have a script that can run across different environments? AFAICT, there is not. Perhaps this will be supported by workspaces? Example:
Maybe I missed it, but from the docs, it’s not entirely clear what Hatchling is, other than a dependency of Hatch, although there’s a few references to it here and there. From my 30 sec of digging it seems the be PEP517-compliant build system that’s part of Hatch? Perhaps a short Q/A can be added to the FAQ?