Skip to content

Commit

Permalink
add notices and warnings about the testdata env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeitsperre committed Jan 8, 2024
1 parent d56f7c8 commit 04dcc16
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ Ready to contribute? Here's how to set up ``xhydro`` for local development.
# Or, to run multiple build tests
$ tox

.. note::

Running `pytest` or `tox` will automatically fetch and cache the testing data for the package to your local cache (using the `platformdirs` library). On Linux, this is located at ``XDG_CACHE_HOME`` (usually ``~/.cache``). On Windows, this is located at ``%LOCALAPPDATA%`` (usually ``C:\Users\username\AppData\Local``). On MacOS, this is located at ``~/Library/Caches``.

If for some reason you wish to cache this data elsewhere, you can set the ``XHYDRO_DATA_DIR`` environment variable to a different location before running the tests. For example, to cache the data in the current working directory, run::

$ export XHYDRO_DATA_DIR=$(pwd)/.cache

#. Commit your changes and push your branch to GitHub::

$ git add .
Expand Down Expand Up @@ -134,6 +142,12 @@ Ready to contribute? Here's how to set up ``xhydro`` for local development.

You will have contributed your first changes to ``xhydro``!

.. warning::

If your Pull Request relies on modifications to the testing data of `xhydro`, you will need to update the testing data repository as well. As a preliminary testing measure, the branch of the testing data can be modified at testing time (from `main`) by setting the ``XHYDRO_TESTDATA_BRANCH`` environment variable to the branch name of the ``xhydro-testdata`` repository.

Be sure to consult the ReadMe found at https://github.com/hydrologie/xhydro-testdata as well.

Pull Request Guidelines
-----------------------

Expand Down

0 comments on commit 04dcc16

Please sign in to comment.