diff --git a/.cruft.json b/.cruft.json index 47019da9..b4ff638c 100644 --- a/.cruft.json +++ b/.cruft.json @@ -10,7 +10,7 @@ "project_slug": "ravenpy", "project_short_description": "A Python wrapper to setup and run the hydrologic modelling framework Raven.", "pypi_username": "CSHS-CWRA", - "version": "0.3.1", + "version": "0.4.0", "use_pytest": "y", "use_pypi_deployment_with_travis": "y", "add_pyup_badge": "y", diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6dc19c95..161612f1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -70,4 +70,4 @@ jobs: source activate ravenpy-env pip install -e ".[dev]" git clone https://github.com/Ouranosinc/raven-testdata $GITHUB_WORKSPACE/raven-testdata - env RAVENPY_TESTDATA_PATH=$GITHUB_WORKSPACE/raven-testdata pytest --cov --color=yes ravenpy + env RAVENPY_TESTDATA_PATH=$GITHUB_WORKSPACE/raven-testdata pytest --cov ravenpy diff --git a/HISTORY.rst b/HISTORY.rst index 45cd4e58..e0526366 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,23 @@ History ======= +0.4.0 +----- + +This is an interim version making one step toward semi-distributed +modeling support. Model configuration is still in flux and will be +significantly modified with 0.5. The major change in this version is +that model configuration supports passing multiple HRU objects, +instead of simply passing area, latitude, longitude and elevation for +a single HRU. + +* GR4JCN emulator now supports routing mode. +* Add BLENDED model emulator. +* DAP links for forcing files are now supported. +* Added support for `tox`-based localized installation and testing with python-pip. +* Now supporting Python 3.7, 3.8, and 3.9. +* Build testing for `pip` and `conda`-based builds with GitHub CI. + 0.3.1 ----- diff --git a/ravenpy/__version__.py b/ravenpy/__version__.py index 465ecea0..74a24e22 100644 --- a/ravenpy/__version__.py +++ b/ravenpy/__version__.py @@ -6,4 +6,4 @@ __author__ = """David Huard""" __email__ = "huard.david@ouranos.ca" -__version__ = "0.3.1" +__version__ = "0.4.0" diff --git a/ravenpy/models/base.py b/ravenpy/models/base.py index 4d5613f0..71a475b0 100644 --- a/ravenpy/models/base.py +++ b/ravenpy/models/base.py @@ -104,7 +104,7 @@ def __init__(self, workdir: Union[str, Path] = None): self.rvi = RV() self.rvp = RV() self.rvc = RV() - self.rvt = RVT() + self.rvt = RV() self.rvh = RV() self.rvd = RV() # rvd is for derived parameters @@ -461,13 +461,14 @@ def run(self, ts, overwrite=False, **kwds): self.assign(key, val[self.psim]) # Forcing commands - self.rvt.update( - ncdata.extract( - rvh=self.rvh, - rvt=self.rvt, - nc_index=pdict["nc_index"][self.psim], + if isinstance(self.rvt, RVT): + self.rvt.update( + ncdata.extract( + rvh=self.rvh, + rvt=self.rvt, + nc_index=pdict["nc_index"][self.psim], + ) ) - ) cmd = self.setup_model_run(tuple(map(Path, ts))) diff --git a/setup.cfg b/setup.cfg index dd6c2afb..dfbbf271 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.3.1 +current_version = 0.4.0 commit = False tag = False diff --git a/setup.py b/setup.py index b5a73159..284a5da1 100644 --- a/setup.py +++ b/setup.py @@ -235,7 +235,7 @@ def run(self): gis=gis_requirements, ), url="https://github.com/CSHS-CWRA/ravenpy", - version="0.3.1", + version="0.4.0", zip_safe=False, cmdclass={ "install": create_external_deps_install_class(install),