Add clean paths util #17

Merged
perl_d merged 5 commits from refactor/tidy into main 2026-08-07 11:07:08 +02:00
5 changed files with 10 additions and 13 deletions
Showing only changes of commit 7f1d29a8cb - Show all commits
+2
View File
@@ -16,6 +16,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup
uses: ./.gitea/actions/install
+4 -6
View File
@@ -54,15 +54,13 @@ skip-magic-trailing-comma = true
profile = "black"
line_length = 100
multi_line_output = 3
split-on-trailing-comma=false
[tool.ruff]
line-length = 100
[tool.ruff.lint]
isort.split-on-trailing-comma=false
[tool.ruff.format]
skip-magic-trailing-comma = true
[dependency-groups]
dev = [
"pytest>=9.1.1",
"pytest-asyncio>=1.4.0",
]
+1 -1
View File
@@ -139,7 +139,7 @@ def find_existing_formatter(
return logging.Formatter(default_fmt, datefmt=default_datefmt)
def attach_to_logger(logger_name: str = "", handler: logging.Handler | None = None):
def attach_to_logger(logger_name: str, handler: logging.Handler):
logging.getLogger(logger_name).addHandler(handler)
-1
View File
@@ -1,4 +1,3 @@
import numpy as np
from pydantic import BaseModel
+3 -5
View File
@@ -40,7 +40,7 @@ def rebuild_array_from_scan_results(
ny_field: str = "ny",
default_value: float = 0.0,
threshold: float | None = None,
condition_func: Callable | None = None,
condition_func: Callable[[float], bool] | None = None,
apply_filter_before: bool = True,
) -> np.ndarray:
positions = []
@@ -403,7 +403,7 @@ def _draw_panel(
import matplotlib.patches as mpatches
import matplotlib.pyplot as plt
from aarecommon.coordinate import Coordinate
from aarecommon.math.coordinate import Coordinate
n_nx, n_ny = arr.shape
max_nx, max_ny = _max_cell(arr)
@@ -570,9 +570,7 @@ CRYSTAL_METHOD_MAP: dict = {
def compare_crystal_methods(
results: list,
arr: np.ndarray | None = None,
grid_size_mm: tuple[float, float] | None = None,
results: list, arr: np.ndarray | None = None, grid_size_mm: tuple[float, float] | None = None
) -> None:
"""Plot each crystal-detection method side-by-side for visual comparison.