-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[MAINTENANCE] Ensure that id_
fields in Marshmallow schema serialize as id
#5660
[MAINTENANCE] Ensure that id_
fields in Marshmallow schema serialize as id
#5660
Conversation
✅ Deploy Preview for niobium-lead-7998 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
👇 Click on the image for a new way to code review
Legend |
…_expectations into maintenance/rename-id_-to-id-when-serializing-objs
id_
fields in Marshmallow schema serialize as id
@@ -2239,8 +2240,27 @@ class CheckpointValidationConfigSchema(Schema): | |||
class Meta: | |||
unknown = INCLUDE | |||
|
|||
name = fields.String(required=False, allow_none=False) |
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.
Should have been removed in a prior PR but forgot to.
cls_or_instance=fields.Nested(CheckpointValidationConfigSchema), | ||
required=False, | ||
allow_none=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.
Never converted this over to the typed obj - thanks @Kilo59!
id_ = fields.String(required=False, allow_none=False) | ||
id_ = fields.String(required=False, allow_none=False, data_key="id") | ||
|
||
def dump(self, obj: dict, *, many: Optional[bool] = None) -> dict: |
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.
Do we have an explicit list of what can go in validations nested within checkpoints? If so, we can get rid of this. As this has historically been a dictionary, I wanted to guard against edge cases and make this as forgiving of unknown values as possible.
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.
I did not find a list in a quick search, but what about using all of the keys in validations from https://docs.greatexpectations.io/docs/guides/validation/checkpoints/how_to_configure_a_new_checkpoint_using_test_yaml_config and https://docs.greatexpectations.io/docs/guides/validation/checkpoints/how_to_add_validations_data_or_suites_to_a_checkpoint as a starting point?
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.
Also take a look at get_substituted_validation_dict().
Maybe best to create the list but also leave it open until we can make sure we have them all.
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.
LGTM
…ttps://github.com/great-expectations/great_expectations into maintenance/rename-id_-to-id-when-serializing-objs
…_expectations into maintenance/rename-id_-to-id-when-serializing-objs
…ttps://github.com/great-expectations/great_expectations into maintenance/rename-id_-to-id-when-serializing-objs
…etric-change * develop: (30 commits) Add mysql client to Dockerfile.tests (#5681) [DOCS]added guide how to use great expectations with aws glue (#5536) [MAINTENANCE] Assign `resource_type` in `InlineStoreBackend` constructor (#5671) [RELEASE] 0.15.17 (#5675) fix: patch issue with 'id' vs 'id_' (#5677) Tidying up the texts and config in gen; bump ops (#5678) [MAINTENANCE] data_context initial type checking (#5662) [FEATURE]Enable showing expectation suite by domain and by expectation_type -- from DataAssistantResult (#5673) [MAINTENANCE] Ensure that `id_` fields in Marshmallow schema serialize as `id` (#5660) [MAINTENANCE] Improve DateTime Conversion Candling in Comparison Metrics & Expectations and Provide a Clean Object Model for Metrics Computation Bundling (#5656) [MAINTENANCE] Only run Cloud E2E tests in primary pipeline Refactor docker test CI steps into jobs. (#5665) [MAINTENANCE] move tool config to pyproject.toml (#5649) add expectation for crc32 (#5580) Quick bug fix to all profile numeric column bounds expectations (#5651) Don't include 'test-pipeline' in extras_require dict (#5659) [ANALYTICS] add new invoke tasks to `tasks.py` and create new file `usage_stats_utils.py` (#5593) [MAINTENANCE] Introduce running tests in docker on our Azure CI pipeline. (#5646) [MAINTENANCE] Add E2E Cloud test for `DataContext.add_checkpoint()` (#5653) Make comparisons of aggregate values date aware (#5642) ...
Changes proposed in this pull request:
id_
in our Marshmallow schema properly serialize asid
Definition of Done
Please delete options that are not relevant.