Rename the generic setup method to distinguish better between the setup_schematisation and add data methods
Kind of request
Changing existing functionality
Enhancement Description
So far it's not too clear if the generic setup methods create a grid/mesh schematisation or add data to it. We kind of have a convention than method name starts with setup_ so renaming would be for example setup_grid_data_from_geodataframe instead of setup_grid_from_geodataframe.
Use case
No response
Additional Context
No response
In #534 the changes were first implemented by maybe the names should be discussed with users before changing for good to find which names would be more explicit.
As it seems that this will take a bit longer, should we move this to Q4 then?
More context
- all methods that add information to a Model currently start with
setup_, e.g.setup_gridcreates the model grid andsetup_grid_from_rasteradds a new data layer by interpolating a raster file to the grid - Similar methods exist (or will be developed) for mesh, vector, geoms and maps, e.g.,
setup_meshandsetup_mesh_from_raster. Hence the name of the target model component should be in the function name. - naming of these methods is important as these are used in the build/update config yaml files
- We think "setup_grid_from_raster" might be confusing since its not clear from the name if the grid is created or data is added to the grid. The latter is the case.
- Would "setup_grid_data_from_raster" solve this? Or should we abandon the "setup" convention and use e.g., "add_grid_data_from_raster" or "add_raster_data_to_grid"?
I'd be happy to hear the opinion of some users: @hboisgon @roeldegoede @JoostBuitink @xldeltares
Hi @DirkEilander , thanks for asking and I recognize the necessity for the method names to be self-explanatory to reduce confusion for users and developers. Here is my 2 cents: I would recommend using "add" to replace the current "setup" for the methods that does not create the model topology (specially referring to mesh, grid etc). I prefer "add_raster_data_to_grid" that emphasis the data is being added from raster to grid, something even more explicit like "add_data_to_grid_from_raster" might also work.
Fixed in #671