Skip to content

Commit

Permalink
Add contributing changes
Browse files Browse the repository at this point in the history
  • Loading branch information
znichollscr committed May 19, 2023
1 parent d9b1365 commit 938e566
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cf_xarray/tests/test_accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ def test_bounds_to_vertices() -> None:
with pytest.raises(ValueError):
dsv = dsb.cf.bounds_to_vertices("T")

# Works on datetime arrays to
# Works on datetime arrays too
dsb = dsb.cf.add_bounds("time")
dsv = dsb.cf.bounds_to_vertices()
assert "time_bounds" in dsv
Expand Down
21 changes: 20 additions & 1 deletion doc/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,26 @@
Contributing
------------

This section will be expanded later. For now it lists docstrings for a number of internal variables, classes and functions.
This section will be expanded later. For now it tells you how to get setup to
run the tests and lists docstrings for a number of internal variables, classes
and functions.

Running the tests
~~~~~~~~~~~~~~~~~

The simplest way is using conda/mamba (same as in the CI). Create yourself a
conda/mamba environment (e.g. ``mamba create -f ci/environment.yml``).
Activate your environment. Next install the local version of ``cf-xarray``,
``python -m pip install --no-deps -e .``. Now you are ready to run the tests
with ``pytest``.

Pre-commit
~~~~~~~~~~

If you want the pre-commit hook too, after installing your environment as
above, simply install pre-commit (``pip install pre-commit``) and then run
``pre-commit install``. Now each time you commit you'll get the pre-commit
checks for free.

Variables
~~~~~~~~~
Expand Down

0 comments on commit 938e566

Please sign in to comment.