Close #66: pipeline hygiene - local import, duplicated constant, toggle validation, set rebuild hoist - #160
Merged
Merged
Conversation
…le validation, set rebuild hoist
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.
What changed
Four pipeline-hygiene cleanups: moved local
import mathto module top, definedWRAPPABLE_INDENT_UNITSin a single literal, added__post_init__validation onFormatToggles.{font_size,line_spacing}, and hoisted the per-iterationused_hexes.upper()set rebuild inassign_colors.Files
vo_format/cold_read.py— hoistimport mathto module-level importsvo_format/models.py— single-definitionWRAPPABLE_INDENT_UNITS;FormatToggles.__post_init__validationvo_format/colors.py— maintainused_hexes_upperalongsideused_hexestests/test_toggles.py— 8 new tests for__post_init__validationAssumptions made
line_spacingargparse incli.pyhas no explicitchoices=constraint; used> 0as the minimum sense check for a multiplier value.font_sizeaccepted values are{12, 14, 16, 18}percli.py'schoices=list.Uncertainties
none
Test
./.venv/Scripts/python.exe -m pytest tests/ -q— 437 passed, 2 skippedCloses #66