From 9d4cd722f47681144d8882749155301e17199e75 Mon Sep 17 00:00:00 2001 From: maxime Date: Mon, 16 Nov 2026 17:34:59 +0100 Subject: [PATCH] categories: the reader also from the caller's tools/ link, for a copy outside the home directory Co-Authored-By: Claude Opus 5.5 --- scripts/categories.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/categories.py b/scripts/categories.py index 09b7bdd..b97e220 100644 --- a/scripts/categories.py +++ b/scripts/categories.py @@ -21,9 +21,10 @@ from datetime import datetime, timedelta, timezone from pathlib import Path # The detectors next to this file, and the single reader of the measurements: data.py of the tools repository, the -# sibling of this one (one copy of each repository in the home directory). +# sibling of this one (one copy of each repository in the home directory), else the tools/ link of the caller's root +# (a copy of this repository elsewhere, e.g. extracted by git archive). HERE = Path(__file__).resolve().parent -sys.path[:0] = [str(HERE), str(HERE.parents[1] / "aimsight-tools" / "scripts")] +sys.path[:0] = [str(HERE), str(HERE.parents[1] / "aimsight-tools" / "scripts"), str(Path.cwd() / "tools" / "scripts")] from common import targets # noqa: E402 from data import iso, load # noqa: E402