xarray-schema icon indicating copy to clipboard operation
xarray-schema copied to clipboard

To return or not to return Dataset/DataArray during `validate`

Open orianac opened this issue 4 years ago • 1 comments

Before the major reorg validate returned a DataArray or Dataset but now it doesn't. Was that intentional @jhamman ? Or should we add back in the return? I personally like the idea of not returning it - I think it makes the focus on whether or not it raises the error compared to passing around the object with unnecessary variable assignments - but want to make sure it's intentional before we update codebases elsewhere. @norlandrhagen

orianac avatar Dec 02 '21 22:12 orianac

Yes, this was intentional. Pandera includes a bunch of options for coercing data into compliance with the schema but I think that should be out of scope here (at least for now). So during the refactor, I opted to forgo the return during validate in hopes of clarifying the intention of the validate method.

jhamman avatar Dec 02 '21 23:12 jhamman