internetarchive / arklet

ARK minter, binder, resolver
MIT License
21 stars 14 forks source link

Poetry & tooling #4

Closed PieterjanMontens closed 2 years ago

PieterjanMontens commented 2 years ago

Having used pip, poetry and pipenv & even contributed to some, I'd like to suggest to move to Poetry for packaging & version management.

  1. It uses pyproject.toml, as recommended by PEP518, along with it's own lockfile (poetry.lock) which doesn't get in the way
  2. The tool evolves pretty well, simple to use, and appreciated by the community. Having used it for the pas 2 years, I have yet to find a problem with it
  3. Easy local venv management
  4. Integrates well with docker : RUN poetry config virtualenvs.create false && poetry install -no-dev --no-interaction --no-ansi

Along with poetry can be added code cleanup, formatting & linting tools : isort, flake8, pylint, black, ... we just have to agree on the basic set. Most use pyproject.toml for settings, except for flake8 which needs his own file (or pyproject.toml with some monkey patching).

Is Poetry OK ? And which tools could be added to the repo (I'd take all of them, but that may be overkill) ?

avdempsey commented 2 years ago

I'm on board with poetry, isort, flake8, pylint, and black. A separate config file for flake8 sounds easier than monkey-patching to make pyproject.toml work. The repo is already formatted with black (but I've been doing this manually).

Once these are set up, I'll configure GitHub actions to enforce.

avdempsey commented 2 years ago

Considering #5 we could also make psycopg2 and sentry optional extra dependencies in the pyproject.toml.

avdempsey commented 2 years ago

I've started a work in progress: https://github.com/internetarchive/arklet/pull/6

avdempsey commented 2 years ago

I've merged poetry, pylint, black, pytest, tox configs: #6