fix: make the progress flag match its help text - #209
Open
galjos wants to merge 1 commit into
Open
Conversation
The --progress option was registered with store_false, so passing it disabled the progress bar although its help reads "Show progress bar." It now uses BooleanOptionalAction: --progress shows the bar, --no-progress hides it, and the default stays enabled. The RDF module also copied config.with_progress_bar into its namespace at import time, before the CLI parses arguments, so the flag never reached the two tqdm loops in the analysis. It now reads the config attribute at call time like msd, vacf and momentum do.
Contributor
|
PYLINT REPORT Your code has been rated at 9.78/10 Full reportRaw metrics
Duplication
Messages by category
% errors / warnings by module
Messages
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #209 +/- ##
=======================================
Coverage 93.94% 93.94%
=======================================
Files 177 177
Lines 9227 9227
=======================================
Hits 8668 8668
Misses 559 559
🚀 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.
--progressusedstore_false, so passing the flag hid the bar its help text promises to show; and the RDF module importedwith_progress_barby value at import time, so the setting never reached its tqdm calls. The parser now usesBooleanOptionalAction(default on,--no-progressto disable), and the RDF readsconfig.with_progress_barat call time, as the MSD already does.Tests pin the three flag states end to end and the call-time binding at both tqdm sites.
Fixes #208.