Repository navigation
Case insensitive control prefix - #9
Merged
Merged
Conversation
60_samples_w_controls_initial_pos_non_standard.csv places its samples on a 10-column layout, pairing with the --nonstandard_dims=6,10 example in the README.
A sample file naming controls as control-1, CONTROL-2 and Control-3 classified only the first as a control under --control-prefix control-, so the other two were treated as variable samples and reshuffled on every plate. Matching the prefix case-insensitively classifies all of them, and a fixed map may then name a control in whatever case the file uses. Sample IDs are not rewritten, so comparisons against control_samples elsewhere still match verbatim.
The behaviour was previously only covered through the mapper interface, because test_cli.py did not exist on this branch when the fix was written. Also records the 0.2.0 version in uv.lock, which had not been updated when the version was bumped.
--nonstandard_dims was the only option of twelve using an underscore. Add --nonstandard-dims as the primary spelling and keep the underscore form as an alias, so existing commands and the README examples keep working.
--nonstandard_dims was the only option of twelve using an underscore. Rename it to --nonstandard-dims outright rather than keeping the old spelling as an alias, so the interface carries one spelling. Click names the valid option when the old form is used, and the project is pre-1.0 with a single author, so there is no compatibility to preserve. The Python parameter stays nonstandard_dims per PEP 8. The test now checks the hyphenated flag alone instead of asserting both spellings agree.
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
Makes
--control-prefixcase-insensitive and renames--nonstandard_dimsto--nonstandard-dims, so it matches every other option's hyphenated spelling.Changes
--control-prefix control-,CONTROL-2andControl-3were treated as variable samples and reshuffled onevery plate, with no warning.
load_sample_idsnow matches the prefix ignoringcase. Sample IDs are not rewritten, so a fixed map must still name a control
exactly as it appears in the sample file (
A1:CONTROL-2). Updated the--control-prefixhelp text and README.--nonstandard_dims→--nonstandard-dims. The only one of twelve optionswith an underscore. Renamed outright, no alias. Updated the README examples, the
docstring and the tests. The Python parameter is still
nonstandard_dims(PEP 8).example_files/60_samples_w_controls_initial_pos_non_standard.csv,a 60-sample variant on a 10-column layout. Bumped to 0.2.1 and synced
uv.lock.--nonstandard_dimsno longer works. Scripts using it must switch to--nonstandard-dims; click names the valid spelling in the error:Testing
uv run pytest: 65 passed. New CLI tests cover a mixed-case control in a fixed mapand
--nonstandard-dims 6,10producing a 6×10 plate.ruff,mypy .andprettierare clean.