Skip to content

Commit c6a7118

Browse files
committed
Bump version; Update ReadMe+Env
also addresses #35 (git tracking Jupyter notebooks). The new conda environment substantially improves over the previous version, with a more consolidated HDF5 version (1.10.6) and upgrading JupyterLab to v3.
1 parent cad6315 commit c6a7118

File tree

4 files changed

+52
-45
lines changed

4 files changed

+52
-45
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Treat Jupyter notebook JSON files as binary
2-
*.ipynb binary
2+
# *.ipynb binary

HSP2/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
from HSP2.mainDoE import main as mainDoE
88
from HSP2.utilities import versions, flowtype
99

10-
__version__ = '0.9.1' # Water Quality modules (0.9.0) plus new readWDM by block/group
10+
__version__ = '0.9.2' # This version improves HSP2 output matching with HSPF

README.md

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# HSP2, Hydrologic Simulation Program Python (HSPsquared)
22

33
HSPsquared or HSP2 is a Python version of [Hydrological Simulation Program - FORTRAN (HSPF)](https://www.epa.gov/ceam/hydrological-simulation-program-fortran-hspf).
4-
Currently it supports the major hydrology modules, and water quality modules are
5-
being developed.
4+
HSP2 currently supports all HSPF hydrology modules and major water quality modules. Support for specialty modules is currently in progress. See our [Release Notes](https://github.com/respec/HSPsquared/releases) for up-to-date details.
65

76
Read our wiki for more information on our motivation and goals for HSP2:
87
- [Wiki Home & HSP2 Goals](https://github.com/respec/HSPsquared/wiki)
@@ -11,34 +10,25 @@ Read our wiki for more information on our motivation and goals for HSP2:
1110

1211
[Project slides (January 2017)](https://github.com/respec/HSPsquared/blob/archivePy2/Why%20HSP2%20(EAA).pdf) also provide helpful background.
1312

14-
HSPsquared is copyrighted 2020 by RESPEC and released under the GNU Affero General
15-
Public License.
16-
17-
18-
**ANNOUNCEMENT**
19-
20-
HSP2 code has been updated to Python 3 in April 2020. Legacy Python 2 code is available in our [`archivePy2`](https://github.com/respec/HSPsquared/tree/archivePy2) branch.
13+
HSPsquared is copyrighted 2020 by RESPEC and released under the GNU Affero General Public License.
2114

2215

2316
## Repository Directories
2417

25-
**[HSP2](HSP2)** contains the hydrology codes converted from HSPF and the main programs
26-
to run HSP2.
18+
**[HSP2](HSP2)** contains the hydrology and water quality code modules converted from HSPF, along with the main programs to run HSP2.
2719

2820
**[HSP2notebooks](HSP2notebooks)** contains tutorials and useful Juptyer Notebooks.
2921

30-
**[HSP2tools](HSP2tools)** contains supporting software modules such as the code to convert
31-
legacy WDM and UCI files to HDF5 files for HSP2, and to provide additional new
32-
and legacy capabilities.
22+
**[HSP2tools](HSP2tools)** contains supporting software modules such as the code to convert legacy WDM and UCI files to HDF5 files for HSP2, and to provide additional new and legacy capabilities.
3323

34-
**[docs](docs)** contains relevant reference documentation.
24+
**[docs](docs)** contains relevant reference documentation.
3525

3626
**[tests](tests)** contains unit testing code for testing code conversion (`tests/convert/conversion_test.py`) and code performance.
3727

3828

39-
## Installation Instructions
29+
## Installation
4030

41-
HSP2 is designed to work with Python 3.6, 3.7 and 3.8.
31+
HSP2 is designed to work with Python >3.6 (since April 2020). We **recommend Python 3.8**. Legacy Python 2 code is available in our [`archivePy2`](https://github.com/respec/HSPsquared/tree/archivePy2) branch.
4232

4333
Follow these steps to install.
4434

@@ -57,28 +47,24 @@ Place your copy of the HSPsquared folder in any convenient location on your comp
5747
Although HSP2 can be run from the default `base` environment created by Anaconda,
5848
it can be helpful to create a leaner custom environment.
5949

60-
We have provided an [`environment.yml`](environment.yml) file, which lists all primary dependencies, to help. Create a `hsp2_py38` environment either with the **Import** button on [Anaconda Navigator's Environments tab](https://docs.anaconda.com/anaconda/navigator/overview/#environments-tab), or use this [Conda](https://conda.io/docs/) command in your terminal or console, replacing `path/environment.yml` with the full file pathway to the `environment.yml` file in the local cloned repository.
50+
We have provided an [`environment.yml`](environment.yml) file, which lists all primary dependencies, to help. Create a `hsp2_py38` environment either with the **Import** button on [Anaconda Navigator's Environments tab](https://docs.anaconda.com/anaconda/navigator/overview/#environments-tab), or use this [Conda](https://conda.io/docs/) command in your terminal or console, replacing `path/environment.yml` with the full file pathway to the `environment.yml` file in the local cloned repository.
6151

62-
```console
52+
```shell
6353
conda env create --file path/environment.yml
6454
```
6555
To update your environment, either use Anaconda Navigator, or run the following command:
6656

67-
```console
57+
```shell
6858
conda env update --file path/environment.yml --prune
6959
```
7060

7161
or
7262

73-
```console
63+
```shell
7464
conda env create --file path/environment.yml --force
7565
```
76-
NOTE 1: The [`environment_dev.yml`](environment_dev.yml) file provides an alternate environment that provides additional capabilities and newer libraries useful to the development team. It is tested to also work with the current HSP2 codebase and will likely serve as a preview of future updates to [`environment.yml`](environment.yml).
7766

78-
NOTE 2: We recommend using [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/) to run our tutorial [Juptyer](https://jupyter.org/index.html) Notebooks in the [HSP2notebooks](HSP2notebooks/) folder. The following JupyterLab [extensions](https://jupyterlab.readthedocs.io/en/stable/user/extensions.html) are useful (but not required):
79-
+ [jupyter-matplotlib](https://github.com/matplotlib/ipympl), an interactive widget.
80-
+ [`jupyterlab/toc`](https://github.com/jupyterlab/jupyterlab-toc), Table of Contents.
81-
+ [qgrid2](https://github.com/quantopian/qgrid), for interactive sorting, filtering, and editing DataFrames
67+
NOTE: The [`environment_dev.yml`](environment_dev.yml) file provides an alternate environment that provides additional capabilities and newer libraries useful to the development team. It is tested to also work with the current HSP2 codebase and will likely serve as a preview of future updates to [`environment.yml`](environment.yml).
8268

8369

8470
#### 4. Add your HSPsquared Path to Anaconda sites-packages
@@ -97,4 +83,7 @@ You should now be able to run the Tutorials and create your own Jupyter Notebook
9783

9884
## Getting Started
9985

100-
We recommend looking over our [Understanding HSP2 Tutorial](HSP2notebooks/Tutorial1.md) then viewing or interactively running our [Introduction to HSP2 notebook](HSP2notebooks/Introduction.ipynb).
86+
We recommend looking over our [Understanding HSP2 Tutorial](HSP2notebooks/Tutorial1.md) then viewing or interactively running our [Introduction to HSP2 notebook](HSP2notebooks/Introduction.ipynb) Jupyter Notebook.
87+
88+
We recommend using [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/) to run our tutorial [Juptyer Notebooks](https://jupyter.org/index.html) in the [HSP2notebooks](HSP2notebooks/) folder, due to many additional built-in features and extensions. The following JupyterLab [extensions](https://jupyterlab.readthedocs.io/en/stable/user/extensions.html) are particularly useful:
89+
- [lckr-jupyterlab-variableinspector](https://github.com/lckr/jupyterlab-variableInspector)

environment.yml

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,45 @@
1-
name: hsp2_py38
1+
name: hsp2_py38_dev
22
channels:
3-
- defaults
43
- conda-forge
5-
# - https://conda.anaconda.org/conda-forge
4+
- nodefaults
5+
66
dependencies:
77
# Running HSP2
8-
- python =3.8
8+
- python =3.8*
9+
- scipy # Scipy also installs numpy
10+
- pandas # Pandas installs most scientific Python modules, such as Numpy, etc.
911
- numba
10-
- numpy
11-
- pandas =1.1.* # To keep stable
12-
- pytables
13-
- h5py # Installed v2.10.0 and HDF5 v1.10.4
14-
- networkx
15-
# Interacting with HSP2
16-
- jupyterlab =2.* # To keep stable
12+
- pytables >=3.6.1 # Installs HDF5 v1.10.6
13+
- h5py >=3.1 # Installs HDF5 v1.10.6
14+
- dask
15+
- networkx # used in HSP2tools/graph.py.
16+
17+
# Interactivity & Visualization
18+
- jupyterlab >=3.0.12
19+
- ipywidgets
20+
# - texlive-core # to export notebooks to PDF. https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex
1721
- matplotlib
22+
23+
# Dev tools (optional)
24+
# - python-language-server
25+
- jupyter-lsp-python # Includes both the server extension (jupyter-lsp) and pyls third-party server (python-language-server)
26+
- jupyterlab-lsp # Docs at https://github.com/krassowski/jupyterlab-lsp
27+
1828
# package management
1929
- conda
2030
- conda-build
31+
2132
# Optional extension dependencies for JupyterLab
22-
- nodejs # required for many extensions
23-
- ipympl # jupyter-matplotlib, https://github.com/matplotlib/ipympl
24-
- qgrid # https://github.com/quantopian/qgrid
25-
- pip # first install as many requirements as possible with conda. https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#using-pip-in-an-environment
33+
# - nodejs # required for many extensions
34+
# - ipympl # jupyter-matplotlib, https://github.com/matplotlib/ipympl
35+
# - qgrid # https://github.com/quantopian/qgrid
36+
37+
# PIP install requirements only if it is not possible with conda
38+
# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#using-pip-in-an-environment
39+
- pip
2640
- pip:
27-
- jupyterlab_hdf # https://github.com/jupyterlab/jupyterlab-hdf5
41+
- lckr-jupyterlab-variableinspector # https://github.com/lckr/jupyterlab-variableInspector
42+
# jupyterlab_hdf is not yet compatible with jupyterlab >3.0, but it will soon.
43+
# See https://github.com/jupyterlab/jupyterlab-hdf5/issues/42#issuecomment-801786628
44+
# - jupyterlab_hdf # https://github.com/jupyterlab/jupyterlab-hdf5
45+
# - hdf5plugin # https://github.com/jupyterlab/jupyterlab-hdf5#compression-filters

0 commit comments

Comments
 (0)