Skip to content

fix: handle adjacent docstrings in notebook generation #196

Closed

Description

@Jammy2211

Overview

Back-to-back top-level documentation blocks currently produce consecutive cell markers in PyAutoHands. ipynb-py-convert consequently renders the second block as executable code containing literal # %% and triple-quote markers. This phase makes generation robust independently of the subsequent Hygiene and workspace-cleanup phases.

Plan

  • Reproduce and pin the adjacent-docstring conversion failure.
  • Defer code-cell boundaries until actual code appears between documentation blocks.
  • Preserve separate Markdown cells for adjacent blocks.
  • Validate unit, end-to-end, and existing PyAutoHands behavior.
Detailed implementation plan

Affected Repositories

  • PyAutoHands (primary)

Work Classification

Library workflow

Branch Survey

Repository Current branch Dirty?
PyAutoHands main run_logs/ untracked

No active worktree claim remains.

Suggested branch: feature/notebook-adjacent-docstrings
Worktree root: ~/Code/PyAutoLabs-wt/notebook-adjacent-docstrings/

Implementation Steps

  1. Add focused fixtures covering adjacent documentation blocks and documentation separated by executable code.
  2. Update autohands/add_notebook_quotes.py::add_notebook_quotes to buffer the post-docstring boundary until the next meaningful source line is known.
  3. When another documentation block follows, emit one Markdown-cell transition without creating an empty code segment.
  4. When code follows, emit the normal code-cell boundary and preserve existing whitespace/content.
  5. Exercise the full build_util.py::py_to_notebook path and assert cell types, ordering, and absence of literal marker artifacts.
  6. Run targeted tests, the complete PyAutoHands suite, and representative start_here.py conversion validation.

Key Files

  • autohands/add_notebook_quotes.py — source-to-percent-cell transformation
  • autohands/build_util.py — end-to-end conversion entry point
  • tests/test_add_notebook_quotes.py — focused regression coverage

Original Prompt

Click to expand starting prompt

Phase 1: Notebook generation must handle back-to-back docstrings

Type: bug
Target: PyAutoHands
Difficulty: small
Autonomy: supervised
Priority: normal
Status: formalised

autobuild/add_notebook_quotes.py + ipynb-py-convert (via build_util.py::py_to_notebook)
mis-render a docstring block that immediately follows another docstring block (only a blank
line between the closing """ and the next opening """): the second block lands in the
generated notebook as a code cell containing literal # %% and ''' markers instead of
a markdown cell.

