Repository navigation
Clean module naming: numpy_impl/ + topic names (#34) - #56
Merged
neuromechanist merged 2 commits intoJul 7, 2026
Conversation
Drop the amica_/pyAMICA/_torch_ng module-name sprawl for topic-based names. - NumPy reference: pyAMICA.py + amica_*.py -> pyAMICA/numpy_impl/ as core/newton/pdf/data/load/viz/utils/cli.py (+ __init__ exposing AMICA). params.json moved alongside its loader (numpy_impl/core.py). - PyTorch: torch_impl/amica_torch_ng.py -> torch_impl/core.py. - Public import surface unchanged: from pyAMICA import AMICA, AMICA_NumPy, AMICATorchNG (plus the numpy_impl/torch_impl subpackages). No compat shims; all call sites, tests, CLI (-m pyAMICA.numpy_impl.cli), and docs updated. - pyproject: list subpackages explicitly and ship numpy_impl/params.json as package-data, fixing a latent bug where a bare packages=["pyAMICA"] dropped torch_impl/ (and params.json) from the built wheel on some setuptools versions -- AMICA_NumPy() now loads its defaults from a clean wheel install. Tested: pytest -m "not slow" 85 passed / 5 skipped / 1 xfailed (CI-equivalent); wheel builds and imports (incl. numpy_impl + torch_impl + params.json) from a clean venv; ruff clean.
Member
Author
Review response (code-reviewer, Sonnet)No critical or important findings. The reviewer verified completeness by grep + built and installed the wheel, imported the public API from it, ran
|
neuromechanist
deleted the
34-epic-clean-module-naming-and-structure-drop-amica_pyamica_torch_v2-sprawl
branch
July 7, 2026 14:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #34 (epic delivered as a single PR per maintainer decision).
Drops the
amica_/pyAMICA/_torch_ngmodule-name sprawl for topic-based names. Pure structural rename — no behavior change.Changes
pyAMICA/numpy_impl/:pyAMICA.py→core.py,amica_newton.py→newton.py,amica_pdf.py→pdf.py,amica_data.py→data.py,amica_load.py→load.py,amica_viz.py→viz.py,amica_utils.py→utils.py,amica_cli.py→cli.py; newnumpy_impl/__init__.pyexposesAMICA.params.jsonmoved alongside its loader (numpy_impl/core.py).torch_impl/amica_torch_ng.py→torch_impl/core.py.from pyAMICA import AMICA, AMICA_NumPy, AMICATorchNG(plus thenumpy_impl/torch_implsubpackages). No compat shims — every call site, test, the CLI entrypoint (python -m pyAMICA.numpy_impl.cli), and the live docs (AGENTS/README/MIGRATION/PROGRESS) were updated directly.pyproject.tomlnow lists the subpackages explicitly and shipsnumpy_impl/params.jsonas package-data. A barepackages=["pyAMICA"]droppedtorch_impl/(andparams.json) from the built wheel on some setuptools versions, so a pip-installedimport pyAMICA/AMICA_NumPy()would have failed; both now work from a clean wheel install.Layout decision
numpy_impl/subpackage (symmetric withtorch_impl/), per maintainer choice.Tests / verification
pytest -m "not slow": 85 passed, 5 skipped, 1 xfailed (matches CI exactly). All moves preserved as git renames.import pyAMICA+AMICA_NumPy()succeed (withnumpy_impl+torch_impl+params.jsonpresent).AMICA_NumPy is numpy_impl.core.AMICA,AMICATorchNG is torch_impl.core.AMICATorchNG. ruff clean..context/ADRs and issue notes are archival (point-in-time records) and intentionally left referencing the old paths.