From 86df79f79c7a8efaf0bef58e160b3efff42793fc Mon Sep 17 00:00:00 2001 From: James McCreight Date: Mon, 23 Oct 2023 14:05:26 -0600 Subject: [PATCH] Documentation of PRMS comparisons for release; minor test cleanups --- autotest/test_prms_atmosphere.py | 3 --- autotest/test_prms_runoff.py | 2 +- autotest/test_prms_snow.py | 2 -- autotest/test_prms_solar_geom.py | 4 +--- doc/conf.py | 5 ++--- doc/index.rst | 16 ++++++++++++---- doc/whats-new.rst | 7 ++++++- 7 files changed, 22 insertions(+), 17 deletions(-) diff --git a/autotest/test_prms_atmosphere.py b/autotest/test_prms_atmosphere.py index 33c3d1a5..35b1aa6b 100644 --- a/autotest/test_prms_atmosphere.py +++ b/autotest/test_prms_atmosphere.py @@ -1,6 +1,3 @@ -from warnings import warn - -import numpy as np import pytest from pywatershed.atmosphere.prms_atmosphere import PRMSAtmosphere diff --git a/autotest/test_prms_runoff.py b/autotest/test_prms_runoff.py index 82107958..8a7a7937 100644 --- a/autotest/test_prms_runoff.py +++ b/autotest/test_prms_runoff.py @@ -9,7 +9,7 @@ from utils_compare import compare_in_memory, compare_netcdfs # compare in memory (faster) or full output files? or both! -do_compare_output_files = True +do_compare_output_files = False do_compare_in_memory = True rtol = atol = 1.0e-10 diff --git a/autotest/test_prms_snow.py b/autotest/test_prms_snow.py index 6a40e386..fb76f25a 100644 --- a/autotest/test_prms_snow.py +++ b/autotest/test_prms_snow.py @@ -1,11 +1,9 @@ import pathlib as pl -import numpy as np import pytest from pywatershed.base.adapter import adapter_factory from pywatershed.base.control import Control -from pywatershed.constants import epsilon32, zero from pywatershed.hydrology.prms_snow import PRMSSnow from pywatershed.parameters import Parameters, PrmsParameters from utils_compare import compare_in_memory, compare_netcdfs diff --git a/autotest/test_prms_solar_geom.py b/autotest/test_prms_solar_geom.py index 10404964..076c272b 100644 --- a/autotest/test_prms_solar_geom.py +++ b/autotest/test_prms_solar_geom.py @@ -1,4 +1,3 @@ -import numpy as np import pytest from pywatershed.atmosphere.prms_solar_geometry import PRMSSolarGeometry @@ -12,8 +11,7 @@ do_compare_output_files = False do_compare_in_memory = True -# rtol = atol = 1.0e-10 -atol = rtol = np.finfo(np.float32).resolution +rtol = atol = 1.0e-10 params = ("params_sep", "params_one") diff --git a/doc/conf.py b/doc/conf.py index 4e4a047d..efce9f6e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -97,14 +97,13 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -# html_theme = "pydata_sphinx_theme" html_theme = "sphinx_book_theme" html_title = "pywatershed" html_context = { - "github_user": "pydata", - "github_repo": "xarray", + "github_user": "EC-USGS", + "github_repo": "pywatershed", "github_version": "main", "doc_path": "doc", } diff --git a/doc/index.rst b/doc/index.rst index 1d7f200e..0ef4a6d8 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -4,12 +4,14 @@ pywatershed: a hydrologic model in Python #################################################### -Welcome to `pywatershed` docs! +Welcome to the `pywatershed` docs! -Browse the API reference, developer info, and index using the table of -contents on the left. +To learn more about this project, see `About `_. -| For introductory example notebooks, look in the `examples/ `_ directory in the repository. Numbered starting at 00, these are meant to be completed in order. Though no notebook outputs are saved in Github, these notebooks can easily navigated to and run in WholeTale containers (free but sign-up or log-in required): +Please browse the API reference, developer info, and +index using the table of contents on the left. + +| For introductory example notebooks, look in the `examples/ `_ directory in the repository. Numbered starting at 00, these are meant to be completed in order. Though no notebook outputs are saved in Github, these notebooks can be easily found and run in WholeTale containers (free but sign-up or log-in required): .. image:: https://raw.githubusercontent.com/whole-tale/wt-design-docs/master/badges/wholetale-explore.svg :target: https://dashboard.wholetale.org @@ -24,6 +26,12 @@ We value your feedback! To view the repository, suggest an edit to this document Thank you for your interest. +.. toctree:: + :hidden: + :caption: About + + About + .. toctree:: :hidden: :caption: API Reference diff --git a/doc/whats-new.rst b/doc/whats-new.rst index 16a5ca9c..79c90553 100644 --- a/doc/whats-new.rst +++ b/doc/whats-new.rst @@ -23,7 +23,7 @@ New features (:pull:`232`) By `James McCreight `_. - Conda feedstock for pywatershed ``_. By `Joseph Hughes `_. - + Breaking changes ~~~~~~~~~~~~~~~~ @@ -45,10 +45,15 @@ Bug fixes Documentation ~~~~~~~~~~~~~ +- Add about section for version 1.0 to describe how pywatershed matches PRMS' + NHM configuration and how to perform the comparison. + (:pull:`244`) By `James McCreight `_. Internal changes ~~~~~~~~~~~~~~~~ +- Refactor tests against PRMS for consistency, flexibility, and thoroughness. + (:pull:`244`) By `James McCreight `_. .. _whats-new.0.2.1: