You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
A lot of our Python operations are lacking sanity checks and produce confusing stacktraces.
For example, all of our Python operations should raise ValueError with a dedicated message if a mandatory value is missing i.e. None has been passed to a non-nullable parameter.
Actual behavior
Unrelated exceptions are raised because within most operation's implementation code, illegal values, often None values are accessed without checking, or they are passed into lower level API where tey produce exceptions out of our control thereby increasing the length of the stacktrace.
This produces very confusing error messages for API/CLI/GUI users.
Implementation hints:
Utilize Like.convert(nullable=True),
in package cate.core.op provide function validate_op_input(op_name, input_name, actual_value) which has access to an input's property passed to @op_input
The selected approach should be documented in the developer guide (#77).
Steps to reproduce the problem
Call e.g. pearson_correlation with any of the mandatory inputs set to None.
Specifications
Cate 0.8.0rc2
The text was updated successfully, but these errors were encountered:
Expected behavior
A lot of our Python operations are lacking sanity checks and produce confusing stacktraces.
For example, all of our Python operations should raise
ValueError
with a dedicated message if a mandatory value is missing i.e.None
has been passed to a non-nullable parameter.Actual behavior
Unrelated exceptions are raised because within most operation's implementation code, illegal values, often
None
values are accessed without checking, or they are passed into lower level API where tey produce exceptions out of our control thereby increasing the length of the stacktrace.This produces very confusing error messages for API/CLI/GUI users.
Implementation hints:
Like.convert(nullable=True)
,cate.core.op
provide functionvalidate_op_input(op_name, input_name, actual_value)
which has access to an input's property passed to@op_input
The selected approach should be documented in the developer guide (#77).
Steps to reproduce the problem
Call e.g.
pearson_correlation
with any of the mandatory inputs set toNone
.Specifications
Cate 0.8.0rc2
The text was updated successfully, but these errors were encountered: