xarray-contrib/xarray-schema

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

orianac opened this issue · 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

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.