Closed japilo closed 1 month ago
Thank @japilo! Would you be able to add a unit test to show when this check comes into play? Thank you for your help with the package!
I have added unit tests that demonstrate situations where I faced uninformative error messages previously, and now get informative error messages. I also added tests for the error handling that was already built into the function because I noticed they didn't have test coverage yet.
Brilliant, thank you @japilo!!! (only one minor request, in the future, can you please work off dev
rather than master
?)
I was running into some issues with names of subdatasets for region_series, so I implemented a couple of changes to improve it.
Issue 1: Uninformative error message in
location_slice_from_region_series
I used this function and it threw a very uninformative error message. I tracked down the source of the error, and it was because the SpatRasterDataset I entered for the
region_series
argument did not have proper names for the subdatasets. I have added an informative error message that informs users if the names of region_series are invalid.Issue 2: Uninformative error messages in
slice_region_series
I also got an uninformative error message in the case when the subdatasets of region_series have improper varnames. I have added an informative error message that informs users if the varnames of region_series are invalid.