-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Adds towncrier functionality to help improve automation of release note aggregation. #5477
base: main
Are you sure you want to change the base?
Conversation
This adds a github action to run towncrier and some custom python functionality to aggregate information to document changes for the current release.
Will fix tests/code style next week. |
doc/source/towncrier.md
Outdated
``` | ||
cd <path/to/scikit-image/repository> | ||
pip install -r requirements/_release_docs.txt | ||
python tools/aggregate_contributors <path/to/scikit-image> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python tools/aggregate_contributors <path/to/scikit-image> | |
python tools/aggregate_contributors . |
Using <path/to/scikit-image>
her and <path/to/scikit-image/repository>
above can potentially confuse readers into thinking these are two different paths
we are already in the repository path due to the command above, so I just switched to .
here
- {{ text }} {% if category != 'process' %} {{ values|sort|join(', ') }} {% endif %} {% endfor %} | ||
{% else %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- {{ text }} {% if category != 'process' %} {{ values|sort|join(', ') }} {% endif %} {% endfor %} | |
{% else %} | |
- {{ text }} {% if category != 'process' %} {{ values|sort|join(', ') }} {% endif %} {% endfor %} | |
{% else %} |
Seems to need this blank line here, otherwise I get the following in a case I tested with two doc
and one bugfix
entry (Note the missing blank line before the start of the "Documentation" section)
Bug Fixes
---------
- Minor fixups to Hough line transform code and examples `#5182 <https://github.com/scikit-image/scikit-image/issues/5182>`_
Documentation
-------------
- Prevent integer overflow in EllipseModel `#5179 <https://github.com/scikit-image/scikit-image/issues/5179>`_
- update reference link in exposure module `#5473 <https://github.com/scikit-image/scikit-image/issues/5473>`_
|
||
- name: Get reviewers and authors | ||
run: | | ||
python tools/aggregate_contributors.py ${{ github.workspace }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is nice that this script also credits reviewers!
I like the idea of adding the instructions for this to the PR template. Please also update the section labeled For this to be useful we do need to remember to always add a news fragment before merging PRs, so that is one extra check that needs to be done by maintainers prior to merge. I'm not sure whether we should automatically block merging somehow until a fragment is present? |
Hi @grlee77, that was one of the ideas we've been discussing so far. We thought of adding a linter check for the news fragment files or perhaps an auto generation tool to run once merged... Would love to listen your thoughts about that |
It might be checking in with NumPy devs how it has been working out for them. Also, we should consider harmonizing the category names with what NumPy is using I am pretty sure NumPy is not enforcing that a news item be in all PRs though, because I recently made a small bug fix PR there and was not asked to add one. |
How would you determine the category if autogenerating it? If we consistently labeled every PR, the labels could be used, but we sometimes miss adding them. I would be curious to hear from other contributors about how helpful vs. annoying having a |
Definitely! For the categories I just followed what I found under the sections of some old scikit-image release files. To change then or adding new ones, we just need to modify the |
Thanks for the feedback @grlee77.
We wouldn't be able and would have to choose a default. This is a flaw in the approach that likely makes it untenable (unless a set of labels for this start to get used religously).
Agreed. We would like feedback on this. A linter/bot to
Yes, checking in with them sounds like a good idea. The current sections listed in the pyproject.toml can be easily modified and were chosen based on past releases and the release template. This history speaks to the usefulness of those sections for this project but considering other approaches at this point is also sensible. Numpy seem to have a focus on deprecation/compatibility etc. that the current sections do not address. Maybe others could comment on the proposed release notes sections? We have a few things we still wish to add:
Details that we will wait for more feedback on:
|
@scikit-image/core, now that we have branched v0.19.x, it would be a good time to consider merging this to If it ends up not being helpful for some reason, we can always stop using it and go back to manual release note updates or evaluate other alternatives. |
I would like us to consider one other option. Instead of using towncrier this way, can we write a script that parses PR descriptions like the following:
We could also consider having a category tag:
This way, we can keep descriptions with the PRs, and easily extract them, format them into the release notes, etc. |
I will try to fix the conflicts here now |
@stefanv, if I understand correctly, you are proposing extracting everything from the PR descriptions and we would not add news fragment files at all? (i.e. the script would autogenerate the fragment files from the release notes so we can still use |
Yes, or we can put it in a Markdown file, e.g, then we don't need the added complexity of towncrier. Or we use that information as source for towncrier. |
One additional bit of functionality that we considered adding but have not yet implemented is to add some automation for checking if every PR has news fragments. Or perhaps a bot to remind people to add it… or auto-commit an example news fragment that contributors can modify. Let us know if this sounds like something worth doing. The quickest and easiest alternative would be to just add the following to the PR template:
For reviewers
later.
__init__.py
.doc/release/release_dev.rst
.