Skip to content

Commit

Permalink
fix: 1540 add_expectation_suite doesn't have key overwrite_existing (#…
Browse files Browse the repository at this point in the history
…1541)

* fix:1540 add_expectation_suite doesn't have key overwrite_existing

* Update test_ge_integration.py

remove 'overwrite_existing=True'

---------

Co-authored-by: Alex Barros <[email protected]>
Co-authored-by: Fabiana <[email protected]>
  • Loading branch information
3 people authored May 31, 2024
1 parent 707bf71 commit 159fe0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/ydata_profiling/expectations_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ def to_expectation_suite(
if not data_context:
data_context = ge.data_context.DataContext()

suite = data_context.add_expectation_suite(suite_name, overwrite_existing=True)
suite = data_context.add_expectation_suite(
suite_name
)

# Instantiate an in-memory pandas dataset
batch = ge.dataset.PandasDataset(self.df, expectation_suite=suite)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_ge_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def test_to_expectations_suite_title(context, df):
)

context.add_expectation_suite.assert_called_once_with(
"expectations-dataset", overwrite_existing=True
"expectations-dataset"
)


Expand Down

0 comments on commit 159fe0d

Please sign in to comment.