Skip to content
Closed
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
42 changes: 20 additions & 22 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
pull_request:
push:
branches:
- "*"
- "*"
tags:
- "v*"
- "v*"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
Expand All @@ -16,7 +16,6 @@ env:
FORCE_COLOR: 1

jobs:

package:
name: Build & inspect our package.
runs-on: ubuntu-latest
Expand All @@ -34,11 +33,11 @@ jobs:
strategy:
fail-fast: false
matrix:
python_version: [ '3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.10' ]
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.10"]
os: [windows-latest, ubuntu-latest] #, macos-latest]
include:
- os: windows-latest
python_version: 'msys2'
- os: windows-latest
python_version: "msys2"

name: ${{ matrix.os }} - Python ${{ matrix.python_version }}
steps:
Expand Down Expand Up @@ -97,32 +96,31 @@ jobs:
timeout-minutes: 15

dist_upload:

runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
permissions:
id-token: write
needs: [test]
steps:
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

test-pypi-upload:
runs-on: ubuntu-latest
needs: [test]
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- name: Publish package to PyPI
continue-on-error: true
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- name: Publish package to PyPI
continue-on-error: true
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
52 changes: 25 additions & 27 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,36 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: check-yaml
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
- id: ruff-format

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.7.0
hooks:
- id: pyproject-fmt
exclude: docs/examples/

- repo: https://github.com/pre-commit/mirrors-mypy
- id: trailing-whitespace
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
- id: ruff-format
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.7.0
hooks:
- id: pyproject-fmt
exclude: docs/examples/
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
hooks:
- id: mypy
- id: mypy
args: [--strict]
language_version: "3.10"
additional_dependencies:
- types-setuptools
- tokenize-rt==3.2.0
- pytest == 7.1
- importlib_metadata
- typing-extensions>=4.5
- rich

- repo: https://github.com/scientific-python/cookie
- types-setuptools
- tokenize-rt==3.2.0
- pytest == 7.1
- importlib_metadata
- typing-extensions>=4.5
- rich
- repo: https://github.com/scientific-python/cookie
rev: 2024.04.23
hooks:
- id: sp-repo-review
8 changes: 4 additions & 4 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mkdocs:
# Optionally declare the Python requirements required to build your docs
python:
install:
- method: pip
path: .
extra_requirements:
- docs
- method: pip
path: .
extra_requirements:
- docs
Loading
Loading