ENH: Added notes command for spin#25017
Conversation
notes command for spin
|
Ah ok, I can change that. I blindly copied from: Line 67 in ae1cb2d We can use the |
|
Whatever you decide is good with me, I just wanted to point it out. Let me know when you're ready, and we'll get this in. |
8cb09d6 to
ea84509
Compare
|
@stefanv, I have made the change to use the installed NumPy version in the latest commit. |
stefanv
left a comment
There was a problem hiding this comment.
The versioning is still a bit odd: do you ever want to pick up the installed NumPy to determine the version? I'd imagine the only thing that matters is whether the snippets match with the version of NumPy being released.
So, I'd have made the logic as follows:
- Find the version in
pyproject.toml(this config is already available to you viaspin, btw) - You know that this version matches with the snippets about to be processed.
- Use
--version(or perhaps--version-override) to specify a custom version.
This way, you will never have release notes out of sync with the version of NumPy you're releasing.
cbc90fd to
96fbb30
Compare
|
Thanks @stefanv, it's a lot cleaner this way. |
stefanv
left a comment
There was a problem hiding this comment.
Some minor suggestions, but overall LGTM.
| if not version_override: | ||
| version = util.get_config()['project']['version'] | ||
| else: | ||
| version = version_override |
There was a problem hiding this comment.
| if not version_override: | |
| version = util.get_config()['project']['version'] | |
| else: | |
| version = version_override | |
| version = version_override or util.get_config()['project.version'] |
| # towncrier build --version 2.1 --yes | ||
| cmd = ["towncrier", "build", "--version", version, "--yes"] | ||
| try: | ||
| p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8") |
There was a problem hiding this comment.
Consider using _run as elsewhere in the file.
123af65 to
b7045c9
Compare

Changes
mainto support imports intest_all_newsfragments_used.pyTesting
Generate notes with version
Auto detect version
`towncrier` not found
Auto version detection failed
Notes
Related: #24080