Skip to content
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

Update version strings in project files. (#144) #1354

Closed
wants to merge 1 commit into from

Conversation

JnyJny
Copy link
Contributor

@JnyJny JnyJny commented Sep 5, 2019

#144

Added a dry-run option to version command and logic to
replace current version strings with next version in:

  • pyproject.toml
  • python source ( assignments & comparisons )
  • markdown | restructured text | plain text

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!

  • Added tests for changed code.
  • Updated documentation for changed code.

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 the master branch.

Added a dry-run option to version command and logic to
replace current version strings with next version in:
- pyproject.toml
- python source ( assignments & comparisons )
- markdown | restructured text | plain text
@JnyJny
Copy link
Contributor Author

JnyJny commented Sep 5, 2019

I took a stab at writing tests for this new feature, but ran into trouble due to lack of familiarity with how to use/extend the fixtures already provided. I'll keep working the problem.

@tarkatronic
Copy link
Contributor

This is an interesting approach, but I could see a lot of potential for false positives, in places like a changelog, or even list of requirements. What if you require a specific version of a package, which matches the version of your local package?

I think a better approach might be explicit configuration of the locations of the version, such as how bumpversion works. The alternative would be expecting the user to perform a dry run before every version bump, which as a user, is simply not going to happen.

@JnyJny
Copy link
Contributor Author

JnyJny commented Sep 6, 2019

This is an interesting approach, but I could see a lot of potential for false positives, in places like a changelog, or even list of requirements. What if you require a specific version of a package, which matches the version of your local package?

Excellent point that I had not considered.

I think a better approach might be explicit configuration of the locations of the version, such as how bumpversion works. The alternative would be expecting the user to perform a dry run before every version bump, which as a user, is simply not going to happen.

Excellent feedback, thank you. I'm not sure how opinionated poetry wants to be about how a package is structured so my goal was to avoid specifying where version data should go.

@funkyfuture
Copy link
Contributor

i think this functionality is out of poetry's scope. but it might be fitting a coming plugin ecosystem.

@JnyJny
Copy link
Contributor Author

JnyJny commented Sep 16, 2019

@funkyfuture I disagree, poetry already changes the project version number in pyproject.toml, it's a small step forward to take the burden off the developer and change it in the shipping (code/docs) part of the project.

@sdispater
Copy link
Member

Thanks for you contribution!

However, this is beyond the intended purpose of version which is to update the version in the pyproject.toml which is the only file under the control of Poetry.

I am closing this but that's a feature that can be implemented as a plugin when they are supported.

Copy link

github-actions bot commented Mar 1, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants