scientific-python / changelist

Prepare an automatic changelog from GitHub pull requests
BSD 3-Clause "New" or "Revised" License
8 stars 4 forks source link

Allow multiple summaries per pull request #53

Closed lagru closed 7 months ago

lagru commented 10 months ago

Tackles the first case in https://github.com/scientific-python/changelist/issues/45:

1pr-to-many: A pull requests addresses multiple things which should ideally appear as multiple summaries. Possibly even in separate sections.

It would be good to have this in before the next release of scikit-image. So that changelist can gracefully deal with https://github.com/scikit-image/scikit-image/pull/6695.

lagru commented 9 months ago

Okay, finally Python 3.9 is happy (sorry for the notification noise). I think this is ready to merge.

As a real world example, this

changelist scikit-image/scikit-image 54316d5~1 54316d5

includes just the merge commit from https://github.com/scikit-image/scikit-image/pull/6695 and creates the following notes:

Details ```md # scikit-image x.y.z We're happy to announce the release of scikit-image x.y.z! ## New Features - Add parameter `mode` to `binary_erosion`, `binary_dilation`, `binary_opening` and `binary_closing` in`skimage.morphology`. These new parameters determine how array borders are handled ([#6695](https://github.com/scikit-image/scikit-image/pull/6695)). - Add parameters `mode` and `cval` to `erosion`, `dilation`, `opening`, `closing`, `white_tophat`, and `black_tophat` in `skimage.morphology`. These new parameters determine how array borders are handled ([#6695](https://github.com/scikit-image/scikit-image/pull/6695)). - Add functions `mirror_footprint` and `pad_footprint` to `skimage.morphology` ([#6695](https://github.com/scikit-image/scikit-image/pull/6695)). ## API Changes - Parameters `shift_x` and `shift_y` in `skimage.morphology.erosion` and `skimage.morphology.dilation` are deprecated. Use `pad_footprint` or modify the footprint manually instead ([#6695](https://github.com/scikit-image/scikit-image/pull/6695)). ## Bug Fixes - Ensure `skimage.morphology.closing` and `skimage.morphology.opening` are extensive and anti-extensive, respectively, if the footprint is not mirror symmetric ([#6695](https://github.com/scikit-image/scikit-image/pull/6695)). ## Contributors 2 authors added to this release (alphabetically): - Cris Luengo ([@crisluengo](https://github.com/crisluengo)) - Lars Grüter ([@lagru](https://github.com/lagru)) 3 reviewers added to this release (alphabetically): - Cris Luengo ([@crisluengo](https://github.com/crisluengo)) - Lars Grüter ([@lagru](https://github.com/lagru)) - Stefan van der Walt ([@stefanv](https://github.com/stefanv)) _These lists are automatically generated, and may not be complete or may contain duplicates._ ```

Let me know what you think. :)

lagru commented 9 months ago

@stefanv, could I ask you to have a look at this if you have the time? :pray: Not the highest priority in my opinion but I'd hate to rush this just before our next skimage release.

stefanv commented 9 months ago

@lagru Let me know if you intend to make any other changes, otherwise I'll merge.

lagru commented 8 months ago

@stefanv. I've addressed all your comments and switched to the {label="Some label"} based syntax. This {...} block can be added anywhere once in the summary. So it can be used as a fenced_code_attributes that is hidden, or anywhere else so that it's visible.

I've also added basic tests for this in test_objects.py.

lagru commented 7 months ago

As we talked about, I've added a section in the README to document the new feature and make it clearer how to use it. It's duplicating the documentation in the config a little bit, but it's probably less hidden this way and should read nicer (no talk of regex).

stefanv commented 7 months ago

Thanks Lars!