nedbat / scriv

Changelog management tool
https://scriv.readthedocs.io
Apache License 2.0
256 stars 28 forks source link

Support finding version info in TOML files (#44) #45

Closed kurtmckee closed 2 years ago

kurtmckee commented 2 years ago

This patch adds support for extracting version information from TOML files. For example, projects using Poetry can specify the following version literal in their pyproject.toml file:

[tool.scriv]
version = "literal: pyproject.toml: tool.poetry.version"

# PEP 621 example:
# version = "literal: pyproject.toml: project.version"

Then project metadata can be managed using Poetry and doesn't have to be extracted and passed to scriv separately:

poetry version minor
scriv collect

Changelog

Added

kurtmckee commented 2 years ago

@nedbat It looks like PyPy 3.6 is not available on Mac OS in the CI anymore. All other tests pass.

kurtmckee commented 2 years ago

Hi @nedbat! I hope you're doing well. Is there anything I need to do to improve this PR?

nedbat commented 2 years ago

@kurtmckee sorry for the lag, yes, this looks good to go, though we clearly disagree about the way to import product code into test files :)

nedbat commented 2 years ago

I see why you changed the import :)

kurtmckee commented 2 years ago

Ned, thanks for merging this!

nedbat commented 2 years ago

This is released as 0.13.0

kurtmckee commented 2 years ago

Fantastic. Thank you!