Migrate to Poetry
Ticket was about migrating to Pipenv. Now it is for Poetry
Migrate from setup.{py,cfg}, requirements_{,dev,deploy}.txt, and Makefile to pyproject.toml and poetry.lock.
Advantages
- migrate dependencies from three files to one
pyproject.tomlwhich is supported by the Python project - lock file:
poetry.lock Makefilerules migrated topyproject.tomlin order to have a central file- Will be able to use own built Docker images with poetry inside, and run matrix test for supported Python versions
- Poetry can build and publish to PyPi out of the box.
wheelandtwineare hidden under the hood. Nice for CI/CD and new contributors. - …
- History
Inconvenient
- …
Tasks
-
Migrate setup.{py,cfg}andrequirements_{,dev,deploy}.txttopyproject.toml -
Do not commit poetry.lockfor a library − reason-
Add poetry.lockinto the.gitignorewith a comment explaining why
-
-
Consider !91 (merged) in the pyproject.toml:attr/attrs -
Clean sphinxextra stuff (inpyproject.tomland.gitlab-ci.yml). -
Have blackinstallable with Python ≥ 3.6 -
Update Makefilerules -
Update release.sh -
Update CI -
Document poetry usage, update documentation
To be done later
-
Use extra to install sphinx, (mypy, pylint?) - Would speed-up the pipeline by not installing not used dependencies
- Not able to make it work. Looks like it worked once.
-
Poetry requirement version: specify v1. Specifying v1 installs v0.12. -
Handle PEP 561 − Support in pyproject.toml? -
MigrateMakefilebehaviours to poetry actions. There is none in the end :/-
Create a Pylint project configuration file for the rules {dis,en}able.
-
Edited by Moul