From cef46b133ef742bacdd8c9b9eb6917afb630c4e0 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Tue, 7 Apr 2026 10:28:12 +0100 Subject: [PATCH] fix: import is_test_mode from autoconf instead of autofit PyAutoArray does not depend on autofit. The previous import caused CI failures (ModuleNotFoundError). Also add dependency graph to CLAUDE.md to prevent this class of error. Co-Authored-By: Claude Opus 4.6 (1M context) --- CLAUDE.md | 7 +++++++ autoarray/inversion/mesh/image_mesh/hilbert.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index 4aa7d722..9a74666e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2,6 +2,13 @@ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. +## Dependency Graph + +PyAutoArray depends on **autoconf** (shared configuration and utilities). +PyAutoArray does **NOT** depend on PyAutoFit, PyAutoGalaxy, or PyAutoLens. +Never import from `autofit`, `autogalaxy`, or `autolens` in this repo. +Shared utilities (e.g. `test_mode`, `jax_wrapper`) belong in autoconf. + ## Commands ### Install diff --git a/autoarray/inversion/mesh/image_mesh/hilbert.py b/autoarray/inversion/mesh/image_mesh/hilbert.py index 4ad851b7..4c9c0f35 100644 --- a/autoarray/inversion/mesh/image_mesh/hilbert.py +++ b/autoarray/inversion/mesh/image_mesh/hilbert.py @@ -12,7 +12,7 @@ from autoarray.structures.grids.irregular_2d import Grid2DIrregular from autoarray import exc -from autofit.non_linear.test_mode import is_test_mode +from autoconf.test_mode import is_test_mode def gilbert2d(width, height):