Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename the generic setup method to distinguish better between the setup_schematisation and add data methods #475

Closed
hboisgon opened this issue Aug 9, 2023 · 5 comments
Labels
Enhancement New feature or request Model issues related to the Model class and its subclasses Spillover Issues that were planned but not completed last quarter V1
Milestone

Comments

@hboisgon
Copy link
Contributor

hboisgon commented Aug 9, 2023

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

@hboisgon hboisgon added Enhancement New feature or request Model issues related to the Model class and its subclasses Needs refinement issue still needs refinement labels Aug 9, 2023
@hboisgon hboisgon added this to the Q3 milestone Aug 9, 2023
@alimeshgi alimeshgi removed the Needs refinement issue still needs refinement label Aug 24, 2023
hboisgon added a commit that referenced this issue Sep 29, 2023
@hboisgon hboisgon mentioned this issue Sep 29, 2023
5 tasks
hboisgon added a commit that referenced this issue Sep 29, 2023
@hboisgon
Copy link
Contributor Author

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.

@savente93
Copy link
Contributor

As it seems that this will take a bit longer, should we move this to Q4 then?

@savente93 savente93 added the Blocked An issue that cannot be progressed right now label Oct 5, 2023
@savente93 savente93 modified the milestones: Q3, Q4 Oct 9, 2023
@savente93 savente93 removed the Blocked An issue that cannot be progressed right now label Oct 19, 2023
@DirkEilander
Copy link
Contributor

More context

  • all methods that add information to a Model currently start with setup_, e.g. setup_grid creates the model grid and setup_grid_from_raster adds 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_mesh and setup_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

@xldeltares
Copy link
Contributor

xldeltares commented Oct 20, 2023

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.

@savente93 savente93 added the Spillover Issues that were planned but not completed last quarter label Jan 8, 2024
@savente93 savente93 modified the milestones: 2023 - Q4, 2024 - Q1, v1.0 Jan 8, 2024
@savente93 savente93 added the V1 label Jan 11, 2024
@savente93
Copy link
Contributor

Fixed in #671

@savente93 savente93 removed this from the v1.0 milestone May 28, 2024
@savente93 savente93 added this to the v1.0 alpha milestone May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Model issues related to the Model class and its subclasses Spillover Issues that were planned but not completed last quarter V1
Projects
None yet
Development

No branches or pull requests

5 participants