hatch icon indicating copy to clipboard operation
hatch copied to clipboard

enable `version` plugins to extend `hatch version` cli args

Open harelwa opened this issue 1 year ago • 0 comments

Hi,

I have implemented a hatch version plugin ( something similar to python-semantic-release )

I would like to have some of it's functionality controlled via cli ( e.g. "--commit" or "--push" etc. )

.. These are related to a dynamic behavior and thus not suitable for plugin configuration ("static")

.. I would generally want to avoid workarounds like using environment variables instead.

Currently the implementation in src/hatch/cli/version/__init__.py does not allow that.

For a publisher plugin this is possible via --option, which i use. It's also not ideal, but it solved my problem for the publisher plugin.

So, I wonder what do you think ? I do understand and appreciate the will to keep it so clean as it is. but it's limiting.

If a good "clicki design pattern" can be achieved perhaps it will also be used else where.

I might be able to take part in contributing such a functionality if we come up with such a design.

Many thanks,

Harel

harelwa avatar Nov 17 '23 14:11 harelwa