Skip to content

Commit a70cd63

Browse files
committed
Replace old testing suite with ty and ruff
1 parent 074282a commit a70cd63

11 files changed

Lines changed: 117 additions & 945 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,16 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v4
1313
- name: Install uv
14-
uses: astral-sh/setup-uv@v3
14+
uses: astral-sh/setup-uv@v7
1515
with:
1616
enable-cache: true
1717
cache-dependency-glob: "uv.lock"
1818
- name: Set up Python ${{ matrix.python-version }}
1919
run: uv python install ${{ matrix.python-version }}
2020
- name: Install the project
2121
run: uv sync --frozen --extra develop
22-
- name: Run black (check)
23-
run: uv run --no-sync black --check --verbose .
24-
- name: Run isort (check)
25-
run: uv run --no-sync isort --check-only .
22+
- name: Run Ruff format (check)
23+
run: uv run --no-sync ruff format --check .
2624
linting:
2725
runs-on: ubuntu-latest
2826
strategy:
@@ -31,17 +29,16 @@ jobs:
3129
steps:
3230
- uses: actions/checkout@v4
3331
- name: Install uv
34-
uses: astral-sh/setup-uv@v3
32+
uses: astral-sh/setup-uv@v7
3533
with:
3634
enable-cache: true
3735
cache-dependency-glob: "uv.lock"
3836
- name: Set up Python ${{ matrix.python-version }}
3937
run: uv python install ${{ matrix.python-version }}
4038
- name: Install the project
4139
run: uv sync --frozen --extra develop
42-
- name: Lint
43-
run: |
44-
uv run --no-sync pytest . --pylint -m pylint --pylint-rcfile=.pylintrc
40+
- name: Ruff check
41+
run: uv run --no-sync ruff check .
4542
static-type-checking:
4643
runs-on: ubuntu-latest
4744
strategy:
@@ -50,17 +47,16 @@ jobs:
5047
steps:
5148
- uses: actions/checkout@v4
5249
- name: Install uv
53-
uses: astral-sh/setup-uv@v3
50+
uses: astral-sh/setup-uv@v7
5451
with:
5552
enable-cache: true
5653
cache-dependency-glob: "uv.lock"
5754
- name: Set up Python ${{ matrix.python-version }}
5855
run: uv python install ${{ matrix.python-version }}
5956
- name: Install the project
6057
run: uv sync --frozen --extra develop
61-
- name: Mypy
62-
run: |
63-
uv run --no-sync mypy .
58+
- name: ty check
59+
run: uv run --no-sync ty check
6460
unit-tests:
6561
runs-on: ubuntu-latest
6662
strategy:
@@ -73,7 +69,7 @@ jobs:
7369
sudo apt-get install -y liblapack-dev libblas-dev
7470
- uses: actions/checkout@v4
7571
- name: Install uv
76-
uses: astral-sh/setup-uv@v3
72+
uses: astral-sh/setup-uv@v7
7773
with:
7874
enable-cache: true
7975
cache-dependency-glob: "uv.lock"

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ coverage.xml
5252
.hypothesis/
5353
.pytest_cache/
5454
cover/
55+
.ruff_cache/
5556

5657
# Translations
5758
*.mo
@@ -160,4 +161,3 @@ cython_debug/
160161
# and can be added to the global gitignore or merged into this file. For a more nuclear
161162
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
162163
#.idea/
163-

0 commit comments

Comments
 (0)