Skip to content

Commit

Permalink
Tweak format and wording of contributor doc (#566)
Browse files Browse the repository at this point in the history
Co-authored-by: Jessica Scheick <[email protected]>
  • Loading branch information
mfisher87 and JessicaS11 authored Aug 26, 2024
1 parent e491c84 commit 2790edd
Showing 1 changed file with 36 additions and 28 deletions.
64 changes: 36 additions & 28 deletions doc/source/contributing/how_to_contribute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,62 +3,70 @@
How to Contribute
=================

On this page we briefly provide basic instructions for contributing to icepyx.
On this page we provide brief instructions for contributing to icepyx.
We encourage users to follow the `git pull request workflow <https://www.asmeurer.com/git-workflow/>`_.
For contribution examples, please see contribution guidelines.
For contribution examples, please see :doc:`contribution guidelines <contribution_guidelines>`.


Contributing for the first time
-------------------------------
1. If you don't have one, sign up for a GitHub account (visit https://github.com/ and ‘sign up for GitHub account’).

2. Clone the icepyx repo: Open a terminal window.
Navigate to the folder on your computer where you want to store icepyx.
For example,
Navigate to the folder on your computer where you want to store icepyx.
For example,

.. code-block:: shell
.. code-block:: shell
cd /Users/YOURNAMEHERE/documents/ICESat-2
cd /Users/YOURNAMEHERE/documents/ICESat-2
Within this folder, clone the icepyx repo by executing
Within this folder, clone the icepyx repo by executing

.. code-block:: shell
.. code-block:: shell
git clone https://github.com/icesat2py/icepyx.git
git clone https://github.com/icesat2py/icepyx.git
You should receive confirmation in terminal of the files loading into your workspace.
For help navigating git and GitHub, see this `guide <https://the-turing-way.netlify.app/collaboration/github-novice/github-novice-firststeps.html?highlight=github%20account>`__.
`GitHub <https://docs.github.com/en>`_ also provides a lot of great how-to materials for navigating and contributing.
You should receive confirmation in terminal of the files downloading into your workspace.
For help navigating ``git`` and GitHub, see this `guide <https://the-turing-way.netlify.app/collaboration/github-novice/github-novice-firststeps.html?highlight=github%20account>`__.
`GitHub <https://docs.github.com/en>`_ also provides great how-to materials for navigating and contributing.


Every time you contribute
-------------------------

.. important::

If you do not have write permissions on this repository, start with creating a fork by clicking the Fork button in GitHub.
All actions from here on should be performed in your fork.

1. To add new content, you need to create a new branch.
You can do this on GitHub by clicking the down arrow next to ‘development’ and making a new branch
(you can give it whatever name you want - the naming doesn't matter much as it will only be a temporary branch).
You can do this on GitHub by clicking the down arrow next to ‘development’ and making a new branch
(you can give it whatever name you want - the naming doesn't matter much as it will only be a temporary branch).

2. Navigate to the new branch you created.
Make any edits or additions on this branch (this can be done locally or on GitHub directly).
After you do this, commit your changes and add a descriptive commit message.
Make any edits or additions on this branch (this can be done locally with ``git`` or on GitHub directly).
After you do this, commit your changes and add a descriptive commit message.

3. After committing the changes, push them to GitHub if you were working locally.
Then, open a pull request to merge your branch into the development branch.
Members of the icepyx community will review your changes and may ask you to make some more.
3. Push your new commits to GitHub if you were working locally.
Then, open a pull request to merge your branch into the ``development`` branch.
Members of the icepyx community will review your changes and may ask you to make some more.

4. If this is your first PR, someone on the icepyx team should add you to the contributors list.
icepyx follows the `all-contributors <https://github.com/all-contributors/all-contributors>`_ specification using the contributors bot to add new contributors.
You are also welcome to add yourself by adding a comment with the text:
icepyx follows the `all-contributors <https://github.com/all-contributors/all-contributors>`_ specification using the contributors bot to add new contributors.
You are also welcome to add yourself by adding a comment with the text:

.. code-block:: none
.. code-block:: none
@all-contributors add @[GitHub_handle] for a, b, and c
@all-contributors add @[GitHub_handle] for a, b, and c
where a, b, etc. is a list of the appropriate `contribution emojis <https://allcontributors.org/docs/en/emoji-key>`_.
The bot will open a separate PR to add the contributor or new contribution types!
where a, b, etc. is a list of the appropriate `contribution emojis <https://allcontributors.org/docs/en/emoji-key>`_.
The bot will open a separate PR to add the contributor or new contribution types!

5. Repeat these steps, creating a new branch and ultimately a pull request for each change.
More, smaller pull requests are easier to debug and merge than fewer large ones, so create pull requests regularly!

.. tip::

More, smaller pull requests are easier to debug and merge than fewer large ones, so please create pull requests regularly!


Steps for working with icepyx locally
Expand Down Expand Up @@ -94,10 +102,10 @@ environment (from the home level of your local copy of the icepyx repo) with
mamba env create --name icepyx-env --channel conda-forge -f requirements-dev.txt -f requirements.txt
and then (1) running `pre-commit install` to let git know about pre-commit and
and then (1) running ``pre-commit install`` to let git know about pre-commit and
(2) pip installing icepyx as described above and below.

One of the tools installed with "requirements-dev.txt" is called [pre-commit](https://pre-commit.com/).
One of the tools installed with "requirements-dev.txt" is called `pre-commit <https://pre-commit.com/>`_.
We have included a set of pre-commit formatting hooks that we strongly encourage all contributors to use.
These hooks will check the files you are committing for format consistency,
reformatting the files if necessary.
Expand Down

0 comments on commit 2790edd

Please sign in to comment.