Skip to content

Commit

Permalink
more specific dev dependencies, update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeitsperre committed Nov 3, 2023
1 parent 586bd4e commit 88abe16
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
19 changes: 12 additions & 7 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Ready to contribute? Here's how to set up `xscen` for local development.

$ cd xscen/
$ mamba env create -f environment-dev.yml
$ pip install -e .
$ pip install -e ".[dev]"

3. As xscen was installed in editable mode, we also need to compile the translation catalogs manually:

Expand All @@ -89,18 +89,21 @@ Ready to contribute? Here's how to set up `xscen` for local development.

Now you can make your changes locally.

6. When you're done making changes, check that your changes pass flake8, black, and the
tests, including testing other Python versions with tox::
6. When you're done making changes, check that your changes pass `flake8`, `black`, and the
tests, including testing other Python versions with `tox`::

$ tox

To get flake8, black, and tox, just pip install them into your virtualenv.
Alternatively, you can run the tests using `make`::

$ make lint
$ make test

Running `make lint` and `make test` demands that your runtime/dev environment have all necessary development dependencies installed.

.. warning::

Due to some dependencies only being available via Anaconda/conda-forge, `tox` will only work if both `tox` and `tox-conda`
are installed in a conda-based environment. Running `pytest` demands that your runtime/dev environment have all necessary
dependencies installed.
Due to some dependencies only being available via Anaconda/conda-forge or built from source, `tox`-based testing will only work if `ESMF`_ is available in your system path. This also requires that the `ESMF_VERSION` environment variable (matching the version of ESMF installed) be accessible within your shell as well (e.g.: `$ export ESMF_VERSION=8.5.0`).

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

Expand Down Expand Up @@ -188,3 +191,5 @@ Then run::
$ bumpversion patch # possible: major / minor / patch
$ git push
$ git push --tags

.. _`ESMF`: http://earthsystemmodeling.org/download/
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ def run(self):
"zarr",
]

dev_requirements = ["pytest", "pytest-cov", "xdoctest"]
dev_requirements = [
"black",
"flake8",
"flake8-rst-docstrings",
"pytest",
"pytest-cov",
]

docs_requirements = [
"ipykernel",
Expand Down

0 comments on commit 88abe16

Please sign in to comment.