-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Allow to manage project version with git tags #1034
Conversation
Still work in progress. But I want to discuss with you about the best design choices for this feature. We can retrieve version from git by selecting the most highest tag (this the current design), or we can decide to retrieve the latest created tag. I guess the highest version is the most common use case and in any way we can continue to retrieve the version number from Do you have any opinions about this? Thoughts? |
To avoid to manage textual version of a project allow poetry to retrieve those informations directly from git tags. To determine the current version number we currently retrieve the highest available tag number. If the version is not available in the pyproject.toml then poetry try to retrieve version from git so project can continue to manage these informations manually. If the version is not available in the pyproject.toml and if it's not a git repository then an exception is raised and we retrieve the previous behavior of poetry.
There has already been some discussion on this topic, see:
Afaict this PR probably won't be merged as the maintainer prefers to use a plugin system for this: #672 (comment) |
@techdragon not sure to see where my changes can help to solve your problem... Of course in a second time my features can by reuse to implement new poetry features around projects informations harvesting or whatever you want but in the current state they don't do. |
This should be done via plugins to have it done in a generic way. |
Given the number of poetry PRs and discussions on this topic who suggest to use plugins it's no use that I continue to keep this one opened. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
To avoid to manage textual version of a project allow poetry
to retrieve those informations directly from git tags.
To determine the current version number we currently retrieve
the highest available tag number.
If the version is not available in the pyproject.toml then
poetry try to retrieve version from git so project can continue
to manage these informations manually.
If the version is not available in the pyproject.toml and if
it's not a git repository then an exception is raised and we
retrieve the previous behavior of poetry.
Pull Request Check List
This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once, it will save you unnecessary review cycles!
Note: If your Pull Request introduces a new feature or changes the current behavior, it should be based
on the
develop
branch. If it's a bug fix or only a documentation update, it should be based on themaster
branch.If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!