Skip to content

Conversation

@ross-whatnot
Copy link
Contributor

As discussed in this issue, adding exposures as a type of evaluable. I believe I've got it plugged into all the right places - tests pass, and I can run rules locally along the lines of the below made-up example:

@rule(severity=Severity.CRITICAL)
def exposures_must_have_owner(exposure: Exposure) -> RuleViolation | None:
    """Exposures may not be owned by Data Team"""
    if exposure.owner["name"] == "Data Team":
        return RuleViolation(
            message=f"Exposure {exposure.name} may not have an owner {exposure.owner['name']}"
        )
    return None

Let me know if I've missed anywhere obvious?

@ross-whatnot ross-whatnot marked this pull request as ready for review April 30, 2025 20:11
@jochemvandooren jochemvandooren self-requested a review May 1, 2025 12:16
Copy link
Contributor

@jochemvandooren jochemvandooren left a comment

Choose a reason for hiding this comment

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

Sorry for the wait, but looks good! Thanks a lot! 🙌

@jochemvandooren jochemvandooren linked an issue May 21, 2025 that may be closed by this pull request
@jochemvandooren jochemvandooren enabled auto-merge (squash) May 26, 2025 10:27
@jochemvandooren jochemvandooren merged commit fde03ee into PicnicSupermarket:master May 26, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Exposures and children

3 participants