Skip to content

Commit 12e6504

Browse files
authored
Migrate to UV (#64)
1 parent fa41c43 commit 12e6504

File tree

6 files changed

+628
-413
lines changed

6 files changed

+628
-413
lines changed

.github/workflows/test.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,60 +9,58 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
12+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
1313

1414
steps:
1515
#----------------------------------------------
16-
#---- Checkout and install poetry and python
16+
#---- Checkout and install uv and python
1717
#----------------------------------------------
1818

1919
- uses: actions/checkout@v4
20-
- name: Install poetry
21-
run: pipx install poetry
22-
- uses: actions/setup-python@v5
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v4
2322
with:
24-
python-version: ${{ matrix.python-version }}
25-
cache: 'poetry'
23+
enable-cache: true
24+
- name: Set up Python ${{ matrix.python-version }}
25+
run: uv python install ${{ matrix.python-version }}
2626

2727
#----------------------------------------------
2828
#---- Install dependencies
2929
#----------------------------------------------
3030

31-
- name: Poetry install
32-
run: poetry install
31+
- name: uv install
32+
run: uv sync --all-extras --dev
3333

3434
#----------------------------------------------
3535
#---- Show installation details
3636
#----------------------------------------------
3737

38-
- name: poetry --version
39-
run: poetry --version
40-
- name: poetry run python --version
41-
run: poetry run python --version
38+
- name: uv --version
39+
run: uv --version
40+
- name: uv run python --version
41+
run: uv run python --version
4242
- name: ls -lah
4343
run: ls -lah
44-
- name: poetry show
45-
run: poetry show
46-
- name: poetry show --tree
47-
run: poetry show --tree
44+
- name: uv tree
45+
run: uv tree
4846

4947
#----------------------------------------------
5048
#---- Pre-Checks
5149
#----------------------------------------------
5250

5351
- name: Show clock resolution
54-
run: poetry run python tests/system_checks/test_tick_rate.py
52+
run: uv run python tests/system_checks/test_tick_rate.py
5553
- name: Test clocks
56-
run: poetry run python tests/system_checks/test_clocks.py
54+
run: uv run python tests/system_checks/test_clocks.py
5755
- name: Test monotonicity
58-
run: poetry run python tests/system_checks/test_monotonic_over_threads.py
56+
run: uv run python tests/system_checks/test_monotonic_over_threads.py
5957

6058
#----------------------------------------------
6159
#---- Run tests with coverage report
6260
#----------------------------------------------
6361

6462
- name: 🚀 Run tests with code coverage report
65-
run: poetry run pytest --cov=dictdatabase --cov-report term-missing
63+
run: uv run pytest --cov=dictdatabase --cov-report term-missing
6664

6765
#----------------------------------------------
6866
#---- Save coverage artifact
@@ -79,6 +77,8 @@ jobs:
7977

8078
# JOB: Coverage Badge
8179
cov-badge-job:
80+
# Only run this job on push events to the main branch, after tests succeed
81+
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.tests-job.result == 'success'
8282
needs: tests-job
8383
runs-on: ubuntu-latest
8484
steps:
@@ -113,7 +113,7 @@ jobs:
113113
#----------------------------------------------
114114

115115
- name: Verify Changed Files
116-
uses: tj-actions/verify-changed-files@v16
116+
uses: tj-actions/verify-changed-files@v17
117117
id: changed_files
118118
with:
119119
files: assets/coverage.svg

justfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,9 @@ benchmark_threaded:
2121
alias ba := benchmark_async
2222
benchmark_async:
2323
poetry run python tests/benchmark/run_async.py
24+
25+
publish:
26+
uv build
27+
uv publish
28+
rm -rf dist
29+
rm -rf dictdatabase.egg-info

0 commit comments

Comments
 (0)