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.toml
which is supported by the Python project - lock file:
poetry.lock
Makefile
rules migrated topyproject.toml
in 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.
wheel
andtwine
are hidden under the hood. Nice for CI/CD and new contributors. - …
- History
Inconvenient
- …
Tasks
-
Migrate setup.{py,cfg}
andrequirements_{,dev,deploy}.txt
topyproject.toml
-
Do not commit poetry.lock
for a library − reason-
Add poetry.lock
into the.gitignore
with a comment explaining why
-
-
Consider !91 (merged) in the pyproject.toml
:attr
/attrs
-
Clean sphinx
extra stuff (inpyproject.toml
and.gitlab-ci.yml
). -
Have black
installable with Python ≥ 3.6 -
Update Makefile
rules -
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
? -
MigrateMakefile
behaviours to poetry actions. There is none in the end :/-
Create a Pylint project configuration file for the rules {dis,en}able.
-
Edited by Moul