From 89de48562fb3ed9fd5a5267f4a96dbe8bf224643 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 4 May 2026 21:14:31 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v5.0.0...v6.0.0) - [github.com/codespell-project/codespell: v2.3.0 → v2.4.2](https://github.com/codespell-project/codespell/compare/v2.3.0...v2.4.2) - [github.com/astral-sh/ruff-pre-commit: v0.7.2 → v0.15.12](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.2...v0.15.12) - [github.com/abravalheri/validate-pyproject: v0.22 → v0.25](https://github.com/abravalheri/validate-pyproject/compare/v0.22...v0.25) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6557e47..3878b93 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-toml - id: check-yaml @@ -19,21 +19,21 @@ repos: - id: requirements-txt-fixer - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 + rev: v2.4.2 hooks: - id: codespell additional_dependencies: - tomli - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.2 + rev: v0.15.12 hooks: - id: ruff args: ["--fix", "--show-fixes"] - id: ruff-format - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.22 + rev: v0.25 hooks: - id: validate-pyproject From 1fe00be250a4816af7fc68373a5280fd6e368a7d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 4 May 2026 21:14:39 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- aok/core/kd_utils/Kd_analysis.py | 6 ++---- aok/core/main.py | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/aok/core/kd_utils/Kd_analysis.py b/aok/core/kd_utils/Kd_analysis.py index 7d1504b..136d8fb 100644 --- a/aok/core/kd_utils/Kd_analysis.py +++ b/aok/core/kd_utils/Kd_analysis.py @@ -612,9 +612,7 @@ def _fit_kd_with_method( ) return kd, e0, nf - raise ValueError( - f"Unknown kd_fit_method: {method!r}. " f"Choose from {KD_FIT_METHODS}" - ) + raise ValueError(f"Unknown kd_fit_method: {method!r}. Choose from {KD_FIT_METHODS}") # another solution is to calculate kd without hist @@ -849,7 +847,7 @@ def calculate_kd( else: expected_nf_per_bin = None logging.info( - "Hybrid: insufficient noise floor estimates (%d), " "skipping pass 2", + "Hybrid: insufficient noise floor estimates (%d), skipping pass 2", len(valid_nf_all), ) diff --git a/aok/core/main.py b/aok/core/main.py index 9168ef0..864c21b 100644 --- a/aok/core/main.py +++ b/aok/core/main.py @@ -284,9 +284,9 @@ def run_pipeline(args): ["relative_AT_dist", "lat_bins", "photon_height"] ].drop_duplicates() unique_photon_dataset["relative_AT_dist_center"] = ( - unique_photon_dataset.groupby( - "lat_bins", observed=False - )["relative_AT_dist"].transform("mean") + unique_photon_dataset.groupby("lat_bins", observed=False)[ + "relative_AT_dist" + ].transform("mean") ) _closest_rows = []