Skip to content

Commit 938e566

Browse files
committed
Add contributing changes
1 parent d9b1365 commit 938e566

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

cf_xarray/tests/test_accessor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,7 @@ def test_bounds_to_vertices() -> None:
981981
with pytest.raises(ValueError):
982982
dsv = dsb.cf.bounds_to_vertices("T")
983983

984-
# Works on datetime arrays to
984+
# Works on datetime arrays too
985985
dsb = dsb.cf.add_bounds("time")
986986
dsv = dsb.cf.bounds_to_vertices()
987987
assert "time_bounds" in dsv

doc/contributing.rst

+20-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,26 @@
1111
Contributing
1212
------------
1313

14-
This section will be expanded later. For now it lists docstrings for a number of internal variables, classes and functions.
14+
This section will be expanded later. For now it tells you how to get setup to
15+
run the tests and lists docstrings for a number of internal variables, classes
16+
and functions.
17+
18+
Running the tests
19+
~~~~~~~~~~~~~~~~~
20+
21+
The simplest way is using conda/mamba (same as in the CI). Create yourself a
22+
conda/mamba environment (e.g. ``mamba create -f ci/environment.yml``).
23+
Activate your environment. Next install the local version of ``cf-xarray``,
24+
``python -m pip install --no-deps -e .``. Now you are ready to run the tests
25+
with ``pytest``.
26+
27+
Pre-commit
28+
~~~~~~~~~~
29+
30+
If you want the pre-commit hook too, after installing your environment as
31+
above, simply install pre-commit (``pip install pre-commit``) and then run
32+
``pre-commit install``. Now each time you commit you'll get the pre-commit
33+
checks for free.
1534

1635
Variables
1736
~~~~~~~~~

0 commit comments

Comments
 (0)