fix: publish as pyautoreduce — autoreduce on PyPI is not ours - #72
Merged
Conversation
`autoreduce` on PyPI belongs to github.com/ayush9pandey/AutoReduce, an unrelated and actively maintained project (0.1.0 in 2020 through 0.9 on 2026-08-12). We claimed that distribution name in pyproject.toml and our README told users to `pip install autoreduce` — which installs a stranger's package. The `[hst]`/`[psf]` extras do not exist there, so pip warns about unknown extras and installs it anyway. The distribution becomes `pyautoreduce` (free on PyPI, matches the repo name and the org prefix). The IMPORT package stays `autoreduce`, so no source renaming: `target.py`, `psf/starred_epsf.py`, `scripts/reduce_cosmos_web_ring.py` and `docs/design/hst_acs_pipeline.md:253` were already writing `pyautoreduce[starred]`, so this resolves that drift rather than creating it. - pyproject.toml: name, with the reason recorded in place - autoreduce/__init__.py: resolve __version__ against the distribution. Left alone, the rename degrades __version__ to the PackageNotFoundError fallback "0.0.dev0" — or picks up the foreign project's version when it happens to be installed, and package/provenance.py writes that into every reduction.json as ours. - README.md, docs/design/hst_acs_pipeline.md:479, and the two ImportError install hints (psf/stpsf_model.py, package/cosmic_rays.py) Deliberately unchanged: package/provenance.py's tuple (fed to `__import__(package).__version__` — import names, and the import package is unchanged) and .github/workflows/main.yml's `package: autoreduce` input (Heart's lib-tests.yml uses it as the import package for `pytest --cov` and as a repo-mapping key, not as a distribution name). Verified on a 3.12 venv: wheel METADATA is `Name: pyautoreduce` / `Requires-Python: >=3.12` with `top_level.txt` still `autoreduce`; `autoreduce.__version__` and the provenance record resolve; 302 tests pass. Closes #71 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V19RfJbExKP4hsT5c6LttV
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 #71.
The finding
#71 was filed as "published
autoreduce 0.9never got the Python 3.12 floor". That premise is disproved.autoreduceon PyPI is not a PyAutoLabs package — it is github.com/ayush9pandey/AutoReduce, "Python tools for automated model reduction of nonlinear dynamical systems", with a release history running 0.1.0 (2020-10-15) through 0.9 (2026-08-12).Corroborating evidence that we have never published it:
git ls-remote --tags PyAutoLabs/PyAutoReducereturns nothing, and the build issetuptools-scm+dynamic = ["version"]— an untagged tree cannot produce a0.9.autoreduce: not inrelease.yml's matrix, not inpre_build.sh'sWORKSPACE_SPECS.So there is no floor gap, and the
<=3.14.7cap in #71 is a third party's.requires-python = ">=3.12"fromd7bd916awas already correct.The actual defect
We claimed a distribution name owned by someone else, and told users to install it:
Second-order:
autoreduce/__init__.pyresolved__version__viaimportlib.metadata.version("autoreduce"), andpackage/provenance.pywrites that into everyreduction.json. On a machine with the foreign package installed, our provenance recorded its version as ours.The change
Distribution becomes
pyautoreduce(free on PyPI, matches the repo name and the org prefix). The import package staysautoreduce— no source renaming.target.py,psf/starred_epsf.py,scripts/reduce_cosmos_web_ring.pyanddocs/design/hst_acs_pipeline.md:253were already writingpyautoreduce[starred], so this resolves existing drift rather than creating it.pyproject.tomlname, with the reason recorded in place so nobody tidies it backautoreduce/__init__.py_version("pyautoreduce")— load-bearing, see belowREADME.mddocs/design/hst_acs_pipeline.md:479autoreduce[frames]→pyautoreduce[frames]autoreduce/psf/stpsf_model.pyImportErrorinstall hintautoreduce/package/cosmic_rays.pyImportErrorinstall hintDeliberately unchanged:
autoreduce/package/provenance.py— its tuple is fed to__import__(package).__version__. Those are import names, and the import package is unchanged; renaming that entry would break provenance..github/workflows/main.yml'spackage: autoreduce— Heart'slib-tests.ymluses it as the import package (pytest --cov ${{ inputs.package }}) and as a repo-mapping key, not as a distribution name.Verification
Built and installed on a real 3.12 venv:
The
__init__.pyedit is load-bearing, not cosmetic — in the same venv,version("autoreduce")raisesPackageNotFoundError, so leaving it would have silently degraded__version__to the"0.0.dev0"fallback.0.0.post1is setuptools-scm's untagged fallback; the real version arrives with the tag, which is the follow-up's job.Follow-up
Induction into the PyAutoHands release machinery and the family's date-based versioning is filed separately as
PyAutoMind/draft/release/pyautoreduce/pyautoreduce_release_induction.md, blocked until this merges. Worth noting there: date versioning needs no packaging change — this repo's[tool.setuptools_scm]block is already byte-identical to PyAutoLens's, and the family's2026.8.23.1versions come from the annotated tagrelease.ymlpushes beforepython -m build.Companion docs PR in
autoreduce_workspacefollows behind this one (library-first merge gate).One thing noticed but not fixed here, to keep the PR minimal: the built wheel's
top_level.txtlistsdocsandscriptsalongsideautoreduce. That is pre-existing ([tool.setuptools.packages.find]excludesdocsbut notscripts, and neither exclusion is taking effect) and unrelated to this diff — worth its own hygiene task.Generated by Claude Code