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
[FEATURE] Add YAML config option to disable progress bars #3794
Changes from 27 commits
cacf5cf
0f8f952
0635ed6
6e1aed0
a303d8a
70a1bbb
2356561
df1fbc4
cdb5544
c064add
c98f6d8
632d7b6
af110ad
4e909c9
e5bd91a
2bd69ce
015a483
9b7e19b
a4a964d
127a7fb
b1bfc90
1ed9d26
e584418
80903e7
8ef6b94
470a5f4
ef7a1a5
ad55c7d
6cae763
7c4961c
fa7fccd
ab27979
58a6b6c
a9006c4
9698c4f
fbedc25
d041120
ea20dcb
e2b82cd
902ca99
38b6abb
d668ac0
a4352f3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -212,6 +212,10 @@ def __dir__(self): | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return list(combined_dir) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
@property | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def data_context(self) -> Optional["DataContext"]: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return self._data_context | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
@property | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def expose_dataframe_methods(self) -> bool: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return self._expose_dataframe_methods | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -689,12 +693,21 @@ def resolve_validation_graph( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
validation_graph=graph, metrics=metrics | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Check to see if the user has disabled progress bars | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
disable = len(graph.edges) < 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How did you arrive at this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was the previous condition as set by Alex! I didn't want to remove old behavior so in the case we've enabled the progress bars, that original conditional still applies |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if self._data_context: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
progress_bars = self._data_context.progress_bars | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if "globally" in progress_bars: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
disable = not progress_bars["globally"] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if "metric_calculations" in progress_bars: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
disable = not progress_bars["metric_calculations"] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
if pbar is None: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# noinspection PyProtectedMember,SpellCheckingInspection | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
pbar = tqdm( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
total=len(ready_metrics) + len(needed_metrics), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
desc="Calculating Metrics", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
disable=len(graph.edges) < 3, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
disable=disable, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
pbar.update(0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
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.
Will this automatically create this field when a new Great Expectations project is initialized? I want to make sure that we make this option available through the Data Context, but also that we don't add a mandatory field to the Data Context, so we don't run into an issue where every new Data Context created won't work with older version of Great Expectations, unless the user specifically wants this feature.
Now that I think about it, I think that the same issue might have happened a couple of times with
concurrency
, and I wonder if we should treat that in the same way.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.
when creating a new DataContext through v3 init, I don't see this field nor concurrency. Let's discuss this live to make sure I'm capturing everything