Skip to content

Use uv as python, dependencies, virtual environment management tools #155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Apr 6, 2025

Conversation

Lee-W
Copy link
Member

@Lee-W Lee-W commented Feb 16, 2025

Types of changes

  • Other (please describe) build

Description

  • build(dockerfile): add missing build lib libc6-dev
  • style: run "run format ."
  • style: remove lambda as suggested by ruff
  • style: run "ruff check . --unsafe-fixes --fix" with manual check
  • style: run "ruff check . --fix"
  • style: run "ruff format"
  • build(dockerfile): set default platform to linux/arm64 but make it configurable
  • style: replace black, isort, flake8 with ruff
  • style(README): add missing EOL
  • style(airflow.cfg): fix missing eol
  • docs(README): fix typos
  • docs(github-pr-template): remove outdated information
  • docs(github-issue-template): fix typo
  • build(docker-compose): remove deprecated version key
  • build(docker-compose): use "airflow db init" instead of deprecated "airflow initdb"
  • ci(github-actions): update python workflow to use uv
  • build(makefile): update makefile to use uv
  • docs(README): update documentation to setup project through uv
  • build(docker): migrate dockerfiles to use uv
  • build: migrate requirements-dev.txt to pyproject.toml
  • build: migrate requirements.txt and constraints-3.8.txt to pyproject.toml

Checklist:

  • Add test cases to all the changes you introduce
  • Run poetry run pytest locally to ensure all linter checks pass
  • Update the documentation if necessary

Steps to Test This Pull Request

Run uv sync to set env and other docker-related building commands.

Expected behavior

Everything should work as it used to be, but faster.

Related Issue

#154

Additional context

Python files are just reformatted. We probably could focus on other files when reviewing

--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --frozen --no-install-project --no-dev

RUN --mount=type=cache,target=/root/.cache/uv \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why run uv sync again?

Copy link
Collaborator

Choose a reason for hiding this comment

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

check, LGTM

Copy link
Member Author

Choose a reason for hiding this comment

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

that's indeed a good question 🤔 it's from https://github.com/astral-sh/uv-docker-example/blob/1c593aa32621eacd0125b55bd8d2796b86e8ea73/multistage.Dockerfile#L20-L21, but will think it through again. Thanks for reminding me!

@Lee-W
Copy link
Member Author

Lee-W commented Apr 6, 2025

as discussed with @henry410213028 , I'll merge this one

@Lee-W Lee-W merged commit 83afa23 into master Apr 6, 2025
2 checks passed
@Lee-W Lee-W deleted the use-uv branch April 6, 2025 14:16
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