-
Notifications
You must be signed in to change notification settings - Fork 45
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
Doc: Clear petab notebook output #1271
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## develop #1271 +/- ##
===========================================
+ Coverage 84.66% 84.68% +0.02%
===========================================
Files 148 148
Lines 12122 12122
===========================================
+ Hits 10263 10266 +3
+ Misses 1859 1856 -3 ☔ View full report in Codecov by Sentry. |
tqdm progress bars are used in a couple of places. They don't play so well in non-interactive jobs, testing, ... . They also cause trouble with nbspinx (ICB-DCM#1246, ICB-DCM#1271). Progress bars can be disabled for specific tasks, but not globally (or at least not very conveniently). Since recently, tqdm can be controlled via environment variables (e.g., disabling all progress bars or changing update frequency). However, this works by changing the argument defaults, so it only works if we don't pass explicit `disable=...`. Therefore, this PR introduces some wrapper that checks whether the user explicitly enabled/disabled progress bars. If not, we go with the tqdm default, which means showing all progress bars unless globally disabled. An additional `enabled` argument is added for convenience.
tqdm progress bars are used in a couple of places. They don't play so well in non-interactive jobs, testing, ... . They also cause trouble with nbspinx (#1246, #1271). Progress bars can be disabled for specific tasks, but not globally (or at least not very conveniently). Since recently, tqdm can be controlled via environment variables (e.g., disabling all progress bars or changing update frequency). However, this works by changing the argument defaults, so it only works if we don't pass explicit `disable=...`. Therefore, this PR introduces some wrapper that checks whether the user explicitly enabled/disabled progress bars. If not, we go with the tqdm default, which means showing all progress bars unless globally disabled. An additional `enabled` argument is added for convenience. --------- Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>
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.
Looks good!
A subset of ICB-DCM#1246. Co-authored-by: Doresic <domagoj.doresic@gmail.com>
A subset of #1246.
👁️ https://pypesto--1271.org.readthedocs.build/en/1271/example/petab_import.html