-
Notifications
You must be signed in to change notification settings - Fork 3
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
✨ Add parameter validation #111
Conversation
Signed-off-by: zethson <[email protected]>
Signed-off-by: zethson <[email protected]>
Signed-off-by: zethson <[email protected]>
Signed-off-by: zethson <[email protected]>
Signed-off-by: zethson <[email protected]>
Signed-off-by: zethson <[email protected]>
Signed-off-by: zethson <[email protected]>
Signed-off-by: zethson <[email protected]>
Signed-off-by: zethson <[email protected]>
@@ -108,6 +108,26 @@ def __init__( | |||
except AttributeError: | |||
pass | |||
|
|||
def _validate_param(self, param_name: str, value: str | None) -> None: |
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.
If this equates type annotation checks, why not used typechecked
or pydantic?
I assume it's because there is more going on.
Small note re naming: param
in lamindb has a special meaning akin to feature
. When we talk about plain Python function args, we say args
aligned with Google-style docstrings.
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 at some point update the "Paramters" header and replace it with "Arguments".
Great PR! Not so important: Why do we use |
Fixes #109
Before:
led to
After: