Repository navigation
Keep every method of randomized_tukey_hsd in one file - #52
Merged
Merged
Conversation
…hods The four methods of randomized_tukey_hsd were split over two files: the two matrix methods in src/RandomizedTukeyHSD.jl and the two table methods, with their own docstring, in src/tables.jl. There was no technical reason for it. It came from caution about growing the main file, which had been called off limits, and a habit of one new file per new concern. A reader who looks for the function found half of it, and its documentation was in two places. This commit moves the table methods and their docstring, unchanged, into src/RandomizedTukeyHSD.jl right after the matrix methods and before the algorithm they call (_pairs, _trials!, _randomized_tukey_hsd). The helpers _table_scores and _wide_table stay in src/tables.jl for now; the next commit moves them to src/input.jl with the other conversion helpers and removes tables.jl. A pure move: no code or text changes. The tests are unchanged and pass, and benchmark/snapshot.jl output is byte-identical. Refs #51 Part of #38 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Completes the consolidation started in the previous commit. _table_scores and _wide_table turn a Tables.jl table into a matrix and the treatment names, which is the same job as scores_matrix and wide_scores, so they now live with them in src/input.jl: that file holds the conversion helpers and nothing else, and src/RandomizedTukeyHSD.jl holds the API and the algorithm. src/tables.jl is deleted, and the include of it is removed. The one text change in the move: a comment above _table_scores said "the docstring of the method above", which no longer describes where the docstring is; it now says the docstring of randomized_tukey_hsd for tables. Nothing else is edited. Checked: the test suite passes with the same count as before the two commits (136 plus the 1 deliberately broken), and benchmark/snapshot.jl output is byte-identical to the output before the first commit. Refs #51 Part of #38 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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 #51. Part of #38.
What this does
Keeps every method of
randomized_tukey_hsdin one file. Before, the two matrix methods were insrc/RandomizedTukeyHSD.jland the two table methods (with their docstring) insrc/tables.jl, for no technical reason: it came from caution about growing the main file and a habit of one new file per new concern. Now:src/RandomizedTukeyHSD.jl: the API and the algorithm. All four methods and their docstrings, in order matrix, table, then_pairs,_trials!and_randomized_tukey_hsd.src/input.jl: the conversion helpers only:scores_matrix,wide_scores,_table_scores,_wide_table.src/tables.jl: deleted, and so is itsinclude.A pure move
No code changes. One comment changed: the one above
_table_scoressaid "the docstring of the method above", which stopped being true; it now says "the docstring ofrandomized_tukey_hsdfor tables". Nothing else is edited.Commits
Move the table methods of randomized_tukey_hsd next to the matrix methods(the two methods and their docstring, out oftables.jl)Move the table helpers into input.jl and remove tables.jlEach commit leaves the suite passing, so the move can be reviewed one half at a time.
Verification
] test: 136 pass + 1 deliberately broken, after each commit and at the end (same as on master).benchmark/snapshot.jloutput is byte-identical to master's, checked after the first commit and after the second.🤖 Generated with Claude Code