Skip to content

feat: Migrate package manager to uv#1553

Open
FallenDeity wants to merge 4 commits into
PokeAPI:masterfrom
FallenDeity:feat/migrate-to-uv
Open

feat: Migrate package manager to uv#1553
FallenDeity wants to merge 4 commits into
PokeAPI:masterfrom
FallenDeity:feat/migrate-to-uv

Conversation

@FallenDeity

@FallenDeity FallenDeity commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

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

  • I have written a description of the contribution and explained its motivation.
  • I have written tests for my code changes (if applicable).
  • I have read and understood the AI Assisted Contribution guidelines.
  • I will own this change in production, and I am prepared to fix any bugs caused by my code change.

@FallenDeity FallenDeity marked this pull request as ready for review June 10, 2026 19:19
Comment thread .circleci/config.yml
jobs:
test:
docker:
- image: cimg/python:3.13.7

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use a matrix here and test LTS and the newest python version?

@FallenDeity FallenDeity Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread .python-version
@@ -0,0 +1 @@
3.14

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this file? I'd like to support multiple Python versions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread docker-compose.yml
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"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why false?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

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