Skip to content
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

Switch from pip to uv #783

Merged
merged 4 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
FROM mcr.microsoft.com/devcontainers/python:1-3.12

COPY --from=ghcr.io/astral-sh/uv:0.5 /uv /usr/local/bin/

CMD ["sleep", "infinity"]
10 changes: 2 additions & 8 deletions .devcontainer/post_create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@

set -euxo pipefail

pip install --disable-pip-version-check --upgrade pip
uv pip install -r requirements_dev.txt --system

pip install pre-commit

pip install -r requirements_dev.txt &

pre-commit install --install-hooks &

wait
pre-commit install --install-hooks
10 changes: 6 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ jobs:
uses: actions/[email protected]
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Install requirements
run: |
pip install pip
pip install -r requirements_dev.txt
uv pip install -r requirements_dev.txt --system
- name: Run pre-commit on all files
run: |
pre-commit run --all-files --show-diff-on-failure --color=always
Expand Down Expand Up @@ -64,10 +65,11 @@ jobs:
uses: "actions/[email protected]"
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Install requirements
run: |
pip install pip
pip install -r requirements_dev.txt
uv pip install -r requirements_dev.txt --system
- name: Tests suite
run: |
pytest -p no:sugar
Expand Down
Loading