Skip to content

Added a 'perf' changelog entry type#16694

Merged
pllim merged 3 commits intoastropy:mainfrom
astrofrog:changelog-perf
Jul 11, 2024
Merged

Added a 'perf' changelog entry type#16694
pllim merged 3 commits intoastropy:mainfrom
astrofrog:changelog-perf

Conversation

@astrofrog
Copy link
Member

@astrofrog astrofrog commented Jul 10, 2024

As discussed in #16679

Fix #16679

  • By checking this box, the PR author has requested that maintainers do NOT use the "Squash and Merge" button. Maintainers should respect this when possible; however, the final decision is at the discretion of the maintainer that merges the PR.

@github-actions
Copy link
Contributor

Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the Astropy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see instructions for rebase and squash.
  • Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the "Extra CI" label. Codestyle issues can be fixed by the bot.
  • Is a change log needed? If yes, did the change log check pass? If no, add the "no-changelog-entry-needed" label. If this is a manual backport, use the "skip-changelog-checks" label unless special changelog handling is necessary.
  • Is this a big PR that makes a "What's new?" entry worthwhile and if so, is (1) a "what's new" entry included in this PR and (2) the "whatsnew-needed" label applied?
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate "backport-X.Y.x" label(s) before merge.

Copy link
Contributor

@neutrinoceros neutrinoceros left a comment

Choose a reason for hiding this comment

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

pre-commit will still invalidate a fragment named, for instance 1.perf.rst, but the fix is simple enough:

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 64cbacf354..e663730c60 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -114,10 +114,10 @@ repos:
         name: changelog filenames
         language: fail
         entry: >-
-          changelog files must be named <sub-package>/####.(bugfix|feature|api).rst
+          changelog files must be named <sub-package>/####.(bugfix|feature|api|perf).rst
           or ####.other.rst (in the root directory only)
         exclude: >-
-          ^docs/changes/[\w\.]+/(\d+\.(bugfix|feature|api)(\.\d)?.rst|.gitkeep)
+          ^docs/changes/[\w\.]+/(\d+\.(bugfix|feature|api|perf)(\.\d)?.rst|.gitkeep)
         files: ^docs/changes/[\w\.]+/
       - id: changelogs-rst-other
         name: changelog filenames for other category

@astrofrog
Copy link
Member Author

@neutrinoceros - fixed, thanks!

@pllim
Copy link
Member

pllim commented Jul 10, 2024

I think there isn't any merged PRs that need their change log moved. But should we add a note to these ones?

https://github.com/astropy/astropy/pulls?q=is%3Apr+is%3Aopen+label%3APerformance+-label%3Ano-changelog-entry-needed

Copy link
Member

@nstarman nstarman left a comment

Choose a reason for hiding this comment

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

SGTM!

@eerovaher
Copy link
Member

Announcing performance improvements in the change log can be good, but we should write down a guideline somewhere that in order for a pull request to be announced in the change log in the performance category there must exist some code example using only the public API that has been sped up by e.g. 10% (the number is to be decided here).

@nstarman
Copy link
Member

nstarman commented Jul 10, 2024

I would say even 2-3% improvements. These add up over time! But maybe others feel 5% is a better number to merit the changelog?

@pllim
Copy link
Member

pllim commented Jul 10, 2024

@eerovaher , are you saying that this PR also needs to update dev docs?

@astrofrog
Copy link
Member Author

If a performance improvement isn't important enough to be in the changelog maybe it doesn't warrant a pull request? 🙃

@pllim
Copy link
Member

pllim commented Jul 10, 2024

@eerovaher
Copy link
Member

@nstarman wrote:

I would say even 2-3% improvements. These add up over time! But maybe others feel 5% is a better number to merit the changelog?

The smaller the speedup, the more difficult it is to distinguish the signal from the noise. If the speedup is too small then measuring it reliably is a waste of time and effort.

@pllim asked:

@eerovaher , are you saying that this PR also needs to update dev docs?

All the other change log entry categories are documented, there's no reason for the performance category to be any different.

@astrofrog wrote:

If a performance improvement isn't important enough to be in the changelog maybe it doesn't warrant a pull request? 🙃

Some refactoring pull requests might have small performance implications. In some cases these serendipitous speedups might be large enough to be announced.

@astrofrog
Copy link
Member Author

Maybe the threshold should just be a 'measurable' performance improvement.

…dd note about ensuring the change is measurable using public API
@astrofrog
Copy link
Member Author

I've added a note to the contributor docs, and also have added in both cases that the improvement has to be measurable using public API, which I think is a sufficient threshold.

Copy link
Member

@pllim pllim left a comment

Choose a reason for hiding this comment

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

OK let's do it then. Thanks, all!

@pllim pllim merged commit a50f9e3 into astropy:main Jul 11, 2024
d-giles referenced this pull request in d-giles/astropy-abdufork Jul 26, 2024
* Added a 'perf' changelog entry type

* Adjust pre-commit configuration

* Add mention of 'perf' changelog entry type in contributor docs, and add note about ensuring the change is measurable using public API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Changelog entries for performance improvements

6 participants