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
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ updates:
schedule:
interval: "daily"
ignore:
# Offical actions have moving tags like v1
# Official actions have moving tags like v1
# that are used, so they don't need updates here
- dependency-name: "actions/*"
54 changes: 27 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ on:
merge_group:
push:
branches:
- master
- main
- develop
- master
- main
- develop

jobs:
pre-commit:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-python@v3
with:
python-version: 3.12
- uses: pre-commit/action@v3.0.0
with:
extra_args: --hook-stage manual --all-files
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-python@v3
with:
python-version: 3.12
- uses: pre-commit/action@v3.0.0
with:
extra_args: --hook-stage manual --all-files

checks:
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
Expand All @@ -37,21 +37,21 @@ jobs:
runs-on: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
fetch-tags: true
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
fetch-tags: true

- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install package
run: python -m pip install . --group test
- name: Install package
run: python -m pip install . --group test

- name: Test package
run: python -m pytest -ra
- name: Test package
run: pytest

checkroot:
name: Check ROOT bindings
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:

- name: Test package
shell: bash -l {0}
run: python -m pytest -ra
run: pytest

pass:
name: All tests passed
Expand Down
54 changes: 27 additions & 27 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,37 @@ on:
workflow_dispatch:
push:
branches:
- master
- main
- master
- main

jobs:
docs:
name: Build and deploy docs
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- uses: actions/setup-python@v2
with:
python-version: 3.12

- name: Install pandoc
uses: r-lib/actions/setup-pandoc@v2

- name: Install package
run: python -m pip install . --group docs

- name: Build documentation
run: |
cd docs
make
touch build/html/.nojekyll

- name: Deploy documentation
uses: peaceiris/actions-gh-pages@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html
- uses: actions/checkout@v2
with:
submodules: recursive

- uses: actions/setup-python@v2
with:
python-version: 3.12

- name: Install pandoc
uses: r-lib/actions/setup-pandoc@v2

- name: Install package
run: python -m pip install . --group docs

- name: Build documentation
run: |
cd docs
make
touch build/html/.nojekyll

- name: Deploy documentation
uses: peaceiris/actions-gh-pages@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html
64 changes: 32 additions & 32 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ jobs:
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-tags: true
fetch-depth: 0
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-tags: true
fetch-depth: 0

- name: Build SDist
run: pipx run build --sdist
- name: Build SDist
run: pipx run build --sdist

- uses: actions/upload-artifact@v4
with:
name: artifact-sdist
path: dist/*.tar.gz
- uses: actions/upload-artifact@v4
with:
name: artifact-sdist
path: dist/*.tar.gz

build_wheels:
name: Wheel on ${{ matrix.os }} (${{ matrix.arch }})
Expand All @@ -42,22 +42,22 @@ jobs:
arch: universal2

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-tags: true
fetch-depth: 0
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-tags: true
fetch-depth: 0

- uses: pypa/cibuildwheel@v3.3
env:
CIBW_ARCHS: ${{ matrix.arch }}
MACOSX_DEPLOYMENT_TARGET: 11.0
- uses: pypa/cibuildwheel@v3.3
env:
CIBW_ARCHS: ${{ matrix.arch }}
MACOSX_DEPLOYMENT_TARGET: 11.0

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: artifact-wheel-${{ matrix.os }}-${{ matrix.arch }}
path: wheelhouse/*.whl
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: artifact-wheel-${{ matrix.os }}-${{ matrix.arch }}
path: wheelhouse/*.whl

pypi-publish:
needs: [build_wheels, make_sdist]
Expand All @@ -67,11 +67,11 @@ jobs:
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
path: dist
pattern: artifact-*
merge-multiple: true
- uses: actions/download-artifact@v4
with:
path: dist
pattern: artifact-*
merge-multiple: true

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
109 changes: 66 additions & 43 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,67 @@
repos:
- repo: https://github.com/psf/black
rev: 25.9.0
hooks:
- id: black

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: requirements-txt-fixer
- id: trailing-whitespace

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort

- repo: https://github.com/asottile/pyupgrade
rev: v3.21.0
hooks:
- id: pyupgrade
args: ["--py39-plus"]

- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
exclude: docs/conf.py
additional_dependencies: [flake8-bugbear, flake8-print]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.17.1
hooks:
- id: mypy
pass_filenames: false # to allow mypy to respect pyproject.toml config
additional_dependencies: [uhi, pydantic, numpy]
- repo: https://github.com/adamchainz/blacken-docs
rev: "1.19.1"
hooks:
- id: blacken-docs
additional_dependencies: [black==24.*]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v5.0.0"
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: name-tests-test
args: ["--pytest-test-first"]
- id: trailing-whitespace

- repo: https://github.com/rbubley/mirrors-prettier
rev: "v3.4.2"
hooks:
- id: prettier
types_or: [yaml, markdown, html, css, scss, javascript, json]
args: [--prose-wrap=always]
exclude: binder/mycorrections.json

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.9.2"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format

- repo: https://github.com/codespell-project/codespell
rev: "v2.3.0"
hooks:
- id: codespell

- repo: https://github.com/abravalheri/validate-pyproject
rev: "v0.23"
hooks:
- id: validate-pyproject
additional_dependencies: ["validate-pyproject-schema-store[all]"]

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: "0.31.0"
hooks:
- id: check-dependabot
- id: check-github-workflows
- id: check-readthedocs

- repo: https://github.com/asottile/pyupgrade
rev: v3.21.0
hooks:
- id: pyupgrade
args: ["--py39-plus"]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.17.1
hooks:
- id: mypy
pass_filenames: false # to allow mypy to respect pyproject.toml config
additional_dependencies: [uhi, pydantic, numpy]
21 changes: 0 additions & 21 deletions .readthedocs.yml

This file was deleted.

Loading
Loading