Skip to content

Commit f50d28c

Browse files
Jammy2211Jammy2211claude
authored
docs(should_simulate): the point-source "not in this gap" note is repo-specific (#480)
The Known-gap section stated that point-source datasets "are not in this gap: they write a top-level `data.fits` alongside their JSON and are covered normally". That holds in autolens_workspace. It is false in autolens_workspace_test, whose `.gitignore` lists `data.fits` under "Generated artifacts — never check in", so `dataset/point_source/simple` is three tracked JSON files and nothing else — no `SMALLDAT` stamp can exist there under any placement. That is precisely the directory PyAutoArray#470 was about, so the paragraph reassured the reader about the one case that bit us: the capped branch deleted that committed, allowlist-protected directory on every smoke run. Whether a dataset family is reachable by the stamp is decided per repository by that repo's `.gitignore`, never by the family name. Says so, and points at the PyAutoHands guard (PyAutoHands#252) that enforces what a docstring cannot. Docstring only — no behaviour change. Refs #470 Claude-Session: https://claude.ai/code/session_01F11sMzmaVWfU6NCz1PKVVb Co-authored-by: Jammy2211 <JNightingale2211@gmail.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 8745a45 commit f50d28c

1 file changed

Lines changed: 22 additions & 4 deletions

File tree

autoarray/util/dataset_util.py

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,28 @@ def should_simulate(dataset_path):
354354
the reach of a destructive predicate is its own change, with its own review,
355355
not a rider on the one that changes where its input comes from.
356356
357-
Note that point-source datasets are **not** in this gap: they write a
358-
top-level ``data.fits`` alongside their JSON and are covered normally. The
359-
original issue text grouped them with weak lensing as "JSON with no FITS";
360-
that is true of weak lensing only.
357+
Note that point-source datasets are **not** in this gap *in
358+
``autolens_workspace``*: there they write a top-level ``data.fits`` alongside
359+
their JSON and are covered normally. The original issue text grouped them
360+
with weak lensing as "JSON with no FITS"; that is true of weak lensing only
361+
in that repo.
362+
363+
It is **not** true everywhere, and the exception is not hypothetical.
364+
Whether a dataset family is reachable by the stamp is decided per repository
365+
by that repo's ``.gitignore``, never by the family name.
366+
``autolens_workspace_test`` lists ``data.fits`` under "Generated artifacts —
367+
never check in", so its ``dataset/point_source/simple`` is three tracked JSON
368+
files and nothing else -- no stamp can exist there under any placement, and
369+
the capped branch deleted that committed, allowlist-protected directory on
370+
every smoke run (PyAutoArray#470, fixed workspace-side in
371+
autolens_workspace_test#264).
372+
373+
So do not read this paragraph as "point-source is safe". Read it as "point
374+
source is safe wherever a top-level ``data.fits`` is actually written".
375+
``PyAutoHands``' ``check_dataset_allowlist`` guard now fails a ``pre_build``
376+
run when a ``should_simulate`` call site that has not released
377+
``PYAUTO_SMALL_DATASETS`` would delete git-tracked files, which is the
378+
check this docstring cannot itself enforce.
361379
"""
362380
if os.environ.get("PYAUTO_SMALL_DATASETS") == "1":
363381
if Path(dataset_path).exists() and not _is_capped_at_the_current_cap(

0 commit comments

Comments
 (0)