Skip to content
Draft
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
111 changes: 48 additions & 63 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,48 +42,43 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Cache Poetry dependencies
- name: Set up uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6

- name: Cache uv dependencies
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: |
~/AppData/Local/pypoetry/Cache/cache
~/AppData/Local/pypoetry/Cache/artifacts
key: poetry-windows-${{ hashFiles('poetry.lock') }}
restore-keys: poetry-windows-

- name: Create virtual environment and install Poetry
run: |
python -m venv venv
. venv/Scripts/activate
python.exe -m pip install --upgrade pip
pip install poetry==2.3.3
path: ~/AppData/Local/uv/cache
key: uv-windows-${{ hashFiles('pyproject.toml') }}
restore-keys: uv-windows-

- name: Install dependencies with Poetry
- name: Create virtual environment and install dependencies
run: |
uv venv venv
. venv/Scripts/activate
poetry install --with dev
uv pip install -e ".[dev]"

- name: Check and fix with Ruff
run: |
. venv/Scripts/activate
poetry run ruff check ./tests/*.py ./openseries/*.py --fix --exit-non-zero-on-fix
ruff check ./tests/*.py ./openseries/*.py --fix --exit-non-zero-on-fix

- name: Format with Ruff
run: |
. venv/Scripts/activate
poetry run ruff format
ruff format

- name: Type check with Mypy
run: |
. venv/Scripts/activate
poetry run mypy .
mypy .

- name: Tests with Pytest
id: pytest
continue-on-error: true
run: |
. venv/Scripts/activate
PYTHONPATH=${PWD} poetry run pytest
PYTHONPATH=${PWD} pytest

- name: Create GitHub issue on failure
if: ${{ steps.pytest.outcome == 'failure' }}
Expand All @@ -109,8 +104,8 @@ jobs:
- name: Package and check
run: |
. venv/Scripts/activate
poetry build
poetry check
uv build
uvx twine check dist/*

ubuntu:
name: Build on Ubuntu
Expand All @@ -136,48 +131,43 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Cache Poetry dependencies
- name: Set up uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6

- name: Cache uv dependencies
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: |
~/.cache/pypoetry/cache
~/.cache/pypoetry/artifacts
key: poetry-ubuntu-${{ hashFiles('poetry.lock') }}
restore-keys: poetry-ubuntu-

- name: Create virtual environment and install Poetry
run: |
python -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install poetry==2.3.3
path: ~/.cache/uv
key: uv-ubuntu-${{ hashFiles('pyproject.toml') }}
restore-keys: uv-ubuntu-

- name: Install dependencies with Poetry
- name: Create virtual environment and install dependencies
run: |
uv venv venv
. venv/bin/activate
poetry install --with dev
uv pip install -e ".[dev]"

- name: Check and fix with Ruff
run: |
. venv/bin/activate
poetry run ruff check ./tests/*.py ./openseries/*.py --fix --exit-non-zero-on-fix
ruff check ./tests/*.py ./openseries/*.py --fix --exit-non-zero-on-fix

- name: Format with Ruff
run: |
. venv/bin/activate
poetry run ruff format
ruff format

- name: Type check with Mypy
run: |
. venv/bin/activate
poetry run mypy .
mypy .

- name: Tests with Pytest
id: pytest
continue-on-error: true
run: |
. venv/bin/activate
PYTHONPATH=${PWD} poetry run pytest
PYTHONPATH=${PWD} pytest

- name: Create GitHub issue on failure
if: ${{ steps.pytest.outcome == 'failure' }}
Expand All @@ -203,8 +193,8 @@ jobs:
- name: Package and check
run: |
. venv/bin/activate
poetry build
poetry check
uv build
uvx twine check dist/*

macos:
name: Build on macOS
Expand All @@ -230,48 +220,43 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Cache Poetry dependencies
- name: Set up uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6

- name: Cache uv dependencies
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: |
~/Library/Caches/pypoetry/cache
~/Library/Caches/pypoetry/artifacts
key: poetry-macos-${{ hashFiles('poetry.lock') }}
restore-keys: poetry-macos-

- name: Create virtual environment and install Poetry
run: |
python -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install poetry==2.3.3
path: ~/.cache/uv
key: uv-macos-${{ hashFiles('pyproject.toml') }}
restore-keys: uv-macos-

- name: Install dependencies with Poetry
- name: Create virtual environment and install dependencies
run: |
uv venv venv
. venv/bin/activate
poetry install --with dev
uv pip install -e ".[dev]"

- name: Check and fix with Ruff
run: |
. venv/bin/activate
poetry run ruff check ./tests/*.py ./openseries/*.py --fix --exit-non-zero-on-fix
ruff check ./tests/*.py ./openseries/*.py --fix --exit-non-zero-on-fix

- name: Format with Ruff
run: |
. venv/bin/activate
poetry run ruff format
ruff format

- name: Type check with Mypy
run: |
. venv/bin/activate
poetry run mypy .
mypy .

- name: Tests with Pytest
id: pytest
continue-on-error: true
run: |
. venv/bin/activate
PYTHONPATH=${PWD} poetry run pytest
PYTHONPATH=${PWD} pytest

- name: Create GitHub issue on failure
if: ${{ steps.pytest.outcome == 'failure' }}
Expand All @@ -297,5 +282,5 @@ jobs:
- name: Package and check
run: |
. venv/bin/activate
poetry build
poetry check
uv build
uvx twine check dist/*
31 changes: 12 additions & 19 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,40 +37,36 @@ jobs:
with:
python-version-file: '.python-version'

- name: Create virtual environment
run: python -m venv venv
- name: Set up uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6

- name: Install Poetry
- name: Create virtual environment and install dependencies
run: |
uv venv venv
. venv/bin/activate
pip install poetry==2.3.3

- name: Install dependencies with Poetry
run: |
. venv/bin/activate
poetry install --with dev
poetry show -l
uv pip install -e ".[dev]"
uv pip list

- name: Check and fix with Ruff
run: |
. venv/bin/activate
poetry run ruff check ./tests/*.py ./openseries/*.py --fix --exit-non-zero-on-fix
ruff check ./tests/*.py ./openseries/*.py --fix --exit-non-zero-on-fix

- name: Format with Ruff
run: |
. venv/bin/activate
poetry run ruff format
ruff format

- name: Type check with Mypy
run: |
. venv/bin/activate
poetry run mypy .
mypy .

- name: Tests with Pytest
id: pytest
run: |
. venv/bin/activate
PYTHONPATH=${PWD} poetry run pytest
PYTHONPATH=${PWD} pytest

- name: Create GitHub issue on failure
if: ${{ failure() }}
Expand Down Expand Up @@ -209,11 +205,8 @@ jobs:

- name: Build distributions (sdist + wheel)
run: |
python -m venv venv
. venv/bin/activate
pip install poetry==2.3.3
poetry build
poetry check
uv build
uvx twine check dist/*

- name: Upload dist artifacts
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
Expand Down
25 changes: 10 additions & 15 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,21 @@ jobs:
with:
python-version-file: '.python-version'

- name: Manage Poetry cache
- name: Set up uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6

- name: Manage uv cache
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: |
~/.cache/pypoetry/cache
~/.cache/pypoetry/artifacts
key: poetry-cache-${{ runner.os }}-${{ hashFiles('poetry.lock') }}
restore-keys: poetry-cache-${{ runner.os }}-

- name: Create virtual environment and install Poetry
run: |
python -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install poetry==2.3.3
path: ~/.cache/uv
key: uv-cache-${{ runner.os }}-${{ hashFiles('pyproject.toml') }}
restore-keys: uv-cache-${{ runner.os }}-

- name: Install dependencies with Poetry
- name: Create virtual environment and install dependencies
run: |
uv venv venv
. venv/bin/activate
poetry install --with docs
uv pip install -e ".[docs]"

- name: Build documentation
run: |
Expand Down
35 changes: 15 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,37 +43,32 @@ jobs:
with:
python-version-file: '.python-version'

- name: Manage Poetry cache
- name: Set up uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6

- name: Manage uv cache
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
id: poetry-cache
id: uv-cache
with:
path: |
~/.cache/pypoetry/cache
~/.cache/pypoetry/artifacts
key: poetry-cache-${{ runner.os }}-${{ hashFiles('poetry.lock') }}
restore-keys: poetry-cache-${{ runner.os }}-

- name: Create virtual environment and install Poetry
run: |
python -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install poetry==2.3.3
path: ~/.cache/uv
key: uv-cache-${{ runner.os }}-${{ hashFiles('pyproject.toml') }}
restore-keys: uv-cache-${{ runner.os }}-

- name: Install dependencies with Poetry
- name: Create virtual environment and install dependencies
run: |
uv venv venv
. venv/bin/activate
poetry install --with dev
uv pip install -e ".[dev]"

- name: Check and fix with Ruff
run: |
. venv/bin/activate
poetry run ruff check ./tests/*.py ./openseries/*.py --fix --exit-non-zero-on-fix
ruff check ./tests/*.py ./openseries/*.py --fix --exit-non-zero-on-fix

- name: Format with Ruff
run: |
. venv/bin/activate
poetry run ruff format
ruff format

- name: Manage Mypy cache
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
Expand All @@ -86,14 +81,14 @@ jobs:
- name: Type check with Mypy
run: |
. venv/bin/activate
poetry run mypy --cache-dir .mypy_cache .
mypy --cache-dir .mypy_cache .

- name: Tests with Pytest
id: pytest
continue-on-error: true
run: |
. venv/bin/activate
PYTHONPATH=${PWD} poetry run pytest
PYTHONPATH=${PWD} pytest

- name: Create GitHub issue on failure
if: ${{ steps.pytest.outcome == 'failure' }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ junit.xml
# Environments
/venv/

# Setuptools / editable-install metadata (regenerated on pip/uv install -e)
*.egg-info/

# Pycharm
/.idea/

Expand Down
Loading
Loading