Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indicators as a module #226

Merged
merged 3 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Breaking changes
* The `xhydro` testing utilities now require `pytest-xdist` as a development dependency. (:pull:`212`).
* Many core dependencies have been updated to more modern versions. (:pull:`218`).
* The `delta_type` argument in ``xhydro.cc.sampled_indicators`` has been renamed to `delta_kind` and is no longer positional. (:pull:`220`).
* The ``xhydro.pmp`` module has been moved to ``xhydro.indicators.pmp``. (:pull:`226`).

Internal changes
^^^^^^^^^^^^^^^^
Expand All @@ -31,6 +32,7 @@ Internal changes
* Several tests reliant on online servers and services have been marked as `online` to prevent them from running in contexts where internet access is limited. (:pull:`212`).
* Many function docstrings and type hints have been updated for accuracy and precision. (:pull:`212`).
* The `xHydro` project now has a set of logos for use in documentation, the readme, and other materials. (:pull:`217`).
* ``xhydro.indicators`` is now a package with submodules for different types of indicators. Previous functions have been moved to a `generic` submodule and are imported at the top level for backwards compatibility. (:pull:`226`).

v0.4.0 (2024-10-04)
-------------------
Expand Down
6 changes: 3 additions & 3 deletions docs/notebooks/pmp.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"import numpy as np\n",
"import xarray as xr\n",
"\n",
"from xhydro import pmp\n",
"from xhydro.indicators import pmp\n",
"from xhydro.testing.helpers import deveraux"
]
},
Expand Down Expand Up @@ -433,9 +433,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.4"
"version": "3.12.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
7 changes: 7 additions & 0 deletions src/xhydro/indicators/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""Indicators submodule."""

# Import the submodules
from . import generic, pmp

# Specific top-level functions
from .generic import *
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/test_PMP.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import xarray as xr
from pint.errors import DimensionalityError

from xhydro import pmp
from xhydro.indicators import pmp


class TestPMP:
Expand Down