Skip to content

Commit

Permalink
Documentation of PRMS comparisons for release; minor test cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
jmccreight committed Oct 23, 2023
1 parent 8471e2e commit 86df79f
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 17 deletions.
3 changes: 0 additions & 3 deletions autotest/test_prms_atmosphere.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
from warnings import warn

import numpy as np
import pytest

from pywatershed.atmosphere.prms_atmosphere import PRMSAtmosphere
Expand Down
2 changes: 1 addition & 1 deletion autotest/test_prms_runoff.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions autotest/test_prms_snow.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 1 addition & 3 deletions autotest/test_prms_solar_geom.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import numpy as np
import pytest

from pywatershed.atmosphere.prms_solar_geometry import PRMSSolarGeometry
Expand All @@ -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")

Expand Down
5 changes: 2 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
Expand Down
16 changes: 12 additions & 4 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <about.html>`_.

| For introductory example notebooks, look in the `examples/ <https://github.com/EC-USGS/pywatershed/tree/main/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/ <https://github.com/EC-USGS/pywatershed/tree/main/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
Expand All @@ -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 <about.rst>

.. toctree::
:hidden:
:caption: API Reference
Expand Down
7 changes: 6 additions & 1 deletion doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ New features
(:pull:`232`) By `James McCreight <https://github.com/jmccreight>`_.
- Conda feedstock for pywatershed `<https://github.com/conda-forge/staged-recipes/pull/23428>`_.
By `Joseph Hughes <https://github.com/jdhughes-usgs>`_.


Breaking changes
~~~~~~~~~~~~~~~~
Expand All @@ -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 <https://github.com/jmccreight>`_.


Internal changes
~~~~~~~~~~~~~~~~
- Refactor tests against PRMS for consistency, flexibility, and thoroughness.
(:pull:`244`) By `James McCreight <https://github.com/jmccreight>`_.


.. _whats-new.0.2.1:
Expand Down

0 comments on commit 86df79f

Please sign in to comment.