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

use towncrier to handle changelog entries #1375

Merged

Conversation

zacharyburnett
Copy link
Collaborator

@zacharyburnett zacharyburnett commented Aug 22, 2024

using towncrier to handle changelog entries will

  • drastically reduce (or even eliminate) branch conflicts in CHANGES.rst we currently experience with PRs
  • keep the sections in CHANGES.rst consistent and eliminate duplicate sections
  • allow automatic links to be generated in the changelog entries

image

towncrier expects "news fragment" files (text files in the changes/ directory with filenames in the format <PR#>.<changetype>.rst, i.e. for this PR it would be changes/1375.docs.rst). See docs at https://towncrier.readthedocs.io/en/latest/tutorial.html#creating-news-fragments

when ready to make a release, run towncrier build to ingest the news fragments and generate a changelog section in CHANGES.rst with all the new change log entries for that release (this clears the changes/ directory of all news fragment files). This step should either be done before making a release, or could probably be added to a GitHub workflow triggered on release (to insert a commit and remake the tag).

After merging this PR the Release Process wiki page will need to be updated to include a step to run towncrier build instead of manually editing CHANGES.rst

Checklist

  • added entry in CHANGES.rst under the corresponding subsection
  • [N/A] updated relevant tests
  • updated relevant documentation
  • updated relevant milestone(s)
  • added relevant label(s)
  • [N/A] ran regression tests, post a link to the Jenkins job below. How to run regression tests on a PR

@zacharyburnett zacharyburnett added the documentation Improvements or additions to documentation label Aug 22, 2024
@zacharyburnett zacharyburnett self-assigned this Aug 22, 2024
@github-actions github-actions bot added dependencies Pull requests that update a dependency file automation labels Aug 22, 2024
pyproject.toml Outdated Show resolved Hide resolved
Copy link

codecov bot commented Aug 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.49%. Comparing base (f604536) to head (1052c7e).
Report is 257 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1375   +/-   ##
=======================================
  Coverage   78.49%   78.49%           
=======================================
  Files         117      117           
  Lines        7867     7867           
=======================================
  Hits         6175     6175           
  Misses       1692     1692           
Flag Coverage Δ *Carryforward flag
nightly 62.24% <ø> (ø) Carriedforward from f604536

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 11 to 12
**Checklist**
- [ ] added entry in `CHANGES.rst` under the corresponding subsection
- [ ] for a public change, added a [towncrier news fragment](https://towncrier.readthedocs.io/en/stable/tutorial.html#creating-news-fragments) <details><summary>`changes/<PR#>.<changetype>.rst`</summary>
Copy link
Collaborator Author

@zacharyburnett zacharyburnett Aug 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checklist

  • for a public change, added a towncrier news fragment

    changes/<PR#>.<changetype>.rst

    • changes/<PR#>.general.rst: infrastructure or miscellaneous change
    • changes/<PR#>.docs.rst
    • changes/<PR#>.stpipe.rst
    • changes/<PR#>.associations.rst
    • changes/<PR#>.scripts.rst
    • changes/<PR#>.mosaic_pipeline.rst
    • changes/<PR#>.patch_match.rst

    steps

    • changes/<PR#>.dq_init.rst
    • changes/<PR#>.saturation.rst
    • changes/<PR#>.refpix.rst
    • changes/<PR#>.linearity.rst
    • changes/<PR#>.dark_current.rst
    • changes/<PR#>.jump_detection.rst
    • changes/<PR#>.ramp_fitting.rst
    • changes/<PR#>.assign_wcs.rst
    • changes/<PR#>.flatfield.rst
    • changes/<PR#>.photom.rst
    • changes/<PR#>.flux.rst
    • changes/<PR#>.source_detection.rst
    • changes/<PR#>.tweakreg.rst
    • changes/<PR#>.skymatch.rst
    • changes/<PR#>.outlier_detection.rst
    • changes/<PR#>.resample.rst
    • changes/<PR#>.source_catalog.rst
  • updated relevant tests

  • updated relevant documentation

  • updated relevant milestone(s)

@zacharyburnett
Copy link
Collaborator Author

current changelog (towncrier build --draft):

0.16.2.dev2+g482ef5c7 (2024-08-27)
==================================

Documentation
-------------

- handle changelog entries with `towncrier` (`#1375
  <https://github.com/spacetelescope/romancal/1375>`_)


``mosaic_pipeline``
-------------------

- Only load patch table when needed. (`#1367
  <https://github.com/spacetelescope/romancal/1367>`_)

Comment on lines 11 to 43
**Checklist**
- [ ] added entry in `CHANGES.rst` under the corresponding subsection
- [ ] for a public change, added a towncrier news fragment in `changes/` <details><summary>`echo "changed something" > changes/<PR#>.<changetype>.rst`</summary>

- ``changes/<PR#>.general.rst``: infrastructure or miscellaneous change
- ``changes/<PR#>.docs.rst``
- ``changes/<PR#>.stpipe.rst``
- ``changes/<PR#>.associations.rst``
- ``changes/<PR#>.scripts.rst``
- ``changes/<PR#>.mosaic_pipeline.rst``
- ``changes/<PR#>.patch_match.rst``

## steps
- ``changes/<PR#>.dq_init.rst``
- ``changes/<PR#>.saturation.rst``
- ``changes/<PR#>.refpix.rst``
- ``changes/<PR#>.linearity.rst``
- ``changes/<PR#>.dark_current.rst``
- ``changes/<PR#>.jump_detection.rst``
- ``changes/<PR#>.ramp_fitting.rst``
- ``changes/<PR#>.assign_wcs.rst``
- ``changes/<PR#>.flatfield.rst``
- ``changes/<PR#>.photom.rst``
- ``changes/<PR#>.flux.rst``
- ``changes/<PR#>.source_detection.rst``
- ``changes/<PR#>.tweakreg.rst``
- ``changes/<PR#>.skymatch.rst``
- ``changes/<PR#>.outlier_detection.rst``
- ``changes/<PR#>.resample.rst``
- ``changes/<PR#>.source_catalog.rst``
</details>
- [ ] updated relevant tests
- [ ] updated relevant documentation
- [ ] updated relevant milestone(s)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checklist

  • for a public change, added a towncrier news fragment in changes/

    echo "changed something" > changes/<PR#>.<changetype>.rst

    • changes/<PR#>.general.rst: infrastructure or miscellaneous change
    • changes/<PR#>.docs.rst
    • changes/<PR#>.stpipe.rst
    • changes/<PR#>.associations.rst
    • changes/<PR#>.scripts.rst
    • changes/<PR#>.mosaic_pipeline.rst
    • changes/<PR#>.patch_match.rst

    steps

    • changes/<PR#>.dq_init.rst
    • changes/<PR#>.saturation.rst
    • changes/<PR#>.refpix.rst
    • changes/<PR#>.linearity.rst
    • changes/<PR#>.dark_current.rst
    • changes/<PR#>.jump_detection.rst
    • changes/<PR#>.ramp_fitting.rst
    • changes/<PR#>.assign_wcs.rst
    • changes/<PR#>.flatfield.rst
    • changes/<PR#>.photom.rst
    • changes/<PR#>.flux.rst
    • changes/<PR#>.source_detection.rst
    • changes/<PR#>.tweakreg.rst
    • changes/<PR#>.skymatch.rst
    • changes/<PR#>.outlier_detection.rst
    • changes/<PR#>.resample.rst
    • changes/<PR#>.source_catalog.rst
  • updated relevant tests

  • updated relevant documentation

  • updated relevant milestone(s)

@schlafly
Copy link
Collaborator

Do you want to talk about this at the tag up tomorrow (3 pm)?

@zacharyburnett
Copy link
Collaborator Author

Do you want to talk about this at the tag up tomorrow (3 pm)?

sure, where is it?

@zacharyburnett zacharyburnett enabled auto-merge (squash) August 28, 2024 14:49
@zacharyburnett zacharyburnett mentioned this pull request Aug 28, 2024
6 tasks
@zacharyburnett zacharyburnett force-pushed the changelog/towncrier branch 4 times, most recently from c33dd3f to b4ad5c6 Compare August 30, 2024 13:02
@zacharyburnett
Copy link
Collaborator Author

zacharyburnett commented Aug 30, 2024

@schlafly sorry for the flurry of commits; this should be ready now, if you think it's good to approve. Like in stcal, after merging this PR I'll make comments on existing PRs explaining how to change the CHANGES.rst entries to be news fragments (new PRs will have the instructions included but not existing PRs) and also change the release procedures in the wiki

@zacharyburnett zacharyburnett modified the milestone: 25Q1_B16 Aug 30, 2024
@zacharyburnett zacharyburnett added this to the 24Q4_B15 milestone Aug 30, 2024
Copy link
Collaborator

@schlafly schlafly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Zach, LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation pipeline
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants