-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
✨ Migrate package installation to pyproject.toml (PEP 621) #54
Conversation
Also added missing libs for a successful test run
@andrew-d can you review when you have time? Thanks! |
Co-authored-by: Marcelo Trylesinski <[email protected]>
cc @tomchristie |
Co-authored-by: Marcelo Trylesinski <[email protected]>
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'm happy to facilitate a release here, if that's what folks would like. |
Thanks 👍 |
Do we need anything else before rolling a new release here? |
We need an analogous workflow to encode projects to release the package via pipeline. |
Thank you for merging 🙂 I'd be happy to contribute with another PR that sets up the release pipeline in case you're interested |
We are. 👍 |
Intro
Based on #52 and the suggestion of the andrew-d to inspire the solution on starlette's setup and the apparent inactivity of the PR, i port the installation of the lib to use the new packaging standards of using
pyproject.toml
and starlette's style. I modified the invoke tasks so you can release a new version with the same setup as beforeSolution
First install dev dependencies with
pip install .[dev]
. Editable installs work from pip==21.3 so an editable install to iterate on refactors will also work. This is safer though because it avoid running tests with local changes and publishing another, not-tested version.So with hatch how do we handle packaging tasks?
Build distribution artifacts (source and build)
This will save a source and wheel artifact into the default folder
dist/
Upload distribution artifacts
Run Tests
inv test
Bump the library version
Could be also replaced by https://hatch.pypa.io/latest/version/#updating if you prefer the hatch native way. If you do not, the above still works
Deploy a new version, enforcing a test run
It will interactively ask for your pypi creds
Let me know if you only want to offer a wheel artifacts or if there is any incompatibility with a platform. My educated guess is we won't since we're not using any platform-specific magic on the lib but i'm not the author so feel free to correct me
All tests pass using python3.7.15 virtualenv. I can try with the 3.8, 3.9, 3.10 and 3.11 too if you want. I noticed the invoke task api changed so i updated the tasks accordingly. Please tell me if you prefer to pin an older version of invoke to avoid this changes