Skip to content

Commit 82a6501

Browse files
committed
maintenance: floor autonerves at the first release carrying the SMALLDAT stamp
The floor was `autonerves>=2026.8.22.1`, which predates the SMALLDAT regime stamp shipped by PyAutoNerves#153/#154. An autoarray installed from PyPI therefore resolved an autonerves whose writer emits no card at all: `should_simulate` saw an absent stamp, read it as "unknown", and fell back to the shape heuristic — which cannot see capped interferometer datasets, the case the stamp exists for. The fix was inert for anyone installing rather than running from a checkout. `autonerves 2026.8.23.1` is the first release carrying it. Verified by unpacking both wheels from PyPI rather than inferring from commit dates: 2026.8.22.1 has neither `stamp_small_datasets_regime` nor `SMALL_DATASETS_HEADER_KEY`, and still writes the `[""]` header comment; 2026.8.23.1 has both and the `""` fix. No release sits between them, so it is the first. Both floor reasons are now stated in the pin comment — the JAX-in-base-dependencies requirement (PyAutoLens#687/#702) stays load-bearing alongside the stamp. The rationale on the duplicated SMALLDAT literal in `dataset_util.py` was rewritten because this bump makes its stated reason false — it claimed the floor named a pre-stamp release, so an import would hard-fail. The duplication is kept anyway, for a different reason: a floor constrains dependency resolution only, and an editable checkout or `--no-deps` install can still put a pre-stamp autonerves on the path. The literal degrades to "card absent" and falls through to the shape heuristic; an import would be an ImportError at module load. Silent-safe beats hard-fail. Both fallbacks (`should_simulate`'s shape heuristic and `_is_capped_at_the_current_cap`) are untouched — every dataset already on disk is unstamped and depends on them. `test_autoarray/structures/arrays/files/array/output_test/array.fits` is regenerated as a byproduct: it is test output that the suite rmtrees and rewrites, and the newly-floored autonerves drops the `/ ['']` comment literal (PyAutoNerves#155). Verified cosmetic — identical cards, values, data and byte size; only the comment text differs. Leaving it stale would dirty the tree on every suite run under the new floor. Closes #482. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent f50d28c commit 82a6501

3 files changed

Lines changed: 29 additions & 9 deletions

File tree

autoarray/util/dataset_util.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,19 @@
77
SMALL_DATASETS_PIXEL_SCALES = 0.6
88

99
# The FITS header card ``autonerves.fitsable.stamp_small_datasets_regime`` writes
10-
# on every array the stack outputs. Deliberately duplicated here rather than
11-
# imported: ``pyproject.toml`` floors autonerves at a release that predates the
12-
# stamp, so an import would hard-fail against a legitimately-resolved older
13-
# autonerves. Reading the card by name degrades to "absent" instead, which is
14-
# exactly the fallback path below. Keep in sync with PyAutoNerves#153.
10+
# on every array the stack outputs. Still deliberately duplicated here rather
11+
# than imported, though the original reason has expired: the floor in
12+
# ``pyproject.toml`` now names a stamped release, so importing the constant
13+
# would resolve. The reason it stays a literal is what the floor does NOT
14+
# cover. A floor constrains dependency *resolution* only; an editable checkout,
15+
# a ``pip install --no-deps``, or a hand-built virtualenv can still put a
16+
# pre-stamp autonerves on the path. Under this literal such an autonerves
17+
# yields "card absent" and the reader falls through to the shape heuristic
18+
# below — the safe direction, and the same path every pre-stamp dataset on disk
19+
# already takes. Under an import it would be an ``ImportError`` at module load.
20+
# Trading a silent-safe degradation for a hard failure to delete one string is
21+
# the wrong way round, so the duplication is kept on purpose.
22+
# Keep in sync with PyAutoNerves#153.
1523
SMALL_DATASETS_HEADER_KEY = "SMALLDAT"
1624

1725

pyproject.toml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,22 @@ classifiers = [
2424
]
2525
keywords = ["cli"]
2626
dependencies = [
27-
# Floor, not a pin (PyAutoLens#687) — bump to the first release with JAX
28-
# in autonerves' base dependencies once it exists (PyAutoLens#702), so
29-
# backtracking cannot pair this autoarray with a jax-optional autonerves.
30-
"autonerves>=2026.8.22.1",
27+
# Floor, not a pin (PyAutoLens#687). Two independent reasons hold it up;
28+
# neither may be dropped without checking the other.
29+
#
30+
# 1. JAX in base dependencies (PyAutoLens#702) — the floor must name a
31+
# release carrying `jax`/`jaxlib` in autonerves' *base* Requires-Dist, so
32+
# backtracking cannot pair this autoarray with a jax-optional autonerves.
33+
# Satisfied since 2026.8.22.1; every later release keeps them there.
34+
# 2. The SMALLDAT regime stamp (PyAutoNerves#153/#154) — `should_simulate`
35+
# prefers the header card that autonerves' writer stamps, and 2026.8.23.1
36+
# is the FIRST release whose `fitsable.stamp_small_datasets_regime` emits
37+
# it. Against anything older the card is simply absent, the read side
38+
# degrades to its shape heuristic, and capped *interferometer* datasets —
39+
# shape-identical to full-resolution ones — go undetected. That is the
40+
# case the stamp exists for, so the floor is what makes it reachable for
41+
# an installed autoarray rather than a checkout.
42+
"autonerves>=2026.8.23.1",
3143
"astropy>=5.0",
3244
"decorator>=4.0.0",
3345
"dill>=0.3.1.1",
Binary file not shown.

0 commit comments

Comments
 (0)