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
Two problems linked to the default arguments of our functions:
It's a bit un-intuitive that some operations would be inplace (crop) and others not (reproject).
We should probably do the same done by NumPy, Xarray and Pandas: never do inplace, and leave to the user to do it themselves by doing:
raster=raster.crop(mycropgeom)
If they want to.
Arguments that do the same thing have different names in different functions.
For instance the "match-reference" argument: dst_ref, ref, etc... Same for many other arguments of functions of Raster and Vector (dst_shape, size, rst_shape, etc).
The sooner we homogenize the API, the better, otherwise it will be a hard change for users or would have to stay inconsistent for a long time! And doing it before mirroring the API in the Xarray accessor #383 would be great! 😃
So, I think is a top priority we should take care off soon! Was already listed but also a bit lost in the long list here: #361.
Maybe we should start a Google Docs to converge towards the arguments names that are the most intuitive to use everywhere?
What do you think @adehecq@atedstone@erikmannerfelt?
The text was updated successfully, but these errors were encountered:
Overall I agree with both suggestions.
We can put this in a Google Doc, but ultimately we should maybe summarize this in a Wiki page, so we remember what was decided?
I also agree with both suggestions. I would prefer a wiki page over a Google Doc, but we can also simply add these information to CONTRIBUTING.md so that everything important about development is in one place?
Two problems linked to the default arguments of our functions:
crop
) and others not (reproject
).We should probably do the same done by NumPy, Xarray and Pandas: never do inplace, and leave to the user to do it themselves by doing:
If they want to.
For instance the "match-reference" argument:
dst_ref
,ref
, etc... Same for many other arguments of functions ofRaster
andVector
(dst_shape
,size
,rst_shape
, etc).The sooner we homogenize the API, the better, otherwise it will be a hard change for users or would have to stay inconsistent for a long time! And doing it before mirroring the API in the Xarray accessor #383 would be great! 😃
So, I think is a top priority we should take care off soon! Was already listed but also a bit lost in the long list here: #361.
Maybe we should start a Google Docs to converge towards the arguments names that are the most intuitive to use everywhere?
What do you think @adehecq @atedstone @erikmannerfelt?
The text was updated successfully, but these errors were encountered: