fix: pass custom_checks through to DQEngine.save_checks - #1501
fix: pass custom_checks through to DQEngine.save_checks#1501GewoonMaarten wants to merge 4 commits into
Conversation
|
All commits in PR should be signed ('git commit -S ...'). See https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits |
…tadata when saving checks
446c26c to
3988a92
Compare
| def _resolve_name_and_fingerprint( | ||
| original_check: dict, normalized_check: dict, custom_checks: dict[str, Callable] | None = None | ||
| ) -> tuple[str | None, str]: |
There was a problem hiding this comment.
Let's add a line in the Args section of the docstring for custom_checks
| run_config_name: str = "default", | ||
| rule_set_fingerprint: str | None = None, | ||
| created_at: datetime | None = None, | ||
| custom_checks: dict[str, Callable] | None = None, |
There was a problem hiding this comment.
Need to also add this to the Args section in the docstring.
| custom_check_functions: Optional dictionary with custom check functions (e.g., *globals()* of | ||
| the calling module). |
There was a problem hiding this comment.
I think this should be added to the ChecksStorageHandler.save method instead?
| def save( | ||
| self, | ||
| checks: list[dict], | ||
| config: LakebaseChecksStorageConfig, | ||
| custom_check_functions: dict[str, Callable] | None = None, | ||
| ) -> None: |
There was a problem hiding this comment.
You will need to pass custom_check_functions through a few methods:
_save_checks_to_lakebase -> _normalize_checks
| config: BaseChecksStorageConfig, | ||
| variables: dict[str, VariableValue] | None = None, | ||
| semantic_validation_mode: str | None = ChecksSemanticValidationMode.WARN, | ||
| custom_check_functions: dict[str, Callable] | None = None, |
There was a problem hiding this comment.
Similar to the other methods, this argument needs a line in the method docstring.
| checks: list[dict], | ||
| config: InstallationChecksStorageConfig, | ||
| custom_check_functions: dict[str, Callable] | None = None, | ||
| ) -> None: |
There was a problem hiding this comment.
Need to pass customer_check_functions to handler.save here.
Changes
Linked issues
Resolves #1467
Tests
Documentation and Demos