Skip to content

v2.2.0

Choose a tag to compare

@awickert awickert released this 05 May 15:15
· 231 commits to master since this release

Documentation

  • Launched full Sphinx documentation site on ReadTheDocs, including model description, configuration reference, API reference, and bibliography
  • Added NumPy-style docstrings to all public methods and classes
  • Expanded README with installation instructions, quick-start example, data format description, and model overview
  • Added CONTRIBUTING.md with bug-reporting guidelines, code-contribution workflow, and style conventions

Bug fixes

  • Fixed AttributeError when accessing self.snowpack on runs without a temperature column; snowpack operations are now guarded by self.has_snowpack throughout
  • Fixed spin-up restart resetting to index 0 instead of self.hydrodata.index[0], which produced wrong results when the DataFrame index did not start at zero
  • Fixed check_mass_balance() raising TypeError when called with time_step=None; now correctly defaults to the full record
  • Fixed loop-variable leakage in update() where self.H_deficit was set from self.reservoirs[i] using a post-loop i; now uses self.reservoirs[-1]
  • Fixed groupby().mean() FutureWarning in recent Pandas by passing numeric_only=True
  • Fixed t_efold <= 0 validation (previously only caught negative values, not zero, which caused division by zero)

Packaging and infrastructure

  • Replaced setup.py / setup.cfg with pyproject.toml (PEP 517/621)
  • Replaced manual PyPI upload scripts with GitHub Actions using Trusted Publishers (OIDC — no stored API tokens)
  • Added build-check.yml workflow to validate the distribution on every push and pull request
  • Added dependabot.yml for automated dependency and Actions version updates

Code quality

  • Removed dead code: unused instance attributes, unreachable methods, stale commented-out blocks
  • Removed development-era comments and inline to-do notes from public-facing code
  • Applied PEP 8 style fixes throughout (spacing, parentheses, naming)
  • Reorganized Cannon River example into examples/cannon_river/
  • Fixed Chang et al. (2019) citation with verified title and DOI