Skip to content
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

feat(package): Migrating to uv #22

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 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
35 changes: 20 additions & 15 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
timeout-minutes: 60
strategy:
matrix:
python-version: ["3.11"]
python-version: ["3.11", "3.12"]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -18,8 +18,8 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
Expand All @@ -29,21 +29,26 @@ jobs:
activate-environment: pyreaddbc
use-mamba: true
miniforge-variant: Mambaforge

- name: Install dependencies
run: |
# poetry config experimental.new-installer false
poetry config virtualenvs.create false
poetry build
poetry install

- name: Install uv
uses: astral-sh/setup-uv@v4

- name: Set up Python
run: uv python install

- name: Install the project
run: uv sync --all-extras --dev

- name: Run tests
# For example, using `pytest`
run: uv run pytest tests

- name: Build wheel
run: uv build --wheel

- name: Lint with flake8
run: |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This | character is needed so the CI can identify the next lines are related to the run command

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nasty syntax!

# stop the build if there are Python syntax errors or undefined names
run: # stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

- name: Test with pytest
run: |
poetry run pytest -vv -k "ZIKABR21 or STPI2206 or sids" tests/
Loading
Loading