Skip to content

refactor: purge the autoconf-era legacy surface from PyAutoNerves #137

Closed

Description

@Jammy2211

Overview

After the autoconf → autonerves rename (#135), PyAutoNerves still carries a legacy surface from the pre-rename era. A survey on 2026-07-23 separated it into three genuinely different problems, which this task ships as four independent steps.

The autoconf sightings are not tracked drift — git grep -ril autoconf over tracked files returns nothing. What remains is untracked working-copy cruft, one test that litters the repo root on every run, and four dormant one-shot scripts (two of which are already broken on their own imports).

Plan

  • Delete the untracked rename leftovers (autoconf/, test_autoconf/, autoconf.egg-info/, build/, bad/) from the working copy — no commit needed, but autoconf/ is not inert: it still resolves as a namespace package and shadows imports.
  • Fix the test that regenerates bad/ in the repo root on every run, rather than gitignoring the symptom.
  • Delete the dead EDEN tooling (eden.yaml, scripts/edenise.py) — its driver imports autofit.tools.edenise, which no longer exists in PyAutoFit.
  • Delete the one-shot config-migration tooling (scripts/, priors/, json_prior/generate.py) that bootstrapped the original configs years ago and is wired into no CI and no workspace.
  • Trim PR test: re-anchor the version-handshake test fixtures #136 to its test-fixture half, reverting the __version__ bump that contradicts the wheels+tags-only release model.
  • Close feat: workspace version check via config/general.yaml on every library import #100, which is fully shipped but was never closed on GitHub.
Detailed implementation plan

Affected repositories

  • PyAutoNerves (primary, library)

Branch survey

Repository Current branch Dirty? Claim
./PyAutoNerves main clean unclaimed
./PyAutoFit main clean claimed by testmode-env-drift → descoped

Suggested branch: feature/purge-autoconf-era-legacy
Worktree root: ~/Code/PyAutoLabs-wt/purge-autoconf-era-legacy/

Survey findings

1. Untracked rename leftovers. autoconf/, test_autoconf/, autoconf.egg-info/, build/ and bad/ are all present in the working copy and all untracked. autoconf/ and test_autoconf/ contain only __pycache__ — but they still import:

python -c "import autoconf"
→ _NamespacePath(['/home/jammy/Code/PyAutoLabs/PyAutoNerves/autoconf'])

So they shadow imports rather than sitting inert. build/ and *.egg-info/ are already covered by .gitignore.

2. bad/ is regenerated on every test run. test_autonerves/test_config.py:44 sets BAD_PATH = "bad/path" and test_path_empty calls os.makedirs(BAD_PATH, exist_ok=True) into the CWD, never cleaning up. Deleting the directory without fixing the producer is a no-op.

3. Dead one-shot tooling in scripts/. Four drivers from the original config bootstrap, dormant for years, referenced from no CI and no workspace. Two are already broken:

Script State
edenise.py imports autofit.tools.edenise — removed from PyAutoFit, raises ImportError
convert_prior_configs.py imports oyaml — not a declared dependency
convert_config.py the .ini → YAML migration, long since run
generate_priors.py CLI over autonerves/json_prior/generate.py, whose only other consumer is its own test

Steps

Step 0 — local cruft (no PR).
rm -rf autoconf/ test_autoconf/ autoconf.egg-info/ build/ bad/. All untracked; nothing to commit.

Step 1 — stop bad/ regenerating.
test_autonerves/test_config.py: move test_path_does_not_exist and test_path_empty onto tmp_path; delete the BAD_PATH constant and the remove_path() helper. Fixes the producer instead of gitignoring the symptom.

Step 2 — remove dead EDEN tooling.
Delete eden.yaml and scripts/edenise.py. This is the PyAutoNerves leg of PyAutoMind/draft/refactor/pyautofit/remove_eden_packaging_tooling.md.

PyAutoFit/eden.yaml is descoped — the branch survey found PyAutoFit claimed by the testmode-env-drift worktree. autofit.tools.edenise is already gone from PyAutoFit main, so only the orphan eden.yaml remains there: a one-file follow-up once that claim releases. The eden draft stays open until then.

Step 3 — remove the one-shot config-migration tooling.
Delete scripts/convert_config.py, scripts/convert_prior_configs.py, scripts/generate_priors.py, autonerves/json_prior/generate.py, test_autonerves/json_prior/test_generate.py, and priors/subconfig.json (a stray output artifact of generate_priors.py). Both scripts/ and priors/ disappear.

Step 4 — sort PR #136.
Force-push the branch with only the test-fixture re-anchor (test_workspace.py, test_setup_colab.py), reverting autonerves/__init__.py to 2026.7.9.1. Rewrite the PR body to describe a fixture cleanup — moving the colab mock off the yanked 2026.7.6.649 — not a version sync.

Key files

  • test_autonerves/test_config.py — tmp_path migration (step 1)
  • eden.yaml, scripts/edenise.py — deleted (step 2)
  • scripts/, priors/, autonerves/json_prior/generate.py, test_autonerves/json_prior/test_generate.py — deleted (step 3)
  • autonerves/__init__.py — reverted on the test: re-anchor the version-handshake test fixtures #136 branch (step 4)

Guardrails

Testing approach

Full pytest test_autonerves before each push. For step 1, additionally confirm bad/ is absent from the repo root after a run. For step 3, confirm import autonerves still succeeds and the four json_prior.config exports still resolve.

Related

Original Prompt

Click to expand starting prompt

PyAutoNerves still has some references to autoconf (autoconf folder, test_autoconf). Are we able to clean up the cause of this? Just feels like legacy or drift from the old name. There is also an egg info file i guess we can remove, and the bad folder (prevent that from being made?) and the build folder. There is also python files which I think are now defunct so assess if we can remove them, for example we no longer edenise code so that can go (but check its depedency in autofit) and also converting configs to .ini, generate_priors.py are all things which we used to set up initial configs years ago. Maybe break this task down into logical steps as I've throw different things at you. remove eden.yaml from autonerves. also sort this: #136 and I think we can close this? #100, chekc it again autobrain

Activity

  1. Jammy2211 commented on Jul 23, 2026

    @Jammy2211
    CollaboratorAuthor

    At PR-open — 2026-07-23

    Both PRs green on 3.12 and 3.13.

    Step Where State
    0 — untracked rename leftovers local only done, no diff exists
    1 — bad/ producer #138 (d7f0401) ✅
    2 — EDEN tooling #138 (9bc8d4d) ✅
    3 — config-bootstrap tooling #138 (461650c) ✅
    4 — trim #136 #136 (f875f74) ✅ force-pushed
    5 — close #100 — ✅ closed

    PRs: #138 (steps 1–3) · #136 (step 4, retitled test: re-anchor the version-handshake test fixtures)

    Deviation from the approved plan

    Steps 1–3 shipped as one PR with three atomic commits rather than three separate PRs. Same revertability per step (git revert <sha>), one repo, one reviewer — the three-PR split was overhead without a corresponding gain. Flagging it because the plan said otherwise.

    Findings that changed the shape of the work

    • The autoconf sightings were not tracked drift. git grep -ril autoconf over tracked files returns nothing, so step 0 produced no diff at all. But the leftovers were not inert: build/lib/autoconf/ held a full stale copy of the pre-rename source (workspace.py, conf.py, …), and autoconf/ resolved as a namespace package — import autoconf succeeded and shadowed imports. It now correctly raises ModuleNotFoundError.
    • Two of the four scripts were already broken on their own imports — edenise.py (autofit.tools.edenise removed from PyAutoFit) and convert_prior_configs.py (oyaml undeclared). This was dead code, not merely dormant code.
    • eden.yaml was never the file edenise.py read. The driver reads eden.ini, removed org-wide on 2026-07-13. Both deleted regardless.
    • test: re-anchor the version-handshake test fixtures #136 was reverting a design, not syncing a version. Its __version__ bump on main contradicts the wheels+tags-only release model (PyAutoBuild#118/feat: setup_colab registry for all 6 notebook repos, GPU/env fixes, tag-pinned clones #120), under which main's __version__ is expected to lag and check_version is a compatibility floor rather than an exact pin. The fixture half was kept — it also moves the colab mock off 2026.7.6.649, a yanked release.

    Descoped

    PyAutoFit/eden.yaml — PyAutoFit is claimed by the testmode-env-drift worktree. autofit.tools.edenise is already gone from its main, so one orphan file remains there. PyAutoMind/draft/refactor/pyautofit/remove_eden_packaging_tooling.md stays open for it.

    Testing

    151 passed on #136. On #138: 151 → 149, the two lost being test_generate.py's own. Verified after the deletions that import autonerves succeeds and all four json_prior.config exports (default_prior, make_config_for_class, path_for_class, JSONPriorConfig) still resolve, and that no bad/ directory is created by a test run.

    Merges are human — nothing here has been merged.

  2. Jammy2211 commented on Jul 23, 2026

    @Jammy2211
    CollaboratorAuthor

    Shipped — 2026-07-23

    Both PRs merged and main verified.

    Verified on merged main

    • 149 passed
    • import autoconf → ModuleNotFoundError (was resolving as a namespace package)
    • a full test run leaves no bad/ directory
    • __version__ still 2026.7.9.1 — deliberately not bumped
    • tree is down to autonerves/ + test_autonerves/ + packaging; scripts/, priors/, eden.yaml all gone

    Branches deleted, worktree removed, Mind record at complete/2026/07/purge-autoconf-era-legacy.md.

    Still open, deliberately

    • PyAutoFit/eden.yaml — one orphan file; PyAutoFit is claimed by testmode-env-drift. PyAutoMind/draft/refactor/pyautofit/remove_eden_packaging_tooling.md stays open for it.
    • /hygiene cannot see orphan config files. That blind spot is how priors/subconfig.json and eden.yaml survived — the same gap recorded under the grids.yaml removal. Being picked up next.
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