Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • silkaj silkaj
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 129
    • Issues 129
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • clientsclients
  • pythonpython
  • silkajsilkaj
  • Issues
  • #182
Closed
Open
Issue created Jan 26, 2019 by Moul@moulOwner5 of 7 checklist items completed5/7 checklist items

Migrate from Pipenv/setup.{py,cfg} to Poetry/pyproject.toml

Problems with Pipenv and setup.{py,cfg}

  • Pipenv dependency update is updating all packages. There is an option to update just one, but last time I tried it it was broken.
  • When updating a dependency, two files needs to me changed: one for the dev env Pipenv.{lock} and the other for the PyPi distribution setup.{py,cfg}. In other words, there is no central file to handle dependencies.
  • Dependencies update is very CPU consuming

Advantages of Poetry and pyproject.toml

  • Poetry can update one dependency at the time.
  • Poetry uses a central file for the dev env and the PyPi distribution.
  • Poetry can build and publish to PyPi out of the box. wheel and twine are hidden under the hood. Nice for CI/CD and new contributors.
  • Poetry installs dev dependencies by defaults
  • pyproject.toml is the standard file format defined by the Python project.
  • Easier installation of DuniterPy as a local dependency

Poetry

  • https://github.com/python-poetry/poetry
  • https://python-poetry.org/
  • Conference explaining different dependencies manager and Python env (dev env)

Plan

  • Add documentation for Poetry installation and usage, update README.md link
  • Add pyproject.toml and poetry.lock files
  • Get rid of Pipenv doc, update README.md link
  • Get rid of Pipenv{.lock} and setup.py files
  • Update release.sh
  • Update documentations: release, tests

Black, Python 3.5 support

  • Black dependency needs Python 3.6 as a minimal version for the development environment. We want to keep Python 3.5 support. We want Black not to be pre-install Black in Poetry for now. It’s a pain in the ass, as a Black should be installed separately.

The classifiers are updated (erased) by python dependency. Try to upload to PyPi test and install it in Python 3.5 environment. Not possible to install it Silkaj without Python 3.5 support on a Python 3.5 installation.

  • Solution: the black line is commented, and can be uncommented to install black on Python version ≥ 3.6 environement.
  • Open ticket to add Black as a dependency when dropping Python 3.5.

Other

  • #217 (closed): Migration to setup.cfg
  • Dependency manager discussion for DuniterPy
Edited Jun 14, 2020 by Moul
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking