-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable progress bar while linting with --hide-progress
#1769
Conversation
harmonize with `no_progress` attribute for `setup_local_repo()`
Codecov Report
@@ Coverage Diff @@
## dev #1769 +/- ##
==========================================
+ Coverage 69.22% 69.28% +0.06%
==========================================
Files 59 59
Lines 7142 7147 +5
==========================================
+ Hits 4944 4952 +8
+ Misses 2198 2195 -3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
…u/tools into disable-lint-progress-bar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
What do you think about putting this at the top level instead, alongside --verbose
etc? As it is (a) uncommon to use and (b) used by many commands.
Also, it would be nice to be able to set these with environment variables (much cleaner for this use case for example). Can do that for all options with auto_envvar_prefix
, or just this one with envvar
. See click docs
Okay, I don't know how to nicely pass the option from the main command to the subcommands, so it is still on an individual command level. There is also no global option for rich to disable progress bars, but only on an per instance basis, therefore I think this approach makes it a bit more future proof. |
485c2ab
to
e30ebb4
Compare
You use click "context" for this, see the click docs. But if we already have it working then it's not a particularly high priority (especially when it's not used on all commands). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy with this, thanks! 🙌🏻
NFCORE_LINT_HIDE_PROGRESS: true | ||
NFCORE_MODULES_LINT_HIDE_PROGRESS: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hah, hadn't thought about this - that the env var would be different for different commands.
Ok so then this would be a vote for using an explicit env="HIDE_PROGRESS"
on the commands so that we could have one env var that covers the entire tool (or using it on root in one place).
Again low priority. Basically this current setup is fine, might be nice to refactor one day (especially if we add more progress bars) but no needed.
No description provided.