-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DEV: reduce merge conflicts by sorting whatsnew notes by issue number? #51715
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
Conversation
1e830c7
to
f6f4b6f
Compare
f6f4b6f
to
4baa6fc
Compare
Implementation seems fine, im going to post general thoughts in #51712 |
Agree implementation looks fine, would be good to see if could be automated as part of the test suite. Could you add that so one could check the before and after whatsnew file for differences? |
yup, done - have run it over all files, you can check what it changes |
This feels like a real win to me for reducing whatsnew conflicts. |
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.
I like this idea, but I wonder if we should just do this for whatsnew notes starting with 2.0 and not change the ordering for old whatsnew notes
Also, going forward, if someone does a PR and updates the whatsnew of the latest version, is there something we can do to automate the sorting as part of either pre-commit or CI?
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.
Nice idea
Thanks!
Yup, it's in pre-commit |
One more - does this run in CI and will CI fail if this returns non-zero? |
That's right! You can see it here: https://github.com/pandas-dev/pandas/actions/runs/4312190011/jobs/7522443368
And yes, it'll return non-zero exit code if it would've modified any file (like all pre-commit hooks) |
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.
LGTM and a no regret way to reduce merge conflicts.
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.
LGTM
I've amended this to exclude 2.0.0, so it'll only be applied going forwards If in 3.0.0 we want to keep some parts of a section grouped, we can just make subsections, e.g. Removal of prior version deprecations/changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Non-keyword arguments
^^^^^^^^^^^^^^^^^^^^^
- Disallow passing non-keyword arguments to :func:`read_excel` except ``io`` and ``sheet_name`` (:issue:`34418`)
- Disallow passing non-keyword arguments to :meth:`DataFrame.drop` and :meth:`Series.drop` except ``labels`` (:issue:`41486`)
Behavior changes
^^^^^^^^^^^^^^^^
- Changed behavior of :meth:`Series.quantile` and :meth:`DataFrame.quantile` with :class:`SparseDtype` to retain sparse dtype (:issue:`49583`) |
Thanks @MarcoGorelli |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.The script which does this is
scripts/sort_whatsnew_note.py
. There's a defensive check inside to validate that it has only reordered the lines of a file, and hasn't changed anything elseRather than tagging all of core/triage, I've just request a review from whoever participated in #50275 - but if this proves controversial we can tag the rest