monim67 / poetry-bumpversion

Poetry plugin to update __version__ in __init__ file and other files containing version strings
https://pypi.org/project/poetry-bumpversion/
MIT License
80 stars 3 forks source link

How to add poetry-bumpversion dependency to pytproject.toml? #6

Open alanwilter opened 1 year ago

alanwilter commented 1 year ago

Great stuff!

Since my projects will now depend on this plugin, how to add it to my pyproject.toml so I'm sure it will be there when I needed after doing poetry install?

monim67 commented 1 year ago

Unfortunately poetry doesn't load plugins installed as project dependency. You have to add plugin to your system poetry installation itself with poetry self add poetry-bumpversion command.

Then it will be available to all projects in your computer.

rowanseymour commented 1 year ago

It definitely feels weird that I can have [tool.poetry_bumpversion.file."foo/__init__.py"] in my pyproject.toml, but if I don't have bumpversion installed, it's silently ignored. Ideally pyproject.toml ensures that building is consistent regardless of who is doing it. I would expect poetry to let me define a list of required plugin versions.

monim67 commented 1 year ago

It definitely feels weird that I can have [tool.poetry_bumpversion.file."foo/__init__.py"] in my pyproject.toml, but if I don't have bumpversion installed, it's silently ignored. Ideally pyproject.toml ensures that building is consistent regardless of who is doing it. I would expect poetry to let me define a list of required plugin versions.

Totally agree with you. That would be a great feature for plugins.

rowanseymour commented 1 year ago

Ok well let's see what they say https://github.com/python-poetry/poetry/issues/7657