soldni / springs

A set of utilities to turn Dataclasses into useful configuration managers.
https://springs.soldaini.net
MIT License
11 stars 2 forks source link

Integration with existing click CLIs #11

Open bilelomrani1 opened 1 year ago

bilelomrani1 commented 1 year ago

Hi, first of all, thank you this project looks really interesting. I've always struggled with Hydra as I find it a bit too intrusive to my taste, and difficult to integrate to an existing code base. I rather prefer your API's philosophy for my configuration.

There is however an issue that prevents me from using this library in an already existing project: I cannot see a way to integrate the CLI generated by sp.cli in my existing CLI. I already have a click CLI and in the current design, sp.cli generates a standalone CLI that cannot be integrated to an existing CLI.

click allows to arbitrarily nest various command line utilities so it would be very nice if springs was able to be nested in an existing CLI.

soldni commented 1 year ago

Hi @bilelomrani1 ,

I have a work-in-progress PR at #12 . It does require a bit of re-factoring, but it should be possible to support click.