-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
adding saved replies to development guide, under triage #23109
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
base: main
Are you sure you want to change the base?
Changes from all commits
34fa4be
d9e15be
3243012
eae47f3
fabd529
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,44 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
.. _git_workflows: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
Git workflows | ||||||||||||||||||||||||||||||||||||||||||||||||||||
============= | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
When reviewing contributions, we sometime refer to this page to offer more detailed git workflows. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
.. _git_rebase: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
Rebase | ||||||||||||||||||||||||||||||||||||||||||||||||||||
^^^^^^ | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
If you want to rebase, the first thing to do is to squash all your commits into one, which will make the job easier. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Make sure you are in the PR branch, then to rebase do:: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
$ git rebase --interactive upstream/main | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
Git opens the last commits you made in our terminal editor (often it's vim) and you need to follow the instructions in | ||||||||||||||||||||||||||||||||||||||||||||||||||||
the file. Basically replace 'pick' by 'fixup' (or simply 'f') in all but the first commit (exit vim using `:wq` to | ||||||||||||||||||||||||||||||||||||||||||||||||||||
write/save and quite). Then update your main branch from upstream, change back to the PR branch and do:: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+20
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you should be editor agnostic here, and rather refer to the environment variable that controls this behaviour in git. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought adding the exit vim clue would save a lot of people a lot of searching 😉 I saw something similar in the GitLab documentation for interactive rebase and I thought it was kind and helpful. I tried to keep it more concise and be clear it's just an example. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd hate for people to read our instructions and come away with the impression that they have to learn There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wholeheartedly agree. I don't think I implied that people need to master vim though?! At least on macs vim is the default editor, and I don't know how many beginners change it 🤷♀️ So likely the first time they run a rebase it would open in vim, and they might not know what to do. This means we need to add instruction for mac users to change the |
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
$ git rebase main | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+24
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
and if there are problems, do ``$ git status`` to see which files need fixing, then edit the files to fix up any | ||||||||||||||||||||||||||||||||||||||||||||||||||||
conflicts (sections marked by "<<<") . When you are done with that:: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
$ git add <the fixed files> | ||||||||||||||||||||||||||||||||||||||||||||||||||||
$ git rebase --continue | ||||||||||||||||||||||||||||||||||||||||||||||||||||
$ git push --force-with-lease origin HEAD | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
If you have any problems, feel free to ask questions. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
PS. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
If at any point anything goes wrong, and you don't know what to do, just do:: | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
$ git rebase --abort | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
and everything will go back to the way it was in the before ``$ git rebase`` times, and you can come back to your PR, | ||||||||||||||||||||||||||||||||||||||||||||||||||||
or to `gitter`_, and ask us for help, or that we do the rebase for you 😉. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+32
to
+42
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like the addition of the backup! 🙇♀️ I used a backup tag so far to revert. Probably the branch strategy is less stressful and I should use that too 😃 |
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
.. _gitter: https://gitter.im/matplotlib/matplotlib |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
|
||
.. _saved_replies: | ||
|
||
Saved replies | ||
============= | ||
|
||
To consistently maintain respectful and welcoming communication, reduce potential bias and errors, consistently provide | ||
relevant information, and to avoid repitition, we decided to create a collection of saved replies for recurring project | ||
needs. As a an active Matplotlib contributor, consider storing some of these responses in your GitHub account’s | ||
`saved replies`_ as they might prove useful while reviewing issues and PRs, and otherwise supporting other community | ||
members. Some of the suggested saved replies can be long and detailed. This is because we aim to offer support without | ||
assuming the level of experience, or the intent the community member we are addressing might have. There is still room | ||
to tweak and personalize your message if, for instance, some parts are redundant, require further information, or to | ||
offer further support. Using these replies is optional. | ||
|
||
.. _saved replies: https://github.com/settings/replies/ | ||
|
||
Issues | ||
------ | ||
|
||
Coming soon 😉 | ||
|
||
Pull Requests | ||
------------- | ||
|
||
First Pull Request Merged | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just thinking: Could we have a bot write that message or is that too impersonal? We already have an automated welcome message (as you can see in this PR 😄). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I would rather do them myself while I can manage the load. I would need to set up getting notifications for new PRs being merged. But I will consider it if it becomes unmanageable There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have a slight preference for a human doing this. We do not have such a huge influx of new contributors and I think it does help build the inter-personal relationship. |
||
^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
.. code-block:: md | ||
|
||
Hi-five ✋ on merging your first pull request to Matplotlib, @username! We hope you stick around and invite you to | ||
continue to take an active part in Matplotlib! Your choices aren’t limited to programming 😉 – you can review pull | ||
requests, help us stay on top of new and old issues, develop educational material, refresh our documentation, work | ||
on our website, and so much more! For more info, check out: https://matplotlib.org/devdocs/devel/index | ||
|
||
Did you know we have a monthly meeting 👥 for new contributors and a weekly meeting for the maintainers, | ||
everyone is welcome to join both? You can find out more about our regular project meetings in this | ||
[calendar page](https://scientific-python.org/calendars/). | ||
|
||
Also, consider joining our [developer mailing list](https://mail.python.org/mailman/listinfo/matplotlib-devel) ✉️. | ||
This is a great way to connect with other people in our community and be part of important conversations that | ||
affect the development of Matplotlib. | ||
|
||
Rebase | ||
^^^^^^ | ||
.. code-block:: md | ||
|
||
Hi, it looks your code needs to be rebased to include changes that have since occurred in the main repository. Would | ||
you like to do this yourself, or would you like us to do this for you? I’m asking because a rebase can get a bit | ||
fiddly and not everyone likes doing them 😉 | ||
|
||
We documented [the rebase process here](https://matplotlib.org/devdocs/devel/git_workflows#rebase.html) Have a look and | ||
let me know how you'd like to proceed. |
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.