Skip to content

Commit

Permalink
Improve docs (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
forsyth2 authored Jul 1, 2021
1 parent e1c1b05 commit 34deb2d
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/source/dev_guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ Developer Guide
:maxdepth: 2

project-standards
testing
release
31 changes: 31 additions & 0 deletions docs/source/dev_guide/testing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Testing zppy
============

Unit tests
----------

Run all unit tests by doing the following

.. code::
pip install . # Install your changes (`python -m pip install .` also works)
python -m unittest tests/test_*.py # Run all unit tests
Integration tests
-----------------

Integration tests must be run on an LCRC machine.

.. code::
pip install . # Install your changes (`python -m pip install .` also works)
python -m unittest tests/integration/test_*.py # Run all integration tests
Automated tests
---------------

We have a :ref:`GitHub Actions <ci-cd>` Continuous Integration / Continuous Delivery (CI/CD) workflow.

The unit tests are run automatically as part of this. As mentioned earlier,
integration tests must be run on an LCRC machine.

4 changes: 2 additions & 2 deletions docs/source/post.mysimulation.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ walltime = "24:00:00"
parallelTaskCount = 6
ts_years = "1-50", "1-100",
enso_years = "11-50", "11-100",
climo_years ="21-50", "51-100",
climo_years = "21-50", "51-100",
mesh = "EC30to60E2r2"

# Global time series plots
Expand All @@ -108,4 +108,4 @@ figstr=coupled_v2_test01
moc_file=mocTimeSeries_0001-0100.nc
experiment_name=20210122.v2_test01.piControl.chrysalis
ts_years = "1-50", "1-100",

climo_years = "21-50", "51-100",
7 changes: 7 additions & 0 deletions docs/source/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
Tutorial
***************

These examples are for use on LCRC machines (e.g., Chrysalis). Some parameters
must be changed for use on other machines. These include the paths for
``input``, ``output``, ``www``, ``mapping_file``, ``reference_data_path``, ``obs_ts``,
and ``dc_obs_climo``. Different machines also have different partition names, so
``partition`` may need to be changed as well.


Example 1
=========

Expand Down
5 changes: 4 additions & 1 deletion tests/integration/test_complete_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ def compare_images(

class TestCompleteRun(unittest.TestCase):
def test_complete_run(self):
# Run `zppy -c test_complete_run.cfg` prior to running this test!!!
# Run the following lines prior to running this test!!!
# `rm -rf /lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_test_www/20210122.v2_test01.piControl.ne30pg2_EC30to60E2r2-1900_ICG.chrysalis`
# `rm -rf /lcrc/group/e3sm/ac.forsyth2/zppy_test_output/20210122.v2_test01.piControl.ne30pg2_EC30to60E2r2-1900_ICG.chrysalis/post`
# `zppy -c tests/integration/test_complete_run.cfg`
actual_images_dir = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zppy_test_www/20210122.v2_test01.piControl.ne30pg2_EC30to60E2r2-1900_ICG.chrysalis"

# The expected_images_file lists all images we expect to compare.
Expand Down

0 comments on commit 34deb2d

Please sign in to comment.