diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 843134f..4d6b5a9 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -1,48 +1,50 @@ +--- name: Checks on: - push: - branches: - - master - pull_request: - branches: - - master + push: + branches: + - master + pull_request: + branches: + - master jobs: - build: + build: + runs-on: ubuntu-latest - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - python-version: "3.13" # Keep in sync with .readthedocs.yml - env: - TOXENV: docs - - python-version: "3.13" - env: - TOXENV: pre-commit - - python-version: "3.13" - env: - TOXENV: pylint - - python-version: "3.13" - env: - TOXENV: typing - - python-version: "3.13" - env: - TOXENV: twinecheck + strategy: + fail-fast: false + matrix: + include: + # Keep in sync with .readthedocs.yml + - python-version: '3.13' + env: + TOXENV: docs + - python-version: '3.13' + env: + TOXENV: pre-commit + - python-version: '3.13' + env: + TOXENV: pylint + - python-version: '3.13' + env: + TOXENV: typing + - python-version: '3.13' + env: + TOXENV: twinecheck - steps: - - uses: actions/checkout@v4 + steps: + - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - - name: Run check - env: ${{ matrix.env }} - run: | - pip install --upgrade pip - pip install --upgrade tox - tox + - name: Run check + env: ${{ matrix.env }} + run: | + pip install --upgrade pip + pip install --upgrade tox + tox diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f6e80b9..5cb1ffb 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,34 +1,36 @@ +--- name: Publish on: - push: - tags: - - v* + push: + tags: + - v* jobs: - publish: - runs-on: ubuntu-latest + publish: + runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 + steps: + - uses: actions/checkout@v4 - - name: Set up Python 3.13 - uses: actions/setup-python@v5 - with: - python-version: 3.13 + - name: Set up Python 3.13 + uses: actions/setup-python@v5 + with: + python-version: '3.13' - - name: Check Tag - id: check-release-tag - run: | - if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+[.][0-9]+[.][0-9]+(rc[0-9]+|[.]dev[0-9]+)?$ ]]; then - echo ::set-output name=release_tag::true - fi + - name: Check Tag + id: check-release-tag + run: | + RE="^refs/tags/v[0-9]+[.][0-9]+[.][0-9]+(rc[0-9]+|[.]dev[0-9]+)?$" + if [[ ${{ github.event.ref }} =~ $RE ]]; then + echo ::set-output name=release_tag::true + fi - - name: Publish to PyPI - if: steps.check-release-tag.outputs.release_tag == 'true' - run: | - pip install --upgrade build twine - python -m build - export TWINE_USERNAME=__token__ - export TWINE_PASSWORD=${{ secrets.PYPI_TOKEN }} - twine upload dist/* + - name: Publish to PyPI + if: steps.check-release-tag.outputs.release_tag == 'true' + run: | + pip install --upgrade build twine + python -m build + export TWINE_USERNAME=__token__ + export TWINE_PASSWORD=${{ secrets.PYPI_TOKEN }} + twine upload dist/* diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index 30fe097..6682858 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -1,35 +1,44 @@ +--- name: macOS on: - push: - branches: - - master - pull_request: - branches: - - master + push: + branches: + - master + pull_request: + branches: + - master jobs: - tests: + tests: + runs-on: macos-latest - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14.0-rc.1"] + strategy: + fail-fast: false + matrix: + python-version: + - '3.9' + - '3.10' + - '3.11' + - '3.12' + - '3.13' + - 3.14.0-rc.1 + - pypy3.10 + - pypy3.11 - steps: - - uses: actions/checkout@v4 + steps: + - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - - name: Run tests - run: | - pip install --upgrade pip - pip install --upgrade tox - tox -e py + - name: Run tests + run: | + pip install --upgrade pip + pip install --upgrade tox + tox -e py - - name: Upload coverage report - uses: codecov/codecov-action@v5 + - name: Upload coverage report + uses: codecov/codecov-action@v5 diff --git a/.github/workflows/tests-ubuntu.yml b/.github/workflows/tests-ubuntu.yml index 2358254..7f05f94 100644 --- a/.github/workflows/tests-ubuntu.yml +++ b/.github/workflows/tests-ubuntu.yml @@ -1,35 +1,44 @@ +--- name: Ubuntu on: - push: - branches: - - master - pull_request: - branches: - - master + push: + branches: + - master + pull_request: + branches: + - master jobs: - tests: + tests: + runs-on: ubuntu-latest - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14.0-rc.1", "pypy3.10", "pypy3.11"] + strategy: + fail-fast: false + matrix: + python-version: + - '3.9' + - '3.10' + - '3.11' + - '3.12' + - '3.13' + - 3.14.0-rc.1 + - pypy3.10 + - pypy3.11 - steps: - - uses: actions/checkout@v4 + steps: + - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - - name: Run tests - run: | - pip install --upgrade pip - pip install --upgrade tox - tox -e py + - name: Run tests + run: | + pip install --upgrade pip + pip install --upgrade tox + tox -e py - - name: Upload coverage report - uses: codecov/codecov-action@v5 + - name: Upload coverage report + uses: codecov/codecov-action@v5 diff --git a/.github/workflows/tests-windows.yml b/.github/workflows/tests-windows.yml index 9087e72..c846e54 100644 --- a/.github/workflows/tests-windows.yml +++ b/.github/workflows/tests-windows.yml @@ -1,35 +1,44 @@ +--- name: Windows on: - push: - branches: - - master - pull_request: - branches: - - master + push: + branches: + - master + pull_request: + branches: + - master jobs: - tests: + tests: + runs-on: windows-latest - runs-on: windows-latest - strategy: - fail-fast: false - matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14.0-rc.1"] + strategy: + fail-fast: false + matrix: + python-version: + - '3.9' + - '3.10' + - '3.11' + - '3.12' + - '3.13' + - 3.14.0-rc.1 + - pypy3.10 + - pypy3.11 - steps: - - uses: actions/checkout@v4 + steps: + - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - - name: Run tests - run: | - pip install --upgrade pip - pip install --upgrade tox - tox -e py + - name: Run tests + run: | + pip install --upgrade pip + pip install --upgrade tox + tox -e py - - name: Upload coverage report - uses: codecov/codecov-action@v5 + - name: Upload coverage report + uses: codecov/codecov-action@v5 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 119b328..7c59a32 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,22 +1,32 @@ +--- repos: -- repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.5 - hooks: - - id: ruff-check - args: [ --fix ] - - id: ruff-format -- repo: https://github.com/adamchainz/blacken-docs - rev: 1.19.1 - hooks: - - id: blacken-docs - additional_dependencies: - - black==25.1.0 -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 - hooks: - - id: end-of-file-fixer - - id: trailing-whitespace -- repo: https://github.com/sphinx-contrib/sphinx-lint - rev: v1.0.0 - hooks: - - id: sphinx-lint + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.12.5 + hooks: + - id: ruff-check + args: [--fix] + - id: ruff-format + - repo: https://github.com/adamchainz/blacken-docs + rev: 1.19.1 + hooks: + - id: blacken-docs + additional_dependencies: + - black==25.1.0 + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: end-of-file-fixer + - id: trailing-whitespace + - repo: https://github.com/sphinx-contrib/sphinx-lint + rev: v1.0.0 + hooks: + - id: sphinx-lint + - repo: https://github.com/adrienverge/yamllint.git + rev: v1.37.1 + hooks: + - id: yamllint + args: [--format, parsable, --strict, -d, '{rules: {truthy: {check-keys: false}}}'] + - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt + rev: 0.2.3 + hooks: + - id: yamlfmt diff --git a/.readthedocs.yml b/.readthedocs.yml index 2b53eb1..a9c62c2 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,15 +1,16 @@ +--- version: 2 formats: all sphinx: - configuration: docs/conf.py - fail_on_warning: true + configuration: docs/conf.py + fail_on_warning: true build: - os: ubuntu-24.04 - tools: - # For available versions, see: - # https://docs.readthedocs.io/en/stable/config-file/v2.html#build-tools-python - python: "3.13" # Keep in sync with .github/workflows/build.yml + os: ubuntu-24.04 + tools: + # For available versions, see: + # https://docs.readthedocs.io/en/stable/config-file/v2.html#build-tools-python + python: '3.13' # Keep in sync with .github/workflows/build.yml python: - install: - - requirements: docs/requirements.txt - - path: . + install: + - requirements: docs/requirements.txt + - path: . diff --git a/codecov.yml b/codecov.yml index d8aa6b9..c8661fb 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,6 +1,7 @@ +--- comment: - layout: "header, diff, tree" + layout: header, diff, tree coverage: - status: - project: false + status: + project: false