feat: Migrate package manager to uv#1553
Conversation
| jobs: | ||
| test: | ||
| docker: | ||
| - image: cimg/python:3.13.7 |
There was a problem hiding this comment.
Can we use a matrix here and test LTS and the newest python version?
There was a problem hiding this comment.
added a matrix in circle ci for make test and one in database.yml sqlite job for make build-db which are python version dependent moved the formatting and openapi spec generation to a separate step in circleci since they are not python version dependent
| @@ -0,0 +1 @@ | |||
| 3.14 | |||
There was a problem hiding this comment.
Do we need this file? I'd like to support multiple Python versions.
There was a problem hiding this comment.
well there are a few benefits to having the interpreter version pinned, the pipeline uv sets up automatically + make install/setup (uv sync) auto installs the suitable python version
I think having a pinned python version for the project is fine since uv handles that anyways and to run it with diff versions locally the developer can either use the --python flag with uv or modify the version pin temporarily https://docs.astral.sh/uv/concepts/python-versions/#requesting-a-version
instead in the pipeline we can have the matrix which runs the project against diff version and the dev can later modify it locally we can make a note in the readme
| environment: | ||
| HASURA_GRAPHQL_DATABASE_URL: postgres://${POSTGRES_USER:-ash}:${POSTGRES_PASSWORD:-pokemon}@db:5432/${POSTGRES_DB:-pokeapi} | ||
| HASURA_GRAPHQL_ENABLE_CONSOLE: "true" | ||
| HASURA_GRAPHQL_ENABLE_CONSOLE: "false" |
There was a problem hiding this comment.
I moved all the dev settings to the -dev compose file and left this as barebones base compose file, the graphql console is not really a recommended setting to be enabled to be in prod/ is a local/dev based setting so figured overriding it in the dev compose file is a more suitable location for it
is there any particular reason for us to have it globally set to true I am not that familiar with graphql but shouldnt the console be enabled in a much more limited manner or does it not matter in our case?
Change description
First set of pr for migrating and adopting modern python tooling ecosystem, this pr attempts to migrate from pip to uv for package management as discussed in #1391 & #1521 it breaks down the changes @phalt initially made to smaller more iterative parts
cc: @phalt @Naramsim
AI coding assistance disclosure
Used a bit for reviewing the changes and coverage if I missed any transitive command update
Contributor check list