Reproduce: autolens_workspace/start_here.py lines ~296–300 (__Units__ follows the
previous section's close with no code between). The published
autolens_workspace/start_here.ipynb carries this artifact today — the __Units__ prose is
a code cell. Any generated notebook whose source script has adjacent docstring sections is
affected; a repo-wide sweep of generated notebooks for cells starting with # %%\n''' will
find the blast radius.

Root cause sketch: on close, add_notebook_quotes emits ["'''", "\n\n", "# %%\n"] and on
open ["# %%", "\n", "'''\n"]; with no code line between them ipynb-py-convert merges the
marker runs so the second # %%\n''' sequence survives as cell content.

Fix options: make add_notebook_quotes collapse adjacent close→open pairs into a single
markdown-cell boundary, or normalize the marker emission so an empty code segment between
docstrings is dropped. A correct reference implementation for the split semantics now exists
in autolens_assistant/autoassistant/to_notebook.py (adjacent docstrings → two markdown
cells), with a unit test pinning the case.

Found 2026-07-10 while validating autolens_assistant#51 (script→notebook converter)
against the pipeline on identical input: 25/26 cells byte-identical, this artifact was the
26th.

Requested scope

@PyAutoHands must make notebook generation robust to consecutive top-level docstring
blocks, so this formatting cannot break generation even before source hygiene is applied.

The Hygiene scanner and source cleanup requested at the same time are tracked as dependent
phases in draft/feature/pyautobrain/adjacent_docstring_hygiene.md and
draft/maintenance/workspaces/merge_adjacent_docstrings.md, following the Bug Agent's
required multi-repo split.

Original user request (verbatim)

Double docstring formatting like this currently breaks ntoebook generate: GPU; not wrong, but slower than jnp.sqrt(...) if you're inside a hot
loop. For one-off analysis code, don't worry about it.

  • The .array property of aa.Array2D etc. is the raw backing array — a
    numpy.ndarray on the NumPy path, a jax.Array on the JAX path.

The data_structures.py guide (scripts/guides/data_structures.py) covers
the wrapper-vs-raw-array distinction in detail.
"""

"""
Units
in the corresponding start_here.ipynb it looks like this:

%%

'''
Units

The units used throughout the strong lensing literature vary, therefore lets quickly describe the units used in
PyAutoLens.

The Tracer object and all mass profiles describe their quantities in terms of angles, which are defined in units
of arc-seconds. To convert these to physical units (e.g. kiloparsecs), we use the redshift of the lens and source
galaxies and an input cosmology. A run through of all normal unit conversions is given in guides in the workspace
outlined below.

The use of angles in arc-seconds has an important property, it means that for a two-plane strong lens system
(e.g. a lens galaxy at one redshift and source galaxy at another redshift) lensing calculations are independent of
the galaxies' redshifts and the input cosmology. This has a number of benefits, for example it makes it straight
forward to compare the lensing properties of different strong lens systems even when the redshifts of the galaxies
are unknown.

Multi-plane lensing is when there are more than two planes. The tracer fully supports this, if you input 3+ galaxies
with different redshifts into the tracer it will use their redshifts and its cosmology to perform multi-plane lensing
calculations that depend on them.

Extensibility
, can you make it so that the generate function that builds notebooks in autohands does not let these things break notebook generation and can you make it so the hygeine agent looks for and merges these in the scripts of all worskpaces, HowTos

Activity

  1. Jammy2211 commented on Jul 24, 2026

    @Jammy2211
    CollaboratorAuthor

    Smoke Test Results — 2026-07-24

    Workspace Passed Failed Skipped Total
    autofit_workspace 7 2 1 10
    autogalaxy_workspace 6 2 0 8
    autolens_workspace 7 4 0 11
    autolens_workspace_test 17 0 2 19
    euclid_strong_lens_modeling_pipeline 6 0 0 6
    HowToLens 6 0 0 6
    Failures (8)

    autofit_workspace/notebooks/overview/overview_1_the_basics.ipynb

    , line 201, in from_filename
        return self.from_file(f, resources=resources, **kw)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/exporters/exporter.py", line 220, in from_file
        return self.from_notebook_node(
               ^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/exporters/notebook.py", line 36, in from_notebook_node
        nb_copy, resources = super().from_notebook_node(nb, resources, **kw)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/exporters/exporter.py", line 154, in from_notebook_node
        nb_copy, resources = self._preprocess(nb_copy, resources)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/exporters/exporter.py", line 353, in _preprocess
        nbc, resc = preprocessor(nbc, resc)
                    ^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/preprocessors/base.py", line 48, in __call__
        return self.preprocess(nb, resources)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py", line 103, in preprocess
        self.preprocess_cell(cell, resources, index)
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py", line 124, in preprocess_cell
        cell = self.execute_cell(cell, index, store_history=True)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/jupyter_core/utils/__init__.py", line 165, in wrapped
        return loop.run_until_complete(inner)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.12/asyncio/base_events.py", line 691, in run_until_complete
        return future.result()
               ^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbclient/client.py", line 1062, in async_execute_cell
        await self._check_raise_for_error(cell, cell_index, exec_reply)
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbclient/client.py", line 918, in _check_raise_for_error
        raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
    nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
    ------------------
    if not path.exists(dataset_path):
        import subprocess
        import sys
    
        subprocess.run(
            [sys.executable, "scripts/simulators/simulators.py"],
            check=True,
        )
    
    data = af.util.numpy_array_from_json(file_path=path.join(dataset_path, "data.json"))
    noise_map = af.util.numpy_array_from_json(
        file_path=path.join(dataset_path, "noise_map.json")
    )
    ------------------
    
    ----- stderr -----
    /home/jammy/venv/PyAuto/bin/python3.12: can't open file '/tmp/pyauto-smoke-regen-wofqk0pj/scripts/simulators/simulators.py': [Errno 2] No such file or directory
    ------------------
    
    �[31m---------------------------------------------------------------------------�[39m
    �[31mCalledProcessError�[39m                        Traceback (most recent call last)
    �[36mCell�[39m�[36m �[39m�[32mIn[3]�[39m�[32m, line 5�[39m
    �[32m      2�[39m     �[38;5;28;01mimport�[39;00m�[38;5;250m �[39m�[34;01msubprocess�[39;00m
    �[32m      3�[39m     �[38;5;28;01mimport�[39;00m�[38;5;250m �[39m�[34;01msys�[39;00m
    �[32m----> �[39m�[32m5�[39m     �[43msubprocess�[49m�[43m.�[49m�[43mrun�[49m�[43m(�[49m
    �[32m      6�[39m �[43m        �[49m�[43m[�[49m�[43msys�[49m�[43m.�[49m�[43mexecutable�[49m�[43m,�[49m�[43m �[49m�[33;43m"�[39;49m�[33;43mscripts/simulators/simulators.py�[39;49m�[33;43m"�[39;49m�[43m]�[49m�[43m,�[49m
    �[32m      7�[39m �[43m        �[49m�[43mcheck�[49m�[43m=�[49m�[38;5;28;43;01mTrue�[39;49;00m�[43m,�[49m
    �[32m      8�[39m �[43m    �[49m�[43m)�[49m
    �[32m     10�[39m data = af.util.numpy_array_from_json(file_path=path.join(dataset_path, �[33m"�[39m�[33mdata.json�[39m�[33m"�[39m))
    �[32m     11�[39m noise_map = af.util.numpy_array_from_json(
    �[32m     12�[39m     file_path=path.join(dataset_path, �[33m"�[39m�[33mnoise_map.json�[39m�[33m"�[39m)
    �[32m     13�[39m )
    
    �[36mFile �[39m�[32m/usr/lib/python3.12/subprocess.py:571�[39m, in �[36mrun�[39m�[34m(input, capture_output, timeout, check, *popenargs, **kwargs)�[39m
    �[32m    569�[39m     retcode = process.poll()
    �[32m    570�[39m     �[38;5;28;01mif�[39;00m check �[38;5;129;01mand�[39;00m retcode:
    �[32m--> �[39m�[32m571�[39m         �[38;5;28;01mraise�[39;00m CalledProcessError(retcode, process.args,
    �[32m    572�[39m                                  output=stdout, stderr=stderr)
    �[32m    573�[39m �[38;5;28;01mreturn�[39;00m CompletedProcess(process.args, retcode, stdout, stderr)
    
    �[31mCalledProcessError�[39m: Command '['/home/jammy/venv/PyAuto/bin/python3.12', 'scripts/simulators/simulators.py']' returned non-zero exit status 2.
    
    
    

    autofit_workspace/notebooks/searches/mcmc.ipynb

    n3.12/site-packages/nbconvert/exporters/exporter.py", line 220, in from_file
        return self.from_notebook_node(
               ^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/exporters/notebook.py", line 36, in from_notebook_node
        nb_copy, resources = super().from_notebook_node(nb, resources, **kw)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/exporters/exporter.py", line 154, in from_notebook_node
        nb_copy, resources = self._preprocess(nb_copy, resources)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/exporters/exporter.py", line 353, in _preprocess
        nbc, resc = preprocessor(nbc, resc)
                    ^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/preprocessors/base.py", line 48, in __call__
        return self.preprocess(nb, resources)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py", line 103, in preprocess
        self.preprocess_cell(cell, resources, index)
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py", line 124, in preprocess_cell
        cell = self.execute_cell(cell, index, store_history=True)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/jupyter_core/utils/__init__.py", line 165, in wrapped
        return loop.run_until_complete(inner)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.12/asyncio/base_events.py", line 691, in run_until_complete
        return future.result()
               ^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbclient/client.py", line 1062, in async_execute_cell
        await self._check_raise_for_error(cell, cell_index, exec_reply)
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbclient/client.py", line 918, in _check_raise_for_error
        raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
    nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
    ------------------
    if not path.exists(dataset_path):
        import subprocess
        import sys
    
        subprocess.run(
            [sys.executable, "scripts/simulators/simulators.py"],
            check=True,
        )
    
    data = af.util.numpy_array_from_json(file_path=path.join(dataset_path, "data.json"))
    noise_map = af.util.numpy_array_from_json(
        file_path=path.join(dataset_path, "noise_map.json")
    )
    
    plt.errorbar(
        x=range(data.shape[0]),
        y=data,
        yerr=noise_map,
        linestyle="",
        color="k",
        ecolor="k",
        elinewidth=1,
        capsize=2,
    )
    plt.show()
    plt.close()
    ------------------
    
    ----- stderr -----
    /home/jammy/venv/PyAuto/bin/python3.12: can't open file '/tmp/pyauto-smoke-regen-mua01yy8/scripts/simulators/simulators.py': [Errno 2] No such file or directory
    ------------------
    
    �[31m---------------------------------------------------------------------------�[39m
    �[31mCalledProcessError�[39m                        Traceback (most recent call last)
    �[36mCell�[39m�[36m �[39m�[32mIn[3]�[39m�[32m, line 5�[39m
    �[32m      2�[39m     �[38;5;28;01mimport�[39;00m�[38;5;250m �[39m�[34;01msubprocess�[39;00m
    �[32m      3�[39m     �[38;5;28;01mimport�[39;00m�[38;5;250m �[39m�[34;01msys�[39;00m
    �[32m----> �[39m�[32m5�[39m     �[43msubprocess�[49m�[43m.�[49m�[43mrun�[49m�[43m(�[49m
    �[32m      6�[39m �[43m        �[49m�[43m[�[49m�[43msys�[49m�[43m.�[49m�[43mexecutable�[49m�[43m,�[49m�[43m �[49m�[33;43m"�[39;49m�[33;43mscripts/simulators/simulators.py�[39;49m�[33;43m"�[39;49m�[43m]�[49m�[43m,�[49m
    �[32m      7�[39m �[43m        �[49m�[43mcheck�[49m�[43m=�[49m�[38;5;28;43;01mTrue�[39;49;00m�[43m,�[49m
    �[32m      8�[39m �[43m    �[49m�[43m)�[49m
    �[32m     10�[39m data = af.util.numpy_array_from_json(file_path=path.join(dataset_path, �[33m"�[39m�[33mdata.json�[39m�[33m"�[39m))
    �[32m     11�[39m noise_map = af.util.numpy_array_from_json(
    �[32m     12�[39m     file_path=path.join(dataset_path, �[33m"�[39m�[33mnoise_map.json�[39m�[33m"�[39m)
    �[32m     13�[39m )
    
    �[36mFile �[39m�[32m/usr/lib/python3.12/subprocess.py:571�[39m, in �[36mrun�[39m�[34m(input, capture_output, timeout, check, *popenargs, **kwargs)�[39m
    �[32m    569�[39m     retcode = process.poll()
    �[32m    570�[39m     �[38;5;28;01mif�[39;00m check �[38;5;129;01mand�[39;00m retcode:
    �[32m--> �[39m�[32m571�[39m         �[38;5;28;01mraise�[39;00m CalledProcessError(retcode, process.args,
    �[32m    572�[39m                                  output=stdout, stderr=stderr)
    �[32m    573�[39m �[38;5;28;01mreturn�[39;00m CompletedProcess(process.args, retcode, stdout, stderr)
    
    �[31mCalledProcessError�[39m: Command '['/home/jammy/venv/PyAuto/bin/python3.12', 'scripts/simulators/simulators.py']' returned non-zero exit status 2.
    
    
    

    autogalaxy_workspace/notebooks/interferometer/simulator.ipynb

    �[39m�[34mfromfile�[39m(
    �[32m    474�[39m     �[38;5;28mcls�[39m,
    �[32m   (...)�[39m�[32m    482�[39m     **kwargs,
    �[32m    483�[39m ):
    �[32m    484�[39m �[38;5;250m    �[39m�[33;03m"""�[39;00m
    �[32m    485�[39m �[33;03m    Creates an `HDUList` instance from a file-like object.�[39;00m
    �[32m    486�[39m 
    �[32m   (...)�[39m�[32m    489�[39m �[33;03m    documentation for details of the parameters accepted by this method).�[39;00m
    �[32m    490�[39m �[33;03m    """�[39;00m
    �[32m--> �[39m�[32m491�[39m     �[38;5;28;01mreturn�[39;00m �[38;5;28;43mcls�[39;49m�[43m.�[49m�[43m_readfrom�[49m�[43m(�[49m
    �[32m    492�[39m �[43m        �[49m�[43mfileobj�[49m�[43m=�[49m�[43mfileobj�[49m�[43m,�[49m
    �[32m    493�[39m �[43m        �[49m�[43mmode�[49m�[43m=�[49m�[43mmode�[49m�[43m,�[49m
    �[32m    494�[39m �[43m        �[49m�[43mmemmap�[49m�[43m=�[49m�[43mmemmap�[49m�[43m,�[49m
    �[32m    495�[39m �[43m        �[49m�[43msave_backup�[49m�[43m=�[49m�[43msave_backup�[49m�[43m,�[49m
    �[32m    496�[39m �[43m        �[49m�[43mcache�[49m�[43m=�[49m�[43mcache�[49m�[43m,�[49m
    �[32m    497�[39m �[43m        �[49m�[43mignore_missing_simple�[49m�[43m=�[49m�[43mignore_missing_simple�[49m�[43m,�[49m
    �[32m    498�[39m �[43m        �[49m�[43mlazy_load_hdus�[49m�[43m=�[49m�[43mlazy_load_hdus�[49m�[43m,�[49m
    �[32m    499�[39m �[43m        �[49m�[43m*�[49m�[43m*�[49m�[43mkwargs�[49m�[43m,�[49m
    �[32m    500�[39m �[43m    �[49m�[43m)�[49m
    
    �[36mFile �[39m�[32m~/venv/PyAuto/lib/python3.12/site-packages/astropy/io/fits/hdu/hdulist.py:1193�[39m, in �[36mHDUList._readfrom�[39m�[34m(cls, fileobj, data, mode, memmap, cache, lazy_load_hdus, ignore_missing_simple, use_fsspec, fsspec_kwargs, decompress_in_memory, **kwargs)�[39m
    �[32m   1190�[39m �[38;5;28;01mif�[39;00m fileobj �[38;5;129;01mis�[39;00m �[38;5;129;01mnot�[39;00m �[38;5;28;01mNone�[39;00m:
    �[32m   1191�[39m     �[38;5;28;01mif�[39;00m �[38;5;129;01mnot�[39;00m �[38;5;28misinstance�[39m(fileobj, _File):
    �[32m   1192�[39m         �[38;5;66;03m# instantiate a FITS file object (ffo)�[39;00m
    �[32m-> �[39m�[32m1193�[39m         fileobj = �[43m_File�[49m�[43m(�[49m
    �[32m   1194�[39m �[43m            �[49m�[43mfileobj�[49m�[43m,�[49m
    �[32m   1195�[39m �[43m            �[49m�[43mmode�[49m�[43m=�[49m�[43mmode�[49m�[43m,�[49m
    �[32m   1196�[39m �[43m            �[49m�[43mmemmap�[49m�[43m=�[49m�[43mmemmap�[49m�[43m,�[49m
    �[32m   1197�[39m �[43m            �[49m�[43mcache�[49m�[43m=�[49m�[43mcache�[49m�[43m,�[49m
    �[32m   1198�[39m �[43m            �[49m�[43muse_fsspec�[49m�[43m=�[49m�[43muse_fsspec�[49m�[43m,�[49m
    �[32m   1199�[39m �[43m            �[49m�[43mfsspec_kwargs�[49m�[43m=�[49m�[43mfsspec_kwargs�[49m�[43m,�[49m
    �[32m   1200�[39m �[43m            �[49m�[43mdecompress_in_memory�[49m�[43m=�[49m�[43mdecompress_in_memory�[49m�[43m,�[49m
    �[32m   1201�[39m �[43m        �[49m�[43m)�[49m
    �[32m   1202�[39m     �[38;5;66;03m# The Astropy mode is determined by the _File initializer if the�[39;00m
    �[32m   1203�[39m     �[38;5;66;03m# supplied mode was None�[39;00m
    �[32m   1204�[39m     mode = fileobj.mode
    
    �[36mFile �[39m�[32m~/venv/PyAuto/lib/python3.12/site-packages/astropy/io/fits/file.py:239�[39m, in �[36m_File.__init__�[39m�[34m(self, fileobj, mode, memmap, overwrite, cache, use_fsspec, fsspec_kwargs, decompress_in_memory)�[39m
    �[32m    237�[39m     �[38;5;28mself�[39m._open_fileobj(fileobj, mode, overwrite)
    �[32m    238�[39m �[38;5;28;01melif�[39;00m �[38;5;28misinstance�[39m(fileobj, (�[38;5;28mstr�[39m, �[38;5;28mbytes�[39m)):
    �[32m--> �[39m�[32m239�[39m     �[38;5;28;43mself�[39;49m�[43m.�[49m�[43m_open_filename�[49m�[43m(�[49m�[43mfileobj�[49m�[43m,�[49m�[43m �[49m�[43mmode�[49m�[43m,�[49m�[43m �[49m�[43moverwrite�[49m�[43m)�[49m
    �[32m    240�[39m �[38;5;28;01melse�[39;00m:
    �[32m    241�[39m     �[38;5;28mself�[39m._open_filelike(fileobj, mode, overwrite)
    
    �[36mFile �[39m�[32m~/venv/PyAuto/lib/python3.12/site-packages/astropy/io/fits/file.py:711�[39m, in �[36m_File._open_filename�[39m�[34m(self, filename, mode, overwrite)�[39m
    �[32m    708�[39m ext = os.path.splitext(�[38;5;28mself�[39m.name)[�[32m1�[39m]
    �[32m    710�[39m �[38;5;28;01mif�[39;00m �[38;5;129;01mnot�[39;00m �[38;5;28mself�[39m._try_read_compressed(�[38;5;28mself�[39m.name, magic, mode, ext=ext):
    �[32m--> �[39m�[32m711�[39m     �[38;5;28mself�[39m._file = �[38;5;28;43mopen�[39;49m�[43m(�[49m�[38;5;28;43mself�[39;49m�[43m.�[49m�[43mname�[49m�[43m,�[49m�[43m �[49m�[43mIO_FITS_MODES�[49m�[43m[�[49m�[43mmode�[49m�[43m]�[49m�[43m)�[49m
    �[32m    712�[39m     �[38;5;28mself�[39m.close_on_error = �[38;5;28;01mTrue�[39;00m
    �[32m    714�[39m �[38;5;66;03m# Make certain we're back at the beginning of the file�[39;00m
    �[32m    715�[39m �[38;5;66;03m# BZ2File does not support seek when the file is open for writing, but�[39;00m
    �[32m    716�[39m �[38;5;66;03m# when opening a file for write, bz2.BZ2File always truncates anyway.�[39;00m
    
    �[31mFileNotFoundError�[39m: [Errno 2] No such file or directory: 'dataset/interferometer/uv_wavelengths/sma.fits'
    
    
    

    autogalaxy_workspace/notebooks/imaging/modeling.ipynb

          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/exporters/exporter.py", line 220, in from_file
        return self.from_notebook_node(
               ^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/exporters/notebook.py", line 36, in from_notebook_node
        nb_copy, resources = super().from_notebook_node(nb, resources, **kw)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/exporters/exporter.py", line 154, in from_notebook_node
        nb_copy, resources = self._preprocess(nb_copy, resources)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/exporters/exporter.py", line 353, in _preprocess
        nbc, resc = preprocessor(nbc, resc)
                    ^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/preprocessors/base.py", line 48, in __call__
        return self.preprocess(nb, resources)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py", line 103, in preprocess
        self.preprocess_cell(cell, resources, index)
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py", line 124, in preprocess_cell
        cell = self.execute_cell(cell, index, store_history=True)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/jupyter_core/utils/__init__.py", line 165, in wrapped
        return loop.run_until_complete(inner)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.12/asyncio/base_events.py", line 691, in run_until_complete
        return future.result()
               ^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbclient/client.py", line 1062, in async_execute_cell
        await self._check_raise_for_error(cell, cell_index, exec_reply)
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbclient/client.py", line 918, in _check_raise_for_error
        raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
    nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
    ------------------
    if ag.util.dataset.should_simulate(str(dataset_path)):
        import subprocess
        import sys
    
        subprocess.run(
            [sys.executable, "scripts/imaging/simulator.py"],
            check=True,
        )
    
    
    dataset = ag.Imaging.from_fits(
        data_path=dataset_path / "data.fits",
        psf_path=dataset_path / "psf.fits",
        noise_map_path=dataset_path / "noise_map.fits",
        pixel_scales=0.1,
    )
    ------------------
    
    ----- stderr -----
    /home/jammy/venv/PyAuto/bin/python3.12: can't open file '/tmp/pyauto-smoke-regen-v9vjxijz/scripts/imaging/simulator.py': [Errno 2] No such file or directory
    ------------------
    
    �[31m---------------------------------------------------------------------------�[39m
    �[31mCalledProcessError�[39m                        Traceback (most recent call last)
    �[36mCell�[39m�[36m �[39m�[32mIn[3]�[39m�[32m, line 5�[39m
    �[32m      2�[39m     �[38;5;28;01mimport�[39;00m�[38;5;250m �[39m�[34;01msubprocess�[39;00m
    �[32m      3�[39m     �[38;5;28;01mimport�[39;00m�[38;5;250m �[39m�[34;01msys�[39;00m
    �[32m----> �[39m�[32m5�[39m     �[43msubprocess�[49m�[43m.�[49m�[43mrun�[49m�[43m(�[49m
    �[32m      6�[39m �[43m        �[49m�[43m[�[49m�[43msys�[49m�[43m.�[49m�[43mexecutable�[49m�[43m,�[49m�[43m �[49m�[33;43m"�[39;49m�[33;43mscripts/imaging/simulator.py�[39;49m�[33;43m"�[39;49m�[43m]�[49m�[43m,�[49m
    �[32m      7�[39m �[43m        �[49m�[43mcheck�[49m�[43m=�[49m�[38;5;28;43;01mTrue�[39;49;00m�[43m,�[49m
    �[32m      8�[39m �[43m    �[49m�[43m)�[49m
    �[32m     11�[39m dataset = ag.Imaging.from_fits(
    �[32m     12�[39m     data_path=dataset_path / �[33m"�[39m�[33mdata.fits�[39m�[33m"�[39m,
    �[32m     13�[39m     psf_path=dataset_path / �[33m"�[39m�[33mpsf.fits�[39m�[33m"�[39m,
    �[32m     14�[39m     noise_map_path=dataset_path / �[33m"�[39m�[33mnoise_map.fits�[39m�[33m"�[39m,
    �[32m     15�[39m     pixel_scales=�[32m0.1�[39m,
    �[32m     16�[39m )
    
    �[36mFile �[39m�[32m/usr/lib/python3.12/subprocess.py:571�[39m, in �[36mrun�[39m�[34m(input, capture_output, timeout, check, *popenargs, **kwargs)�[39m
    �[32m    569�[39m     retcode = process.poll()
    �[32m    570�[39m     �[38;5;28;01mif�[39;00m check �[38;5;129;01mand�[39;00m retcode:
    �[32m--> �[39m�[32m571�[39m         �[38;5;28;01mraise�[39;00m CalledProcessError(retcode, process.args,
    �[32m    572�[39m                                  output=stdout, stderr=stderr)
    �[32m    573�[39m �[38;5;28;01mreturn�[39;00m CompletedProcess(process.args, retcode, stdout, stderr)
    
    �[31mCalledProcessError�[39m: Command '['/home/jammy/venv/PyAuto/bin/python3.12', 'scripts/imaging/simulator.py']' returned non-zero exit status 2.
    
    
    

    autolens_workspace/imaging/features/pixelization/delaunay.py

    Traceback (most recent call last):
      File "/home/jammy/Code/PyAutoLabs-wt/notebook-adjacent-docstrings/autolens_workspace/scripts/imaging/features/pixelization/delaunay.py", line 126, in <module>
        dataset = al.Imaging.from_fits(
                  ^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/Code/PyAutoLabs-wt/notebook-adjacent-docstrings/PyAutoArray/autoarray/dataset/imaging/dataset.py", line 341, in from_fits
        noise_map = Array2D.from_fits(
                    ^^^^^^^^^^^^^^^^^^
      File "/home/jammy/Code/PyAutoLabs-wt/notebook-adjacent-docstrings/PyAutoArray/autoarray/structures/arrays/uniform_2d.py", line 889, in from_fits
        array_2d = ndarray_via_fits_from(file_path=file_path, hdu=hdu)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/Code/PyAutoLabs-wt/notebook-adjacent-docstrings/PyAutoNerves/autonerves/fitsable.py", line 210, in ndarray_via_fits_from
        hdu_list = fits.open(file_path, do_not_scale_image_data=do_not_scale_image_data)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/astropy/io/fits/hdu/hdulist.py", line 227, in fitsopen
        return HDUList.fromfile(
               ^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/astropy/io/fits/hdu/hdulist.py", line 491, in fromfile
        return cls._readfrom(
               ^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/astropy/io/fits/hdu/hdulist.py", line 1193, in _readfrom
        fileobj = _File(
                  ^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/astropy/io/fits/file.py", line 239, in __init__
        self._open_filename(fileobj, mode, overwrite)
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/astropy/io/fits/file.py", line 711, in _open_filename
        self._file = open(self.name, IO_FITS_MODES[mode])
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    FileNotFoundError: [Errno 2] No such file or directory: 'dataset/imaging/simple__no_lens_light/noise_map.fits'
    
    

    autolens_workspace/interferometer/features/pixelization/delaunay.py

    2026-07-24 14:50:02,125 - autoarray.dataset.interferometer.dataset - INFO - INTERFEROMETER - Computing NUFFT Precision Operator; runtime scales with visibility count and mask resolution, CPU run times may exceed hours.
    2026-07-24 14:50:05,032 - autoarray.inversion.inversion.interferometer.inversion_interferometer_util - INFO - INTERFEROMETER - Finished W-Tilde (JAX) in 0.661 seconds
    Traceback (most recent call last):
      File "/home/jammy/Code/PyAutoLabs-wt/notebook-adjacent-docstrings/autolens_workspace/scripts/interferometer/features/pixelization/delaunay.py", line 139, in <module>
        al.from_json(file_path=Path(dataset_path, "positions.json"))
      File "/home/jammy/Code/PyAutoLabs-wt/notebook-adjacent-docstrings/PyAutoNerves/autonerves/dictable.py", line 364, in from_json
        with open(file_path, "r+") as f:
             ^^^^^^^^^^^^^^^^^^^^^
    FileNotFoundError: [Errno 2] No such file or directory: 'dataset/interferometer/simple/positions.json'
    
    

    autolens_workspace/notebooks/imaging/modeling.ipynb

    nbconvert/exporters/exporter.py", line 353, in _preprocess
        nbc, resc = preprocessor(nbc, resc)
                    ^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/preprocessors/base.py", line 48, in __call__
        return self.preprocess(nb, resources)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py", line 103, in preprocess
        self.preprocess_cell(cell, resources, index)
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbconvert/preprocessors/execute.py", line 124, in preprocess_cell
        cell = self.execute_cell(cell, index, store_history=True)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/jupyter_core/utils/__init__.py", line 165, in wrapped
        return loop.run_until_complete(inner)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.12/asyncio/base_events.py", line 691, in run_until_complete
        return future.result()
               ^^^^^^^^^^^^^^^
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbclient/client.py", line 1062, in async_execute_cell
        await self._check_raise_for_error(cell, cell_index, exec_reply)
      File "/home/jammy/venv/PyAuto/lib/python3.12/site-packages/nbclient/client.py", line 918, in _check_raise_for_error
        raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
    nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
    ------------------
    if al.util.dataset.should_simulate(str(dataset_path)):
        import subprocess
        import sys
    
        subprocess.run(
            [sys.executable, "scripts/imaging/simulator.py"],
            check=True,
        )
    
    # PSF convolution runs at the image resolution (sub size 1), which is the fastest
    # option and accurate for well-sampled PSFs. Supplying a PSF at a multiple of the
    # image resolution and raising this value improves blurring fidelity for
    # undersampled PSFs (e.g. HST / Euclid VIS) at extra compute cost — see
    # `guides/advanced/over_sampling.py` and the simulator's `__Oversampled PSF__` section.
    psf_convolve_over_sample_size = 1
    
    dataset = al.Imaging.from_fits(
        convolve_over_sample_size_lp=psf_convolve_over_sample_size,
        convolve_over_sample_size_pixelization=psf_convolve_over_sample_size,
        data_path=dataset_path / "data.fits",
        psf_path=dataset_path / "psf.fits",
        noise_map_path=dataset_path / "noise_map.fits",
        pixel_scales=0.1,
    )
    ------------------
    
    ----- stderr -----
    /home/jammy/venv/PyAuto/bin/python3.12: can't open file '/tmp/pyauto-smoke-regen-vwyg60vy/scripts/imaging/simulator.py': [Errno 2] No such file or directory
    ------------------
    
    �[31m---------------------------------------------------------------------------�[39m
    �[31mCalledProcessError�[39m                        Traceback (most recent call last)
    �[36mCell�[39m�[36m �[39m�[32mIn[3]�[39m�[32m, line 5�[39m
    �[32m      2�[39m     �[38;5;28;01mimport�[39;00m�[38;5;250m �[39m�[34;01msubprocess�[39;00m
    �[32m      3�[39m     �[38;5;28;01mimport�[39;00m�[38;5;250m �[39m�[34;01msys�[39;00m
    �[32m----> �[39m�[32m5�[39m     �[43msubprocess�[49m�[43m.�[49m�[43mrun�[49m�[43m(�[49m
    �[32m      6�[39m �[43m        �[49m�[43m[�[49m�[43msys�[49m�[43m.�[49m�[43mexecutable�[49m�[43m,�[49m�[43m �[49m�[33;43m"�[39;49m�[33;43mscripts/imaging/simulator.py�[39;49m�[33;43m"�[39;49m�[43m]�[49m�[43m,�[49m
    �[32m      7�[39m �[43m        �[49m�[43mcheck�[49m�[43m=�[49m�[38;5;28;43;01mTrue�[39;49;00m�[43m,�[49m
    �[32m      8�[39m �[43m    �[49m�[43m)�[49m
    �[32m     10�[39m �[38;5;66;03m# PSF convolution runs at the image resolution (sub size 1), which is the fastest�[39;00m
    �[32m     11�[39m �[38;5;66;03m# option and accurate for well-sampled PSFs. Supplying a PSF at a multiple of the�[39;00m
    �[32m     12�[39m �[38;5;66;03m# image resolution and raising this value improves blurring fidelity for�[39;00m
    �[32m     13�[39m �[38;5;66;03m# undersampled PSFs (e.g. HST / Euclid VIS) at extra compute cost — see�[39;00m
    �[32m     14�[39m �[38;5;66;03m# `guides/advanced/over_sampling.py` and the simulator's `__Oversampled PSF__` section.�[39;00m
    �[32m     15�[39m psf_convolve_over_sample_size = �[32m1�[39m
    
    �[36mFile �[39m�[32m/usr/lib/python3.12/subprocess.py:571�[39m, in �[36mrun�[39m�[34m(input, capture_output, timeout, check, *popenargs, **kwargs)�[39m
    �[32m    569�[39m     retcode = process.poll()
    �[32m    570�[39m     �[38;5;28;01mif�[39;00m check �[38;5;129;01mand�[39;00m retcode:
    �[32m--> �[39m�[32m571�[39m         �[38;5;28;01mraise�[39;00m CalledProcessError(retcode, process.args,
    �[32m    572�[39m                                  output=stdout, stderr=stderr)
    �[32m    573�[39m �[38;5;28;01mreturn�[39;00m CompletedProcess(process.args, retcode, stdout, stderr)
    
    �[31mCalledProcessError�[39m: Command '['/home/jammy/venv/PyAuto/bin/python3.12', 'scripts/imaging/simulator.py']' returned non-zero exit status 2.
    
    
    

    autolens_workspace/notebooks/interferometer/simulator.ipynb

    �[39m�[34mfromfile�[39m(
    �[32m    474�[39m     �[38;5;28mcls�[39m,
    �[32m   (...)�[39m�[32m    482�[39m     **kwargs,
    �[32m    483�[39m ):
    �[32m    484�[39m �[38;5;250m    �[39m�[33;03m"""�[39;00m
    �[32m    485�[39m �[33;03m    Creates an `HDUList` instance from a file-like object.�[39;00m
    �[32m    486�[39m 
    �[32m   (...)�[39m�[32m    489�[39m �[33;03m    documentation for details of the parameters accepted by this method).�[39;00m
    �[32m    490�[39m �[33;03m    """�[39;00m
    �[32m--> �[39m�[32m491�[39m     �[38;5;28;01mreturn�[39;00m �[38;5;28;43mcls�[39;49m�[43m.�[49m�[43m_readfrom�[49m�[43m(�[49m
    �[32m    492�[39m �[43m        �[49m�[43mfileobj�[49m�[43m=�[49m�[43mfileobj�[49m�[43m,�[49m
    �[32m    493�[39m �[43m        �[49m�[43mmode�[49m�[43m=�[49m�[43mmode�[49m�[43m,�[49m
    �[32m    494�[39m �[43m        �[49m�[43mmemmap�[49m�[43m=�[49m�[43mmemmap�[49m�[43m,�[49m
    �[32m    495�[39m �[43m        �[49m�[43msave_backup�[49m�[43m=�[49m�[43msave_backup�[49m�[43m,�[49m
    �[32m    496�[39m �[43m        �[49m�[43mcache�[49m�[43m=�[49m�[43mcache�[49m�[43m,�[49m
    �[32m    497�[39m �[43m        �[49m�[43mignore_missing_simple�[49m�[43m=�[49m�[43mignore_missing_simple�[49m�[43m,�[49m
    �[32m    498�[39m �[43m        �[49m�[43mlazy_load_hdus�[49m�[43m=�[49m�[43mlazy_load_hdus�[49m�[43m,�[49m
    �[32m    499�[39m �[43m        �[49m�[43m*�[49m�[43m*�[49m�[43mkwargs�[49m�[43m,�[49m
    �[32m    500�[39m �[43m    �[49m�[43m)�[49m
    
    �[36mFile �[39m�[32m~/venv/PyAuto/lib/python3.12/site-packages/astropy/io/fits/hdu/hdulist.py:1193�[39m, in �[36mHDUList._readfrom�[39m�[34m(cls, fileobj, data, mode, memmap, cache, lazy_load_hdus, ignore_missing_simple, use_fsspec, fsspec_kwargs, decompress_in_memory, **kwargs)�[39m
    �[32m   1190�[39m �[38;5;28;01mif�[39;00m fileobj �[38;5;129;01mis�[39;00m �[38;5;129;01mnot�[39;00m �[38;5;28;01mNone�[39;00m:
    �[32m   1191�[39m     �[38;5;28;01mif�[39;00m �[38;5;129;01mnot�[39;00m �[38;5;28misinstance�[39m(fileobj, _File):
    �[32m   1192�[39m         �[38;5;66;03m# instantiate a FITS file object (ffo)�[39;00m
    �[32m-> �[39m�[32m1193�[39m         fileobj = �[43m_File�[49m�[43m(�[49m
    �[32m   1194�[39m �[43m            �[49m�[43mfileobj�[49m�[43m,�[49m
    �[32m   1195�[39m �[43m            �[49m�[43mmode�[49m�[43m=�[49m�[43mmode�[49m�[43m,�[49m
    �[32m   1196�[39m �[43m            �[49m�[43mmemmap�[49m�[43m=�[49m�[43mmemmap�[49m�[43m,�[49m
    �[32m   1197�[39m �[43m            �[49m�[43mcache�[49m�[43m=�[49m�[43mcache�[49m�[43m,�[49m
    �[32m   1198�[39m �[43m            �[49m�[43muse_fsspec�[49m�[43m=�[49m�[43muse_fsspec�[49m�[43m,�[49m
    �[32m   1199�[39m �[43m            �[49m�[43mfsspec_kwargs�[49m�[43m=�[49m�[43mfsspec_kwargs�[49m�[43m,�[49m
    �[32m   1200�[39m �[43m            �[49m�[43mdecompress_in_memory�[49m�[43m=�[49m�[43mdecompress_in_memory�[49m�[43m,�[49m
    �[32m   1201�[39m �[43m        �[49m�[43m)�[49m
    �[32m   1202�[39m     �[38;5;66;03m# The Astropy mode is determined by the _File initializer if the�[39;00m
    �[32m   1203�[39m     �[38;5;66;03m# supplied mode was None�[39;00m
    �[32m   1204�[39m     mode = fileobj.mode
    
    �[36mFile �[39m�[32m~/venv/PyAuto/lib/python3.12/site-packages/astropy/io/fits/file.py:239�[39m, in �[36m_File.__init__�[39m�[34m(self, fileobj, mode, memmap, overwrite, cache, use_fsspec, fsspec_kwargs, decompress_in_memory)�[39m
    �[32m    237�[39m     �[38;5;28mself�[39m._open_fileobj(fileobj, mode, overwrite)
    �[32m    238�[39m �[38;5;28;01melif�[39;00m �[38;5;28misinstance�[39m(fileobj, (�[38;5;28mstr�[39m, �[38;5;28mbytes�[39m)):
    �[32m--> �[39m�[32m239�[39m     �[38;5;28;43mself�[39;49m�[43m.�[49m�[43m_open_filename�[49m�[43m(�[49m�[43mfileobj�[49m�[43m,�[49m�[43m �[49m�[43mmode�[49m�[43m,�[49m�[43m �[49m�[43moverwrite�[49m�[43m)�[49m
    �[32m    240�[39m �[38;5;28;01melse�[39;00m:
    �[32m    241�[39m     �[38;5;28mself�[39m._open_filelike(fileobj, mode, overwrite)
    
    �[36mFile �[39m�[32m~/venv/PyAuto/lib/python3.12/site-packages/astropy/io/fits/file.py:711�[39m, in �[36m_File._open_filename�[39m�[34m(self, filename, mode, overwrite)�[39m
    �[32m    708�[39m ext = os.path.splitext(�[38;5;28mself�[39m.name)[�[32m1�[39m]
    �[32m    710�[39m �[38;5;28;01mif�[39;00m �[38;5;129;01mnot�[39;00m �[38;5;28mself�[39m._try_read_compressed(�[38;5;28mself�[39m.name, magic, mode, ext=ext):
    �[32m--> �[39m�[32m711�[39m     �[38;5;28mself�[39m._file = �[38;5;28;43mopen�[39;49m�[43m(�[49m�[38;5;28;43mself�[39;49m�[43m.�[49m�[43mname�[49m�[43m,�[49m�[43m �[49m�[43mIO_FITS_MODES�[49m�[43m[�[49m�[43mmode�[49m�[43m]�[49m�[43m)�[49m
    �[32m    712�[39m     �[38;5;28mself�[39m.close_on_error = �[38;5;28;01mTrue�[39;00m
    �[32m    714�[39m �[38;5;66;03m# Make certain we're back at the beginning of the file�[39;00m
    �[32m    715�[39m �[38;5;66;03m# BZ2File does not support seek when the file is open for writing, but�[39;00m
    �[32m    716�[39m �[38;5;66;03m# when opening a file for write, bz2.BZ2File always truncates anyway.�[39;00m
    
    �[31mFileNotFoundError�[39m: [Errno 2] No such file or directory: 'dataset/interferometer/uv_wavelengths/sma.fits'
    
    
    
  2. Jammy2211 commented on Jul 24, 2026

    @Jammy2211
    CollaboratorAuthor

    Library PR Created — smoke gate blocked

    • PR: fix: preserve adjacent notebook markdown cells #197
    • Commit: 6916814aca8bea021d38e4a4a2a07811f4ee3a3a
    • PyAutoHands tests: 218 passed
    • API impact: no user-facing package API migration; internal notebook-cell boundary behavior only
    • Downstream smoke: 49 passed, 8 failed, 3 configured skips

    The full smoke table and tracebacks are in the preceding comment. The failures are six notebook dataset/simulator-path errors and two AutoLens Delaunay missing-dataset errors. Per ship_library, the PR remains open with pending-release; it is not merged and the task stays active while the smoke failure is triaged. The dependent Hygiene phase has not started.

  3. Jammy2211 commented on Jul 24, 2026

    @Jammy2211
    CollaboratorAuthor

    Smoke triage correction — 2026-07-24

    The 8 failures in the earlier parallel/manual smoke comment are validation-harness artifacts, not downstream regressions from PR #197.

    • Regenerated notebooks were executed from /tmp/pyauto-smoke-regen-*, so workspace-relative simulator paths could not resolve.
    • AutoLens smoke scripts sharing datasets were launched concurrently while PYAUTO_SMALL_DATASETS=1 removed and regenerated those directories, exposing partial datasets to the sibling process.

    Re-running the affected workspaces through each repository's canonical .github/scripts/run_smoke.py (sequential scripts; notebooks staged at the workspace root) gives:

    Workspace Passed Failed Skipped Total
    autofit_workspace 10 0 0 10
    autogalaxy_workspace 8 0 0 8
    autolens_workspace 11 0 0 11

    Together with the three unaffected suites from the original run, the corrected downstream result is 58 passed, 0 failed, 2 configured skips (60 total).

    No workspace source change is warranted for these failures. The parallel/manual smoke contract should be aligned separately with the canonical workspace runners.

  4. Jammy2211 commented on Jul 24, 2026

    @Jammy2211
    CollaboratorAuthor

    Phase 3 workspace cleanup is shipped to six open pending-release PRs (nothing merged):

    The cleanup merged 80 adjacent boundaries across 57 scripts; autolens_workspace#340 had already removed the 81st during a concurrent approved task. HowToFit was re-scanned and remains a zero-change target. Final Hygiene result: 0 findings, 0 parse errors across all seven repositories.

    Post-generation validation: AutoFit 10/10, AutoGalaxy 8/8, AutoLens 11/11, HowToGalaxy 4/4, HowToLens 6/6, and the changed AutoCTI script passed directly under test mode. Exact ordered-prose transform witnesses and Python compilation passed for all changed scripts. Primary tracking issue: PyAutoLabs/autolens_workspace#341.

  5. Jammy2211 commented on Jul 27, 2026

    @Jammy2211
    CollaboratorAuthor

    PR #197 merged 2026-07-24. 218 PyAutoHands tests passed; combined downstream smoke result 58 passed / 0 failed / 2 configured skips (canonical per-workspace runners). Phase 2 (PyAutoBrain#162, hygiene scan mode) and phase 3 (autolens_workspace#341, the 80-boundary merge across 6 workspace repos) have both shipped and merged. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions