python-pachyderm icon indicating copy to clipboard operation
python-pachyderm copied to clipboard

Add type checking and raise meaningful exceptions

Open albscui opened this issue 4 years ago • 0 comments

Some of our client methods accept various types for inputs, for example in get_file(commit, path, URL), the commit can be a tuple, string, or Commit object. While we do some type checking with https://github.com/pachyderm/python-pachyderm/blob/8b5027dd2fd8a2a0c1b68a6ab0179a9c1d40a679/src/python_pachyderm/mixin/util.py#L4, but this might break for users that specified an invalid string, or a string that got the order of repo and commit wrong.

In general, we want to add type checking where possible, and raise meaningful exceptions when inputs are not valid.

albscui avatar May 19 '21 22:05 albscui