c4urself / bump2version

Version-bump your software with a single command
https://pypi.python.org/pypi/bump2version
MIT License
1.05k stars 134 forks source link

Exposing _load_configuration for integrators #222

Open kmfarley11 opened 3 years ago

kmfarley11 commented 3 years ago

I am writing a utility that checks source-coded versions to verify that they are updated from a base branch.

The idea is to source a single .bumpversion.cfg etc. and facilitate version checking and bumping simultaneously for a git repo. cli._load_configuration(mycfg, {}. {}) would facilitate this greatly.

I am curious if there is a particular reason why that method is "protected" I would like to use it but am hesitant as it seems to be deeply built into the cli. Should I avoid using that method for any particular reason?

As hinted earlier the use case is to obtain parsing and file information to conveniently grab versions listed by the cfg.

florisla commented 3 years ago

This is an internal method; the only public API we have is the command-line interface.

We don't have enough maintainer-hours to also support an internal method.

That said, we could try to increment the version number whenever this method's behaviour changes.

So you can use this method, and pin the version of the bump2version package to 2.x.

kmfarley11 commented 3 years ago

Got it, no problem. Thanks for the response!

No promises, but if I were to take a stab at exposing a small, public, python api. Would you folks entertain a PR? I know the contribution guidelines are mostly with regards to patches. But such a task might involve a mild refactor.