Skip to content

Conversation

@nikitagashkov
Copy link

@nikitagashkov nikitagashkov commented Feb 17, 2024

This MR modernizes developer tools, introduces code formatting, replaces Travis CI with GitHub Actions.

psycopg2 no longer installed for testing

asyncpg is capable of running DDLs nowadays, so we can issue CREATE statements with the already existing driver. One caveat is that we now have to create enums with Raw SQL, but the code to do so is quite small, so IMO that's a tradeoff worth getting rid of a psycopg2.

Docker

Slight changes in the Dockerfile: switch to -slim Python image (rationale), update references to Docker Compose as a Docker subcommand, retouch the docker-compose.yml.

Hatch

hatch is introduced as a project manager that bundles responsibilities of tox, flit and more under a convenient API.

Linting & formatting

ruff is introduced as a lightning fast modern linter alongside it's ruff format drop-in replacement for black — de-facto standard for Python nowadays. A small subset of ruff rules are enabled for now to limit the scope of this MR.

Travis CI → GitHub Actions

GitHub Actions is now a standard CI tool for many and is battle-tested and greatly integrated into GitHub ecosystem without any additional tools needed. Hence, switching to it seems like a logical choice.

Note to reviewers: There's quite a lot of changes yet all of them do not change any functionality. Patchsets are grouped into logical commits, so please review commit-by-commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants