Pull Request Check List#

The pull request (commonly referred to as a PR) check list below is an outline of the steps that should be taken when making a contribution to a SunPy repository on Github.

New to Git and Github? Check out the Newcomers’ Guide and Git Cheat Sheets.

If you would prefer a visual Git interface, you can try Github Desktop or GitKraken.

  1. Review and test changes locally on your machine (see Testing Guidelines).
    1. Double check that a pull request does not exist for the changes you are making. Ideally, check that there is an issue that details what you want to change and why.

    2. If you are contributing code, review the Coding Standards page.

    3. See the Developer’s Guide for guidelines regarding code tests, documentation, and other types of contributions.

    4. Have you tested your changes with the latest version of sunpy? If not, update your local copy from your remote repository on Github.

  2. Push your changes to Github.
    1. Create a new branch in your fork of sunpy.

    2. Give this branch a name that reflects the changes you are making.

    3. Create commits that describe the changes.

    4. Push your changes to the new branch on your remote fork.

  3. Compare your branch with sunpy/main.
    1. Resolve any conflicts that occur ideally with a git rebase.

  4. Create a pull request.
    1. Create a pull request from the branch you have created/updated.

    2. Add a description to the pull request that describes the changes you have made. Remember to delete the preamble within the message box.

    3. Link to any relevant issues, pull requests, or comments in your description.

  5. Add a changelog to your pull request.
    1. A changelog is a short record of the type of changes made in your pull request. Other users are the intended audience, and you can have multiple logs per pull request.

  6. Maintainers will review your pull request Pull Requests and GitHub Teams.
    1. Tweak anything that others highlight and push the changes to your branch. You can also commit suggestions either in bulk or single commits via the Github user interface.

    2. Discuss possible changes or improvements in the comments with the reviewers.

    3. Review the Continuous Integration (CI) What runs on our Continuous Integration tests and fix any errors or warnings that are found.
      1. If you are confused by an error that the continuous integration is giving you, submit a comment in your pull request.

  7. Ask questions if you get stuck or confused at any point!
    1. Open-source projects are about communication and collaboration.

    2. Join the SunPy Matrix Chat channel.

This guide is partially based on Astropy’s Development Workflow.