Skip to content
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

[BUGFIX] Ensure that file-backed domain objects are stored in JSON files #10523

Merged
merged 14 commits into from
Oct 21, 2024
7 changes: 1 addition & 6 deletions great_expectations/data_context/store/expectations_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
DatabaseStoreBackend,
)
from great_expectations.data_context.store.store import Store
from great_expectations.data_context.store.tuple_store_backend import TupleStoreBackend
from great_expectations.data_context.types.refs import GXCloudResourceRef
from great_expectations.data_context.types.resource_identifiers import (
ExpectationSuiteIdentifier,
Expand Down Expand Up @@ -80,11 +79,7 @@ def __init__(
verify_dynamic_loading_support(module_name=store_backend_module_name)
store_backend_class = load_class(store_backend_class_name, store_backend_module_name)

# Store Backend Class was loaded successfully; verify that it is of a correct subclass.
if issubclass(store_backend_class, TupleStoreBackend):
# Provide defaults for this common case
store_backend["filepath_suffix"] = store_backend.get("filepath_suffix", ".json")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate logic now that default is set

elif issubclass(store_backend_class, DatabaseStoreBackend):
if issubclass(store_backend_class, DatabaseStoreBackend):
# Provide defaults for this common case
store_backend["table_name"] = store_backend.get(
"table_name", "ge_expectations_store"
Expand Down
4 changes: 2 additions & 2 deletions great_expectations/data_context/store/tuple_store_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__( # noqa: PLR0913
self,
filepath_template=None,
filepath_prefix=None,
filepath_suffix=None,
filepath_suffix: str | None = None,
forbidden_substrings=None,
platform_specific_separator=True,
fixed_length_key=False,
Expand Down Expand Up @@ -227,7 +227,7 @@ def __init__( # noqa: PLR0913
base_directory,
filepath_template=None,
filepath_prefix=None,
filepath_suffix=None,
filepath_suffix: str | None = ".json",
forbidden_substrings=None,
platform_specific_separator=True,
root_directory=None,
Expand Down
Loading