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
resample_method_list in align_and_resize_raster_stack
raster_driver_creation_tuple in a number of functions
I don't remember why, exactly, we choose to denote type this way and not to use type hints, but type hints these days are pretty well-supported and a descriptive way for us to render the input types in places like the API docs.
If we do this, we should be careful about the update, since this will change a large number of parameter names throughout the package and break everything that calls it in the process.
So the proposal here is to do a major API change sometime in the future (pygeoprocessing 3.0 or 4.0) so that
We talked about this on the team call this morning and agreed that while a design doc is not necessary, it would be helpful to have a shared doc to review the changes and discuss. Many parameter names that could benefit from the change are shared across functions, so this would be a consolidated list.
We also talked about how this would make sense to go in a major pygeoprocessing release, perhaps along with a few other things like supporting URLs and formally handling the forthcoming GDAL 4.0 change where exceptions are enabled by default. Changes like these may end up on a roadmap of some kind through github projects.
phargogh
changed the title
Proposal: redesign API to replace ad-hoc type hints in param names with actual type hints
Redesign API to replace ad-hoc type hints in param names with actual type hints
Jun 1, 2023
We have a variety of parameters throughout pygeoprocessing where the parameter name includes the type of the parameter. Examples include:
base_raster_path_band_const_list
inraster_calculator
base_raster_path_list
inalign_and_resize_raster_stack
resample_method_list
inalign_and_resize_raster_stack
raster_driver_creation_tuple
in a number of functionsI don't remember why, exactly, we choose to denote type this way and not to use type hints, but type hints these days are pretty well-supported and a descriptive way for us to render the input types in places like the API docs.
If we do this, we should be careful about the update, since this will change a large number of parameter names throughout the package and break everything that calls it in the process.
So the proposal here is to do a major API change sometime in the future (pygeoprocessing 3.0 or 4.0) so that
resample_method_list
becomesresample_methods
base_raster_path_band_const_list
becomes something simpler, maybeinputs
?A trimmed down version of this that wouldn't break compatibility would simply be to add type hints everywhere, which itself would be a nice addition.
The text was updated successfully, but these errors were encountered: