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
108 changes: 36 additions & 72 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,52 +42,40 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Cache Poetry 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
- name: Set up uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0

- 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' }}
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
GH_OWNER: ${{ github.repository_owner }}
GH_REPO: ${{ github.event.repository.name }}
Expand All @@ -109,8 +97,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,52 +124,40 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Cache Poetry 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
- name: Set up uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0

- 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' }}
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
GH_OWNER: ${{ github.repository_owner }}
GH_REPO: ${{ github.event.repository.name }}
Expand All @@ -203,8 +179,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,52 +206,40 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Cache Poetry 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
- name: Set up uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0

- 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' }}
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
GH_OWNER: ${{ github.repository_owner }}
GH_REPO: ${{ github.event.repository.name }}
Expand All @@ -297,5 +261,5 @@ jobs:
- name: Package and check
run: |
. venv/bin/activate
poetry build
poetry check
uv build
uvx twine check dist/*
37 changes: 15 additions & 22 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,44 +37,40 @@ 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@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0

- 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() }}
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
GH_OWNER: ${{ github.repository_owner }}
GH_REPO: ${{ github.event.repository.name }}
Expand Down Expand Up @@ -209,14 +205,11 @@ 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
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: dist
path: dist/*
Expand Down Expand Up @@ -279,7 +272,7 @@ jobs:
actions: write # Required for actions.createWorkflowDispatch to trigger docs workflow
steps:
- name: Trigger documentation update
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
await github.rest.actions.createWorkflowDispatch({
Expand Down
24 changes: 6 additions & 18 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,14 @@ jobs:
with:
python-version-file: '.python-version'

- name: Manage Poetry 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
- name: Set up uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0

- 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 All @@ -93,7 +81,7 @@ jobs:
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0

- name: Upload to GitHub Pages
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: docs/build/html

Expand Down
Loading
Loading