Skip to content

Commit

Permalink
chore: replace pip with uv
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Cherng <[email protected]>
  • Loading branch information
jfcherng committed May 4, 2024
1 parent f037df4 commit 5477af0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install -U uv
make UV_INSTALL_FLAGS="--system" install
- name: Do linting
run: |
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
UV_INSTALL_FLAGS :=

.PHONY: all
all:

.PHONY: install
install:
python -m pip install -U pip -r requirements.txt
uv pip install $(UV_INSTALL_FLAGS) -r requirements.txt

.PHONY: pip-compile
pip-compile:
uv pip compile --upgrade requirements.in -o requirements.txt

.PHONY: ci-check
ci-check:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ exclude = [
]

[tool.ruff.lint]
select = ["E", "F", "W", "I", "UP"]
select = ["E", "F", "W", "I", "UP", "FURB"]
ignore = ["E203"]

[tool.ruff.lint.per-file-ignores]
Expand Down
2 changes: 2 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mypy
ruff>=0.4
13 changes: 8 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# This is an implicit value, here for clarity
--index https://pypi.python.org/simple/

mypy
ruff>=0.2
# This file was autogenerated by uv via the following command:
# uv pip compile requirements.in -o requirements.txt
mypy==1.10.0
mypy-extensions==1.0.0
# via mypy
ruff==0.4.3
typing-extensions==4.11.0
# via mypy

0 comments on commit 5477af0

Please sign in to comment.