From 7e4ce989d88fceec929dfd9765e6e4346edc71d7 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Fri, 28 Aug 2026 12:40:13 -0400 Subject: [PATCH] docs: correct the config-fallback comments on the NNLS warm-start settings (#506) The `except KeyError` comments on `nnls_warm_start_memo` and `nnls_warm_start_error_tolerance` claimed a workspace `general.yaml` shadows autoarray's, making the hard-coded fallback the production default. In practice a workspace `general.yaml` omits these keys and autoconf's config-path list falls through to autoarray's packaged value (measured `True` / `1.5` from autolens_workspace). The fallback fires only when the workspace config is the sole config path (isolated test configs push one dir) and returns the same packaged value, so both routes resolve identically. Comments only; no code, behaviour or test changes. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01XySQZP6Npj4adZMkYZ96Bo --- autoarray/settings.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/autoarray/settings.py b/autoarray/settings.py index 0c6f88ee4..29fa8c0ed 100644 --- a/autoarray/settings.py +++ b/autoarray/settings.py @@ -239,9 +239,11 @@ def nnls_warm_start_memo(self) -> bool: try: return conf.instance["general"]["inversion"]["nnls_warm_start_memo"] except KeyError: - # Workspaces ship their own general.yaml that shadows autoarray's - # and will not carry this key, so in practice this fallback *is* - # the production default: on, matching the packaged value. + # A workspace `general.yaml` normally omits this key, so autoconf's + # config-path list falls through to autoarray's packaged value (`true`). + # This fallback fires only when the workspace config is the sole config + # path (isolated test configs push one dir) and returns that same value, + # so both routes resolve identically. return True return self._nnls_warm_start_memo @@ -261,9 +263,11 @@ def nnls_warm_start_error_tolerance(self) -> float: "nnls_warm_start_error_tolerance" ] except KeyError: - # Workspaces ship their own general.yaml that shadows autoarray's - # and will not carry this key, so in practice this fallback *is* - # the production default, matching the packaged value. + # A workspace `general.yaml` normally omits this key, so autoconf's + # config-path list falls through to autoarray's packaged value (`1.5`). + # This fallback fires only when the workspace config is the sole config + # path (isolated test configs push one dir) and returns that same value, + # so both routes resolve identically. return 1.5 return self._nnls_warm_start_error_tolerance