Skip to content

Migrate to UV #64

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Apr 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,60 +9,58 @@ jobs:

strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
#----------------------------------------------
#---- Checkout and install poetry and python
#---- Checkout and install uv and python
#----------------------------------------------

- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
enable-cache: true
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

#----------------------------------------------
#---- Install dependencies
#----------------------------------------------

- name: Poetry install
run: poetry install
- name: uv install
run: uv sync --all-extras --dev

#----------------------------------------------
#---- Show installation details
#----------------------------------------------

- name: poetry --version
run: poetry --version
- name: poetry run python --version
run: poetry run python --version
- name: uv --version
run: uv --version
- name: uv run python --version
run: uv run python --version
- name: ls -lah
run: ls -lah
- name: poetry show
run: poetry show
- name: poetry show --tree
run: poetry show --tree
- name: uv tree
run: uv tree

#----------------------------------------------
#---- Pre-Checks
#----------------------------------------------

- name: Show clock resolution
run: poetry run python tests/system_checks/test_tick_rate.py
run: uv run python tests/system_checks/test_tick_rate.py
- name: Test clocks
run: poetry run python tests/system_checks/test_clocks.py
run: uv run python tests/system_checks/test_clocks.py
- name: Test monotonicity
run: poetry run python tests/system_checks/test_monotonic_over_threads.py
run: uv run python tests/system_checks/test_monotonic_over_threads.py

#----------------------------------------------
#---- Run tests with coverage report
#----------------------------------------------

- name: 🚀 Run tests with code coverage report
run: poetry run pytest --cov=dictdatabase --cov-report term-missing
run: uv run pytest --cov=dictdatabase --cov-report term-missing

#----------------------------------------------
#---- Save coverage artifact
Expand All @@ -79,6 +77,8 @@ jobs:

# JOB: Coverage Badge
cov-badge-job:
# Only run this job on push events to the main branch, after tests succeed
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.tests-job.result == 'success'
needs: tests-job
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
#----------------------------------------------

- name: Verify Changed Files
uses: tj-actions/verify-changed-files@v16
uses: tj-actions/verify-changed-files@v17
id: changed_files
with:
files: assets/coverage.svg
Expand Down
6 changes: 6 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ benchmark_threaded:
alias ba := benchmark_async
benchmark_async:
poetry run python tests/benchmark/run_async.py

publish:
uv build
uv publish
rm -rf dist
rm -rf dictdatabase.egg-info
Loading
Loading