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

Fixed towncrier template rendering #9117

Merged
merged 4 commits into from Aug 16, 2023
Merged

Conversation

kc611
Copy link
Collaborator

@kc611 kc611 commented Aug 3, 2023

Resolves #9102,

As per the issue,
Adds a template for towncrier's auto-release notes generation and fixes towncrier build rendering issues.

@kc611 kc611 added skip_release_notes Skip towncrier requirement 3 - Ready for Review labels Aug 3, 2023
@gmarkall gmarkall added this to the Numba 0.58 RC milestone Aug 4, 2023
@gmarkall
Copy link
Member

gmarkall commented Aug 4, 2023

Moved into the 0.58RC milestone as it fixes #9102 which is in it.

sklam
sklam previously requested changes Aug 4, 2023
Copy link
Member

@sklam sklam left a comment

Choose a reason for hiding this comment

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

Thanks for the patch. I noticed a few things that need changing:

  • heading level is not aligning with previous CHANGE_LOG entries
  • the issue link not going to numba repo
  • the section ordering can be improved

towncrier.toml Outdated Show resolved Hide resolved

{% endif %}
{% if sections[section] %}
{% for category, val in definitions.items() if category in sections[section] %}
Copy link
Member

Choose a reason for hiding this comment

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

We should change the ordering of the sections. Currently, the CUDA session is going before the new_features. I found this the ordering is driven by the sections ordering in towncrier.toml. I suggest the following changes to it:


[[tool.towncrier.type]]
    directory = "highlight"
    name = "Highlights"
    showcontent = true

[[tool.towncrier.type]]
    directory = "new_feature"
    name = "New Features"
    showcontent = true

[[tool.towncrier.type]]
    directory = "improvement"
    name = "Improvements"
    showcontent = true

[[tool.towncrier.type]]
    directory = "np_support"
    name = "NumPy Support"
    showcontent = true

[[tool.towncrier.type]]
    directory = "cuda"
    name = "CUDA API Changes"
    showcontent = true

[[tool.towncrier.type]]
    directory = "performance"
    name = "Performance Improvements and Changes"
    showcontent = true

[[tool.towncrier.type]]
    directory = "bug_fix"
    name = "Bug Fixes"
    showcontent = true

[[tool.towncrier.type]]
    directory = "change"
    name = "Changes"
    showcontent = true

[[tool.towncrier.type]]
    directory = "deprecation"
    name = "Deprecations"
    showcontent = true

[[tool.towncrier.type]]
    directory = "expired"
    name = "Expired Deprecations"
    showcontent = true

[[tool.towncrier.type]]
    directory = "compatibility"
    name = "Compatibility Notes"
    showcontent = true

[[tool.towncrier.type]]
    directory = "doc"
    name = "Documentation Changes"
    showcontent = true

[[tool.towncrier.type]]
    directory = "infrastructure"
    name = "Infrastructure Related Changes"
    showcontent = true

Comment on lines 2 to 8
{{ "=" * title|length }}
{{ title }}
{{ "=" * title|length }}

{% for section, _ in sections.items() %}
{% set underline = underlines[0] %}{% if section %}{{ section }}
{{ underline * section|length }}{% set underline = underlines[1] %}
Copy link
Member

Choose a reason for hiding this comment

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

The formatting here is not at the correct level for directly inclusion into CHANGE_LOG file. The documentation build shows the following in the index:

Screenshot 2023-08-04 at 9 13 14 AM

Notice that each section heading is at the same level of other release title heading.

@sklam sklam added 4 - Waiting on author Waiting for author to respond to review and removed 3 - Ready for Review labels Aug 4, 2023
Co-authored-by: Siu Kwan Lam <1929845+sklam@users.noreply.github.com>
Copy link
Member

@esc esc left a comment

Choose a reason for hiding this comment

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

for a search and replace mistake

docs/upcoming_changes/9095.bug_fix.rst Outdated Show resolved Hide resolved
Copy link
Member

@esc esc left a comment

Choose a reason for hiding this comment

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

fixup missing =

docs/upcoming_changes/9095.bug_fix.rst Outdated Show resolved Hide resolved
Co-authored-by: esc <esc@users.noreply.github.com>
@esc
Copy link
Member

esc commented Aug 16, 2023

Testing via #9135 yields:

Screen Shot 2023-08-16 at 11 17 57

@esc esc added 5 - Ready to merge Review and testing done, is ready to merge and removed 4 - Waiting on author Waiting for author to respond to review labels Aug 16, 2023
Copy link
Member

@esc esc left a comment

Choose a reason for hiding this comment

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

I have verified via #9135 that the new headings look good and the towncrier build --draft output can be used to partially auto-generate the new Numba change log.

@esc esc dismissed sklam’s stale review August 16, 2023 10:02

sklam is AFK

@esc esc merged commit 2e4788b into numba:main Aug 16, 2023
19 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to merge Review and testing done, is ready to merge skip_release_notes Skip towncrier requirement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Towncrier rendering
4 participants