radeklat / delfino

A toolbox of command line helper script, wrapping tools used during Python development.
MIT License
12 stars 3 forks source link

[Suggestion] An alternative approach to modularity #20

Open jacksmith15 opened 2 years ago

jacksmith15 commented 2 years ago

Currently, delfino has all commands enabled by default, and dependency mismatches are only raised when running a particular command.

Given that the user installs delfino with reference to the commands they would like enabled, e.g.

pip install delfino[typecheck,lint,test]

It might be a more intuitive interface to automatically enable/disable commands based on the available dependencies, unless overriden via configuration. This way the user can specify the commands they want in their dependency list without having to also specify in the tooling configuration.

Extension 1

Following on from this, it would be more straightforward to tailor delfino if group tasks such as verify-all had the following behaviours:

a) don't run commands which are otherwise disabled b) run commands by name rather than Python reference. This allows the user to e.g. override the lint-pylint command in their local commands/ directory without having to also override the lint and verify-all commands.

Extension 2

I'm not 100% what the interface for this might look like, but it could be nice to be able to add new commands which get automatically grouped under existing categories.

For example, the user could specify a new command lint-pyflakes without having to overwrite the lint command.