From ca6f4e65d4a3205abf084e493e1c17f70364dbd7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Aug 2026 17:59:21 +0000 Subject: [PATCH 1/2] chore: update pre-commit hooks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.15.12 → v0.16.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.12...v0.16.1) - [github.com/codespell-project/codespell: v2.4.2 → v2.4.3](https://github.com/codespell-project/codespell/compare/v2.4.2...v2.4.3) - [github.com/pycqa/isort: 9.0.0a3 → 9.0.0b1](https://github.com/pycqa/isort/compare/9.0.0a3...9.0.0b1) - [github.com/pre-commit/mirrors-mypy: v1.20.2 → v2.3.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.20.2...v2.3.0) - [github.com/scientific-python/cookie: 2026.04.04 → 2026.06.18](https://github.com/scientific-python/cookie/compare/2026.04.04...2026.06.18) - [github.com/numpy/numpydoc: v1.10.0 → v1.11.0rc0](https://github.com/numpy/numpydoc/compare/v1.10.0...v1.11.0rc0) --- .pre-commit-config.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6f7521e..0e4c0c1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,7 +40,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.15.12" + rev: "v0.16.1" hooks: - id: ruff-check types: [file, python] @@ -49,7 +49,7 @@ repos: types: [file, python] - repo: https://github.com/codespell-project/codespell - rev: "v2.4.2" + rev: "v2.4.3" hooks: - id: codespell types_or: [asciidoc, python, markdown, rst] @@ -58,7 +58,7 @@ repos: - repo: https://github.com/pycqa/isort - rev: '9.0.0a3' + rev: '9.0.0b1' hooks: - id: isort name: isort (cython) @@ -72,7 +72,7 @@ repos: types: [file, python] - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v1.20.2' + rev: 'v2.3.0' hooks: - id: mypy exclude: 'noxfile\.py|docs/conf\.py' @@ -84,14 +84,14 @@ repos: - id: validate-pyproject - repo: https://github.com/scientific-python/cookie - rev: 2026.04.04 + rev: 2026.06.18 hooks: - id: sp-repo-review additional_dependencies: ["repo-review[cli]"] args: ["--show=errskip"] - repo: https://github.com/numpy/numpydoc - rev: v1.10.0 + rev: v1.11.0rc0 hooks: - id: numpydoc-validation types: [file, python] From 885a205b61743aa652ba8ea5e27cbdaf6a08b5cf Mon Sep 17 00:00:00 2001 From: Henry <84939917+HGWright@users.noreply.github.com> Date: Wed, 19 Aug 2026 12:05:24 +0100 Subject: [PATCH 2/2] Add license headers to .py files (#441) * add regex to accept the license header * revert to latest versions --- .pre-commit-config.yaml | 4 ++-- pyproject.toml | 3 +++ setup.py | 4 ++++ src/stratify/__init__.py | 4 ++++ src/stratify/_bounded_vinterp.py | 4 ++++ src/stratify/tests/__init__.py | 4 ++++ src/stratify/tests/performance.py | 4 ++++ src/stratify/tests/test_bounded_vinterp.py | 4 ++++ src/stratify/tests/test_vinterp.py | 4 ++++ 9 files changed, 33 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0e4c0c1..5b64c90 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -58,7 +58,7 @@ repos: - repo: https://github.com/pycqa/isort - rev: '9.0.0b1' + rev: '8.0.1' hooks: - id: isort name: isort (cython) @@ -91,7 +91,7 @@ repos: args: ["--show=errskip"] - repo: https://github.com/numpy/numpydoc - rev: v1.11.0rc0 + rev: v1.10.0 hooks: - id: numpydoc-validation types: [file, python] diff --git a/pyproject.toml b/pyproject.toml index 9adc4f4..9a8030c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -232,6 +232,9 @@ ignore = [ "D212", # Multi-line docstring summary should start at the first line ] +[tool.ruff.lint.flake8-copyright] +notice-rgx = "(?i)copyright.*python-stratify contributors" + [tool.ruff.lint.isort] force-sort-within-sections = true # Change to match specific package name: diff --git a/setup.py b/setup.py index 964cba9..b45b91f 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,7 @@ +# Copyright python-stratify contributors +# +# This file is part of python-stratify and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. import os from pathlib import Path import sys diff --git a/src/stratify/__init__.py b/src/stratify/__init__.py index 8e8d518..a93ca9a 100644 --- a/src/stratify/__init__.py +++ b/src/stratify/__init__.py @@ -1,3 +1,7 @@ +# Copyright python-stratify contributors +# +# This file is part of python-stratify and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. from ._bounded_vinterp import interpolate_conservative # noqa: F401 from ._version import version as __version__ # noqa: F401 from ._vinterp import * # noqa: F403 diff --git a/src/stratify/_bounded_vinterp.py b/src/stratify/_bounded_vinterp.py index 2c520d0..01367ac 100644 --- a/src/stratify/_bounded_vinterp.py +++ b/src/stratify/_bounded_vinterp.py @@ -1,3 +1,7 @@ +# Copyright python-stratify contributors +# +# This file is part of python-stratify and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. import numpy as np from ._conservative import conservative_interpolation diff --git a/src/stratify/tests/__init__.py b/src/stratify/tests/__init__.py index e69de29..41dc598 100644 --- a/src/stratify/tests/__init__.py +++ b/src/stratify/tests/__init__.py @@ -0,0 +1,4 @@ +# Copyright python-stratify contributors +# +# This file is part of python-stratify and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. diff --git a/src/stratify/tests/performance.py b/src/stratify/tests/performance.py index 88e6616..48ff67b 100644 --- a/src/stratify/tests/performance.py +++ b/src/stratify/tests/performance.py @@ -1,3 +1,7 @@ +# Copyright python-stratify contributors +# +# This file is part of python-stratify and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. """Functions that may be used to measure performance of a component.""" import dask.array as da diff --git a/src/stratify/tests/test_bounded_vinterp.py b/src/stratify/tests/test_bounded_vinterp.py index 06ba948..22100b8 100644 --- a/src/stratify/tests/test_bounded_vinterp.py +++ b/src/stratify/tests/test_bounded_vinterp.py @@ -1,3 +1,7 @@ +# Copyright python-stratify contributors +# +# This file is part of python-stratify and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. import unittest import numpy as np diff --git a/src/stratify/tests/test_vinterp.py b/src/stratify/tests/test_vinterp.py index 27ebb68..28262ad 100644 --- a/src/stratify/tests/test_vinterp.py +++ b/src/stratify/tests/test_vinterp.py @@ -1,3 +1,7 @@ +# Copyright python-stratify contributors +# +# This file is part of python-stratify and is released under the BSD license. +# See LICENSE in the root of the repository for full licensing details. import unittest import dask.array as da