Repository navigation
refactor(projects): move the studies to polyphys-lab - #278
Merged
Merged
Conversation
- projects/: removed. The four studies' parsers, specs, and tests are in polyphys-lab, installed as polyphys_lab.<study> (amirhs1/polyphys-lab#1). - polyphys/tests/probe/, analyze/test_pipeline.py, viz/test_helpers.py: remove the 27 tests that need a study's parser or specs (16 tier B, 11 tier C) and the fixtures only they used; they are in amirhs1/polyphys-lab#2. The three tests that open the real frames with the library alone stay, with polyphys/tests/data/probe/. The module docstrings say where the moved tests are. - polyphys/tests/manage/test_parser.py: a ChainCyl test of the error a species too wide for the cylinder raises, which only a study parser test reached; the moved-parser test expects the new message. - polyphys/manage/parser.py: the ImportError of a moved study parser names polyphys_lab.<study>.parser and the lab's URL; versionchanged 1.1.0. - benchmarks/organizer_timing.py: --parser takes <module>:<class>. - .github/workflows/ci.yaml, .github/pull_request_template.md, pyproject.toml, AGENTS.md, CONTRIBUTING.md: drop projects from the lint, type-check, and test commands and from package discovery and mypy; retire the projects area and the projects/ rows of the tier tables in AGENTS.md and README.md. - README.md, docs/source/ (decisions, pipeline, probe, studies, testing, viz, workflow), polyphys/spec.py, analyze/pipeline.py, tests/strategies.py, tests/test_docs.py: point to polyphys-lab; studies.md says where the folder named by the 1.0.0 ImportError went; decisions.md adds a paragraph on the companion repository. - CHANGELOG.md: three lines under Unreleased. Why: the maintainer decided on 2026-11-08 that PolyPhys stands alone, and on 2026-11-14 how: move the tests that need a study to the lab, since a copy of the parsers in polyphys/tests would ship in the wheel; link the lab now; keep no stub projects/README.md; retire the projects area. Assisted-by: Claude Code, claude-opus-5-5 (full implementation) Checks-run: python -m flake8 polyphys — clean Checks-run: python -m mypy polyphys/analyze polyphys/manage polyphys/probe polyphys/simulate — no issues in 25 files Checks-run: python -m pytest polyphys README.md --cov=polyphys --doctest-modules --doctest-glob='README.md' — 2065 passed, 2 skipped; 5 lines missed against 6 on origin/main Checks-run: python -m sphinx -W -b html docs/source — built Checks-run: python -m build — sdist and wheel built; no projects/ in the wheel
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main amirhs1/PolyPhys#278 +/- ##
==========================================
- Coverage 99.95% 99.95% -0.01%
==========================================
Files 62 62
Lines 10945 10754 -191
==========================================
- Hits 10940 10749 -191
Misses 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
PolyPhys no longer holds or imports any study: the four published studies'
parsers, specs, and tests, and the 27 PolyPhys tests that need them, are in
the companion repository
polyphys-lab. The maintainer
decided on 2026-11-08 that PolyPhys stands alone, and on 2026-11-14 how
(#275).
Related issues
Closes #275
Refs #277, the later change that brings real-frame tests back under
synthetic names.
Problem
The package's tests imported
projects.<study>.specthroughpolyphys/tests/probe/conftest.py:259,analyze/test_pipeline.py:1630, andviz/test_helpers.py:273; CI linted, type-checked, and testedprojects/;and the 1.0.0
ImportErrorof a moved parser pointed into this repository.Deleting
projects/in a scratch copy failed 218 tier B cases and, with anempty
POLYPHYS_DATA_DIR, 11 tier C tests.What changed
projects/removed (19 files).they used, removed from the probe, pipeline, and viz test modules; they
are in amirhs1/polyphys-lab#2 with a copy of the trimmed frames. The
three tests that open the frames with
make_universealone stay here,with
polyphys/tests/data/probe/.polyphys/tests/manage/test_parser.py: aChainCyltest of theValueErrora species too wide for the cylinder raises(
polyphys/manage/parser.py:1210-1211), which only a study parser testreached before.
polyphys/manage/parser.py: theImportErrornamespolyphys_lab.<study>.parserand the lab's URL;versionchanged:: 1.1.0.benchmarks/organizer_timing.py:--parser <module>:<class>.pyproject.toml,AGENTS.md, andCONTRIBUTING.md:projectsdropped from the commands, packagediscovery, and mypy; the
projectsarea retired, and theprojects/rows of the tier tables in
AGENTS.mdand the README removed together.The
area:projectslabel stays.polyphys-lab.
studies.mdsays where the folder that the 1.0.0ImportErrornames went;decisions.mdadds a paragraph instead ofrewriting the earlier record.
CHANGELOG.md: three lines under[Unreleased].Checks run
python -m flake8 polyphys→ clean (withbenchmarks, also clean)python -m mypy polyphys/analyze polyphys/manage polyphys/probe polyphys/simulate→ no issues in 25 source filespython -m pytest polyphys README.md --cov=polyphys --cov-report=term-missing --cov-report=xml --doctest-modules --doctest-glob='README.md'→ 2065 passed, 2 skipped; 5 lines missed, against 6 onorigin/mainin a throwaway worktreepython -m build→ sdist and wheel built; the wheel has 69 files and noprojects/python -m sphinx -W -b html docs/source docs/_build→ built, afterrm -rf docs/source/generated; rebuilt after the laststudies.mdedit, withpolyphys/tests/test_docs.py→ 6 passedCHANGELOG.mdhas entries under[Unreleased]Also:
pytest polyphys/tests/probewith coverage, with and without the 16moved tier B tests →
polyphys/probe/at 100% in every module both times.The lab suite passes against this branch: 635 passed, 59 skipped, 1 xfailed.
The moved tier C tests ran in the lab on the maintainer's data, run by the
maintainer on 2026-11-14:
pytest -m private_data→ 58 passed.Not verified: the full pytest run predates the last
studies.mdedit, whichchanged prose only.
Scientific correctness
polyphys/analyze/,probe/, orsimulate/changes in code, only indocstrings
expected value changed; the tier B frames stay here and are copied, not
moved, to the lab
Decisions and risks
The maintainer chose to move the tests rather than copy the study parsers
into
polyphys/tests/, which ships in the wheel, or rename the fixturewholes now (#277).
ImportErrorpath finds the pointer instudies.md; the benchmark's--parsernow takes<module>:<class>.Neither is public API under the stability page.
public; the maintainer chose to link it now.
Notes for review
amirhs1/polyphys-lab#2. Review the four docstrings in
polyphys/tests/probe/that now point to the lab, andpolyphys/tests/probe/conftest.py, which lost the fixtures only themoved tests used and the
polymer_countsandwindow_countsmethods.transfer to the lab.
Assisted-by: Claude Code, claude-opus-5-5 (full implementation)
Checks-run: flake8 polyphys — clean
Checks-run: mypy (four layers) — no issues in 25 files
Checks-run: pytest with doctests — 2065 passed, 2 skipped
Checks-run: sphinx -W — built
Checks-run: python -m build — no projects/ in the wheel