Repository navigation
Fix stale amica15.f90 line citations in comments - #259
Merged
Merged
Conversation
Reviewers found many amica15.f90:<line> citations in docstrings/comments drifted off by roughly 18-20 lines from the actual reference file in this repo. Re-verified every citation against pamica/amica15.f90 with sed/grep and corrected the wrong ones; comment/docstring text only, no code changes.
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
Comment/docstring-only cleanup: no code or test logic changed, only
amica15.f90:<line>citations in comments and docstrings.Reviewers found many
amica15.f90:<line>citations across the codebase had drifted off by roughly 18-20 lines from the actualpamica/amica15.f90in this repo (and a few by more, in the write_output/rejection-handling region near lines 900-3700).Every citation was enumerated with
grep -rn "amica15.f90:" pamica/ docs/ --include="*.py" --include="*.md", the surrounding code was read to identify the Fortran construct being cited, and the true line was located inpamica/amica15.f90withsed -n/grep -n.Citations that already pointed at the right line were left untouched; only the wrong ones were corrected.
Notable corrections
if (iter > 1), the LL-decrease branch,use_min_dll,use_grad_norm) was already correct at 1051/1058/1078-1090/1091-1097 in most places; several call sites still cited the pre-drift numbers 1033/1040/1060-1072/1073-1079 and were corrected.numeigs = min(...),nw = numeigs, the reversed-Stmp2loop, thedo_approx_spherepolar-factor block, theSpinvpseudoinverse) moved from 395/545/455-460/483-490/550-560 to 413/563/473-479/501-508/568-578.update_params's A-update gate, the rholrate ceiling ratchet, and theidentify_shared_comps/get_unmixing_matricesshare schedule moved from 1785/1788/1050/1838/1840,1845/1898/1918 to 1803/1806,1813/1068/1856/1858,1863/1916/1936.sum(modloglik(:,i)) == 0.0) was pointing atif (load_rej) then(887-896); the real check isreject_data's zeroing block (2231-2234) and the sentinel read itself (907). Both were wrong for a different reason than simple line drift and are now correct.case (0)/(2)/(3)/(4)/(1)blocks).pdftype/=0freezingdorhomoved from 3682 to 3704-3705 (a larger, non-uniform drift than the rest of the file).One judgment call (not left ambiguous, but worth flagging)
amica15.f90:2299/2308-2333(theS-writerecland thewrite_outputLLt interleave) had three nearly-identical candidate targets in the reference (a periodic history checkpoint at ~2317, a date-stamped final write at ~2394/2333, and an explicit-outdirparamfinal write at ~2423/2338-2343). Picked the explicit-outdirparambranch (2423, 2338-2343) because that is the branchvalidate_implementations.pyactually exercises (input.paramsetsoutdirexplicitly, never the date-stamped path).Nothing left ambiguous
Every enumerated citation was resolved to a specific, verified line or range; none needed to be left as a guess.
Test plan
uv run ruff check .uv run ruff format --check .uv run ty check .uv run pytest -m "not slow" -n auto -q(403 passed, 18 skipped, 1 xfailed -- unchanged, confirming this is comment-only)