Deltares / hydromt

HydroMT: Automated and reproducible model building and analysis
https://deltares.github.io/hydromt/
MIT License
68 stars 28 forks source link

Add ability for plugins to add custom cli commands #846

Open savente93 opened 6 months ago

savente93 commented 6 months ago

Kind of request

None

Enhancement Description

Currently core exposes a clip cli command that is only available for Wflow. Specialised behaviour like this should be kept out of core wherever possible, so to this end it would be best to allow plugins to implement their own cli commands.

Use case

No response

Additional Context

implementation could be, but is not required, through click-plugins

DirkEilander commented 6 months ago

Interesting idea, but not urgent I think. Click already has a method how to do this available, see https://github.com/click-contrib/click-plugins A nice example is the rio CLI by rasterio: https://github.com/rasterio/rasterio/wiki/Rio-plugin-registry

Clip could also be implemented generically by adding a clip method to all components. Also not very urgent.