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

ENH: enable in-memory data to be passed to data source arguments in setup methods #312

Closed
1 of 3 tasks
DirkEilander opened this issue Mar 30, 2023 · 0 comments · Fixed by #313
Closed
1 of 3 tasks
Labels
DataCatalog & DataAdapters issues related to the DataCatalog and DataAdapters Enhancement New feature or request

Comments

@DirkEilander
Copy link
Contributor

Feature Type

  • Adding new functionality to HydroMT

  • Changing existing functionality in HydroMT

  • Removing existing functionality in HydroMT

Enhancement Description

To be able to use the setup methods with data that has been created/modified in memory instead of only file based data.

Feature Description

Currently the *_fn arguments in setup methods require a data catalog source name or a file path which are then parsed by the specific DataAdapter to obtain an uniformized data object (e.g., xarray dataset). By adding the option to pass actual in memory data of the same type as expected we can open up all setup methods for usage with in memory data. This would simply be an addition check at the level where we now distinguish between data catalog source names and file paths.

PS. I know I've been opposed to this idea before, but if we can fix it centrally in the DataAdapter I think there are many benefits which outweigh the ugly multitude of possible data types.

Additional Context

This would largely benefit e.g. HydroMT-SFINCS where the option to pass in-memory data to the setup methods is required. Currently we are solving this with a second create function which raises confusion with users and requires a lot of duplicate docstrings.

@DirkEilander DirkEilander added Enhancement New feature or request DataCatalog & DataAdapters issues related to the DataCatalog and DataAdapters labels Mar 30, 2023
@DirkEilander DirkEilander changed the title ENHANCEMENT: ENH: enable in-memory data to be passed to data source arguments in setup methods Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DataCatalog & DataAdapters issues related to the DataCatalog and DataAdapters Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant