Skip to main content

PyAutoNerves

PyAutoNerves

PyAutoScientist GitHub PyAutoScientist ReadTheDocs

PyAutoNerves is the Nerves of the PyAutoScientist — the configuration, serialization, and I/O foundation (package autonerves) connecting the workspace's conventions to every library. It provides a layered configuration system with workspace overrides, dict / JSON / CSV serialization of arbitrary objects, and FITS I/O.

PyAutoFit, PyAutoArray, PyAutoGalaxy, and PyAutoLens all depend on autonerves: it supplies their packaged default config, the object-serialization used to persist models and results, and shared utilities (test_mode, jax_wrapper). Centralising these here keeps a single, consistent config and I/O layer beneath every library. As a released library it ships with every nightly train — see the PyAutoHands release board for the current version.

Install

pip install autonerves

Examples

Layered config — read a directory of YAML into a queryable Config:

from autonerves.conf import Config

config = Config("path/to/config")          # directory of YAML files
value = config["general"]["model"]["section"]["value"]

JSON serialization — round-trip arbitrary Python objects:

from autonerves.dictable import output_to_json, from_json

data = {"sersic_index": 4.0, "centre": [0.0, 0.0]}
output_to_json(data, "model.json")
restored = from_json("model.json")         # == data

FITS I/O — write and read a NumPy array:

import numpy as np
from autonerves.fitsable import output_to_fits, ndarray_via_fits_from

arr = np.arange(12.0).reshape(3, 4)
output_to_fits(values=arr, file_path="demo.fits", overwrite=True)
loaded = ndarray_via_fits_from(file_path="demo.fits", hdu=0)   # np.allclose(arr, loaded)

Nerves board

https://pyautolabs.github.io/PyAutoNerves/ — a read-only browser of every config file and option across the organism: each library's <package>/config/ (PyAutoFit, PyAutoArray, PyAutoGalaxy, PyAutoLens, PyAutoCTI) and each workspace's config/ that overrides them.

  • Per repo (repos/<Repo>.html): every YAML file with its top-level keys, its source line-numbered with the comments kept (the comments are the option docs) and a GitHub link; prior files render as a table (Class · param · type · mean/σ or bounds · width modifier · limits).
  • Search: the index page's box searches every key, file and comment across all repos and jumps to the line.
  • Override map: autonerves resolves a key workspace → last-imported library → … → PyAutoFit (Config.push(keep_first=True), keys lowercased), so each workspace file is compared, by relative path, against the same file across its library stack in that order (lens → galaxy → array → fit; cti → array → fit). Keys whose value differs, keys no library defines (orphans) and keys that fall through to the libraries are listed per file. build/*.yaml is workspace tooling and is grouped apart.
  • Environment variables: the PYAUTO_* switches autonerves reads.
  • Cockpit feed (state.json): green when every file parses and no workspace key is orphaned; yellow with one item per unparseable file or orphan-carrying workspace file; grey when nothing was collected. Never red.

Rendered daily by .github/workflows/nerves_board.yml from sparse checkouts of the config folders; the renderer is scripts/board.py (not part of the autonerves package). Nothing on the board edits config.

Metadata

Release files for autonerves 2026.9.27.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autonerves 2026.9.27.1
File Size Uploaded
autonerves-2026.9.27.1.tar.gz 165.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for autonerves 2026.9.27.1
File Interpreter ABI Platform
autonerves-2026.9.27.1-py3-none-any.whl Python 3 none any Details

Total release size: 208.3 kB

Release files / autonerves-2026.9.27.1.tar.gz

Download URL autonerves-2026.9.27.1.tar.gz
Size 165.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2c4078d00bee54e320c9a75a1481e57ed16c35fa276fbff01fe341cda6f2dd05
BLAKE2b-256 checksum
How to use checksums
c4d12b5a5eae7bf0aff9d9e102dad54bfd8fd9b79f4922877c2116de64ebc334
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.14

Release files / autonerves-2026.9.27.1-py3-none-any.whl

Download URL autonerves-2026.9.27.1-py3-none-any.whl
Size 43.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed676bb0385a1ab35746e592a67c511fb57e00a7364965e78f4fed535ca0e965
BLAKE2b-256 checksum
How to use checksums
05df26eb36d6f1f365dea229ff66bae6d1da4251d8988d7c56454dc012318292
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.14
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page