Skip to content
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
17 changes: 9 additions & 8 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
- name: Install uv
uses: astral-sh/setup-uv@v9.0.0
with:
python-version: 3.14
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
python-version: "3.14"
- name: Install Dependencies
run: uv sync --group coverage
- name: Run Tests and Record Coverage
working-directory: unittests
run: |
tox -e coverage
uv run coverage run -m pytest --basetemp=.tmp
uv run coverage html --omit .venv/*,unittests/*
uv run coverage report --fail-under 80 --omit .venv/*,unittests/*
17 changes: 6 additions & 11 deletions .github/workflows/dev_test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "Test Dev Environment"
# Checks that the dev environment (tox -e dev) can be set up.
# This might not work, if different linting/testing envs refer to different versions of the same lib (e.g. typing-extensions).
# Different versions of the same package might work for isolated specific envs (only linting, only testing...) but the dev environment inherits from all of them.
# Checks that the dev environment (uv sync --group dev) can be set up.
# This might not work, if different linting/testing groups refer to different versions of the same lib (e.g. typing-extensions).
# Different versions of the same package might work for isolated specific groups (only linting, only testing...) but the dev group inherits from all of them.
on:
push:
branches: [main]
Expand All @@ -15,14 +15,9 @@ jobs:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
- name: Install uv
uses: astral-sh/setup-uv@v9.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Create a Dev Environment
run: |
tox -e dev
run: uv sync --group dev
13 changes: 5 additions & 8 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,11 @@ jobs:
tool: ["black", "isort"]
steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
- name: Install uv
uses: astral-sh/setup-uv@v9.0.0
with:
python-version: 3.14
python-version: "3.14"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[formatting]
run: uv sync --group formatting
- name: ${{ matrix.tool }} Code Formatter
run: |
${{ matrix.tool }} . --check
run: uv run ${{ matrix.tool }} . --check
13 changes: 6 additions & 7 deletions .github/workflows/packaging_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
- name: Install uv
uses: astral-sh/setup-uv@v9.0.0
with:
python-version: 3.14
python-version: "3.14"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
run: uv sync --group packaging
- name: Run Packaging Test
run: |
tox -e test_packaging
uv run python -m build
uv run twine check dist/*
26 changes: 10 additions & 16 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,14 @@
# os: [ubuntu-latest]
# steps:
# - uses: actions/checkout@v4
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v5
# - name: Install uv
# uses: astral-sh/setup-uv@v9.0.0
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install tox
# run: |
# python -m pip install --upgrade pip
# pip install tox
# - name: Run tox
# run: |
# tox
# - name: Install dependencies
# run: uv sync --group tests
# - name: Run tests
# run: uv run pytest

# build-n-publish:
# name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
Expand All @@ -49,17 +46,14 @@
# needs: tests
# steps:
# - uses: actions/checkout@v4
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v5
# - name: Install uv
# uses: astral-sh/setup-uv@v9.0.0
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install .[packaging]
# run: uv sync --group packaging
# - name: Build wheel and source distributions
# run: |
# python -m build
# run: uv run python -m build
# - name: Publish distribution 📦 to PyPI
# if: startsWith(github.ref, 'refs/tags/v')
# uses: pypa/gh-action-pypi-publish@release/v1
29 changes: 19 additions & 10 deletions .github/workflows/pythonlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,26 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
linter-env: ["linting", "type_check", "spell_check"]
include:
- linter-env: linting
commands: |
uv run pylint src/mypackage
uv run pylint unittests --rcfile=unittests/.pylintrc
- linter-env: type_check
commands: |
uv run mypy --show-error-codes src/mypackage --strict
uv run mypy --show-error-codes unittests --strict
- linter-env: spell_check
commands: |
uv run codespell --ignore-words=domain-specific-terms.txt src
uv run codespell --ignore-words=domain-specific-terms.txt README.md
steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
- name: Install uv
uses: astral-sh/setup-uv@v9.0.0
with:
python-version: 3.14
python-version: "3.14"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Run ${{ matrix.linter-env }} via Tox
run: |
tox -e ${{ matrix.linter-env }}
run: uv sync --group ${{ matrix.linter-env }}
- name: Run ${{ matrix.linter-env }}
run: ${{ matrix.commands }}
13 changes: 5 additions & 8 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@ jobs:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
- name: Install uv
uses: astral-sh/setup-uv@v9.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Run the Unit Tests via Tox
run: |
tox -e tests
run: uv sync --group tests
- name: Run the Unit Tests
run: uv run pytest
Loading
Loading