unitaryfund / mitiq

Mitiq is an open source toolkit for implementing error mitigation techniques on most current intermediate-scale quantum computers.
https://mitiq.readthedocs.io
GNU General Public License v3.0
363 stars 161 forks source link

Migrate to pyproject.toml for project configuration #867

Open crazy4pi314 opened 3 years ago

crazy4pi314 commented 3 years ago

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:

dbanty commented 3 years ago

@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.

crazy4pi314 commented 3 years ago

@crazy4pi314 will you be using Poetry to define dependencies as part of this?

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!

github-actions[bot] commented 2 years ago

This issue had no activity for 2 months, and will be closed in one week unless there is new activity. Cheers!

natestemen commented 1 year ago

related: https://github.com/unitaryfund/mitiq/issues/857