Skip to content

Commit 3af07f2

Browse files
committed
chore: consolidate dependencies into pyproject and migrate CI to uv
1 parent 6027d9a commit 3af07f2

4 files changed

Lines changed: 25 additions & 25 deletions

File tree

.github/workflows/python-app.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,31 @@ jobs:
1818
runs-on: ubuntu-latest
1919

2020
steps:
21-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2222
- name: Set up Python 3.12
23-
uses: actions/setup-python@v3
23+
uses: actions/setup-python@v5
2424
with:
2525
python-version: "3.12"
26-
- name: Install dependencies
26+
- name: Install uv
27+
uses: astral-sh/setup-uv@v7
28+
with:
29+
enable-cache: true
30+
- name: Create env and install dependencies
2731
run: |
28-
python -m pip install --upgrade pip
29-
pip install flake8 pytest
30-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
31-
if [ -f dev-requirements.txt ]; then pip install -r dev-requirements.txt; fi
32+
uv venv
33+
uv pip install -e ".[dev]"
3234
- name: Lint with flake8
3335
run: |
3436
# stop the build if there are Python syntax errors or undefined names
35-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
37+
uv run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
3638
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
37-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
39+
uv run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
3840
- name: Test with pytest
3941
run: |
40-
pytest
42+
uv run pytest --cov=vistopia --cov-report=xml
4143
- name: Type check with mypy
4244
run: |
43-
mypy .
45+
uv run mypy .
4446
- uses: codecov/codecov-action@v4
4547
with:
4648
token: ${{ secrets.CODECOV_TOKEN }}

dev-requirements.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

pyproject.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ dynamic = ["version"]
77
dependencies = ["requests", "mutagen", "click", "tabulate", "wcwidth", "pathvalidate"]
88
requires-python = ">=3.6"
99

10+
[project.optional-dependencies]
11+
dev = [
12+
"autopep8",
13+
"pytest",
14+
"pytest-cov",
15+
"pytest_click",
16+
"flake8",
17+
"mypy",
18+
"types-requests",
19+
"types-tabulate",
20+
]
21+
1022
[project.scripts]
1123
vistopian = "vistopia:main.main"
1224

requirements.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)