Skip to content

Commit 7dea556

Browse files
committed
Migrate to uv and ruff
1 parent 85b991f commit 7dea556

8 files changed

Lines changed: 445 additions & 45 deletions

File tree

.flake8

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

.github/workflows/lint.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ jobs:
2727
pip install -r requirements.txt
2828
2929
- name: Run mypy
30-
run: mypy ocu/**/*.py tests/*.py
30+
run: uv run mypy .
3131

32-
- name: Run flake8
33-
run: flake8 ocu/**/*.py tests/*.py
32+
- name: Run ruff
33+
run: uv run ruff check .
34+
run: uv run ruff format --check .

.github/workflows/tests.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,18 @@ jobs:
2222
- uses: actions/checkout@v3
2323
with:
2424
submodules: recursive
25-
- name: Set up Python ${{ matrix.python-version }}
26-
uses: actions/setup-python@v3
25+
- name: Install uv
26+
uses: astral-sh/setup-uv@v5
2727
with:
2828
python-version: ${{ matrix.python-version }}
2929

30-
- name: Install dependencies
31-
run: |
32-
python -m pip install --upgrade pip
33-
pip install -r requirements.txt
30+
- name: Check lockfile
31+
run: uv lock --check
3432

3533
- name: Test with nose2
3634
run: |
37-
coverage run -m nose2 --quiet tests
38-
coverage lcov -o cover/coverage.lcov
35+
uv run coverage run -m nose2
36+
uv run coverage lcov -o cover/coverage.lcov
3937
4038
- name: Coveralls
4139
uses: coverallsapp/github-action@master

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ dist/
1818
*.egg-info/
1919

2020
# Required packages
21+
.venv
2122
.virtualenv

.vscode/settings.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22
"python.analysis.extraPaths": [".virtualenv"],
33
"[python]": {
44
"editor.formatOnSave": true,
5-
"editor.defaultFormatter": "ms-python.black-formatter",
5+
"editor.defaultFormatter": "charliermarsh.ruff",
66
"editor.codeActionsOnSave": {
77
"source.organizeImports": "explicit"
88
}
9-
},
10-
"black-formatter.importStrategy": "fromEnvironment",
11-
"isort.args": [
12-
"--profile", "black"
13-
]
9+
}
1410
}

pyproject.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,15 @@ license = "MIT"
1414
dependencies = []
1515

1616
[dependency-groups]
17-
dev = []
17+
dev = [
18+
"alfred-workflow-packager==3.1.1",
19+
"coverage==7.2.5",
20+
"freezegun==1.5.2",
21+
"mypy==1.4.1",
22+
"nose2==0.13.0",
23+
"python-dotenv==1.0.0",
24+
"ruff>=0.12.0",
25+
]
1826

1927
[tool.ruff]
2028
include = ["**/*.py"]

requirements.txt

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

uv.lock

Lines changed: 423 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)