Skip to content
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

Small updates to contributing.rst #3193

Merged
merged 1 commit into from
Aug 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 deletions doc/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ equivalent. The easiest way to verify that your code is correct is to
explicitly construct the result you expect, then compare the actual result to
the expected correct result::

def test_constructor_from_0d(self):
def test_constructor_from_0d():
expected = Dataset({None: ([], 0)})[None]
actual = DataArray(0)
assert_identical(expected, actual)
Expand Down Expand Up @@ -480,8 +480,7 @@ features that we like to use.
- to set a mark on a parameter, ``pytest.param(..., marks=...)`` syntax should be used
- ``fixture``, code for object construction, on a per-test basis
- using bare ``assert`` for scalars and truth-testing
- ``tm.assert_series_equal`` (and its counter part ``tm.assert_frame_equal``), for xarray
object comparisons.
- ``assert_equal`` and ``assert_identical`` from the ``xarray.testing`` module for xarray object comparisons.
- the typical pattern of constructing an ``expected`` and comparing versus the ``result``

We would name this file ``test_cool_feature.py`` and put in an appropriate place in the
Expand Down Expand Up @@ -716,18 +715,6 @@ Doing 'git status' again should give something like::
# modified: /relative/path/to/file-you-added.py
#

Finally, commit your changes to your local repository with an explanatory message.
*Xarray* uses a convention for commit message prefixes and layout. Here are
some common prefixes along with general guidelines for when to use them:

* ``ENH``: Enhancement, new functionality
* ``BUG``: Bug fix
* ``DOC``: Additions/updates to documentation
* ``TST``: Additions/updates to tests
* ``BLD``: Updates to the build process/scripts
* ``PERF``: Performance improvement
* ``CLN``: Code cleanup

The following defines how a commit message should be structured:

* A subject line with `< 72` chars.
Expand Down