-
-
Notifications
You must be signed in to change notification settings - Fork 169
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 to pyproject.toml for project configuration #867
Comments
@crazy4pi314 will you be using Poetry to define dependencies as part of this? It’ll give you the separation between ranges on install and pinning for CI that you’re looking for in #839 and is by far the easiest way to manage dependencies in general (that I’ve found). We use it over in pyQuil if you want to see an example of config, usage in CI, etc. |
Yeah, I think that would make the most sense. It is just too complicated to manage the different groups of requirements, lockfiles, and package metadata it seems without tools like Poetry :) Thanks for the example too! |
This issue had no activity for 2 months, and will be closed in one week unless there is new activity. Cheers! |
related: #857 |
@natestemen Can we make this a priority for the coming milestone? Based on how |
@bachase if Mitiq is going to switch to a new tool for dependency/env management, can you just say briefly why you like |
https://martynassubonis.substack.com/p/python-project-management-primer-a55 is a good summary that I agree with, although I primarily started out with the speed of I personally don't see many cons aside from the work of needing to migrate it, and that dependabot isn't working out of the box with uv yet (https://docs.astral.sh/uv/guides/integration/dependency-bots/#dependabot but seems to be coming soon) |
Thanks for the links Brad! These were helpful to learn a bit more and get some context.
Agreed, just for the sake of efficiency across projects. Since we already have multiple projects using |
@purva-thakre do you have a reproducible example of slow dependency resolution? Or any anecdotal data? @natestemen if that was a challenge, it could be worth a quick test with uv vs poetry to see the difference. I can't recall the specific case but when I first got excited about uv, it was when poetry was taking minutes to resolve dependencies and uv took a few seconds. That's huge! As for the impact across UV projects, I think we could focus on the main python packages - mitiq, metriq and ucc. In which case it might not be so painful to migrate? |
@bachase I can't find the logs for this right now but I noticed that
Pinging @vprusso in case I have forgotten anything worth mentioning. |
Just to add one quick anecdote For a fresh clone of |
Pre-Request Checklist
Issue Description
By newly accepted PEP guides for best practices, project configuration/parameters should be set in a
pyproject.toml
instead of requirements files, setup.py, and other conf files. Many other tools in the Python ecosystem already support getting configuration from these toml files (just another markdown sort of syntax). One really nice thing about this is that there is one file (not script) that you can look at for everything you need to configure the project. It allows for so many specifications like optional and dev dependencies, easy version numbering based on git tags, and so much more.Proposed Solution
Move any tools/configuration to the
pyproject.toml
file we already have (black requires it for conf).Tools confirmed to use:
Tools that we use that don't default support
pyproject.toml
, but have shims to make it work:Additional References
Blogs from Python core maintainers/community that are helpful in understanding the changes and how to migrate:
Examples of files in the wild:
The text was updated successfully, but these errors were encountered: