Skip to content

Commit

Permalink
Bugfix release v0.23.1 (#517)
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulcollenteur committed Feb 2, 2023
2 parents b7c66ba + 0779b76 commit 2bbc91e
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 21 deletions.
1 change: 1 addition & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@

# -- Generating references and publications lists -------------------------


# support Round brackets
def bracket_style() -> BracketStyle:
return BracketStyle(
Expand Down
2 changes: 1 addition & 1 deletion pastas/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def _model_tmin_tmax(
tmin: Optional[TimestampType] = None,
tmax: Optional[TimestampType] = None,
*args,
**kwargs
**kwargs,
):
if tmin is None:
tmin = self.ml.settings["tmin"]
Expand Down
1 change: 0 additions & 1 deletion pastas/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ def __init__(
metadata: Optional[dict] = None,
freq: str = "D",
) -> None:

self.logger = getLogger(__name__)

# Construct the different model components
Expand Down
1 change: 0 additions & 1 deletion pastas/modelplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,6 @@ def custom_sort(t):

# loop over axes showing stressmodel contributions
for i, sm in zip(range(3, 3 + 2 * nsm, 2), self.ml.stressmodels.keys()):

# Get the contributions for StressModels with multiple stresses
contributions = []
sml = self.ml.stressmodels[sm]
Expand Down
16 changes: 8 additions & 8 deletions pastas/modelstats.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def rmse(
tmin: Optional[TimestampType] = None,
tmax: Optional[TimestampType] = None,
weighted: bool = False,
**kwargs
**kwargs,
) -> float:
"""Root mean squared error of the residuals.
Expand All @@ -104,7 +104,7 @@ def rmsn(
tmin: Optional[TimestampType] = None,
tmax: Optional[TimestampType] = None,
weighted: bool = False,
**kwargs
**kwargs,
) -> float:
"""Root mean squared error of the noise.
Expand Down Expand Up @@ -155,7 +155,7 @@ def mae(
tmin: Optional[TimestampType] = None,
tmax: Optional[TimestampType] = None,
weighted: bool = False,
**kwargs
**kwargs,
) -> float:
"""Mean Absolute Error (MAE) of the residuals.
Expand All @@ -180,7 +180,7 @@ def nse(
tmin: Optional[TimestampType] = None,
tmax: Optional[TimestampType] = None,
weighted: bool = False,
**kwargs
**kwargs,
) -> float:
"""Nash-Sutcliffe coefficient for model fit .
Expand All @@ -206,7 +206,7 @@ def pearsonr(
tmin: Optional[TimestampType] = None,
tmax: Optional[TimestampType] = None,
weighted: bool = False,
**kwargs
**kwargs,
) -> float:
"""Compute the (weighted) Pearson correlation (r).
Expand All @@ -232,7 +232,7 @@ def evp(
tmin: Optional[TimestampType] = None,
tmax: Optional[TimestampType] = None,
weighted: bool = False,
**kwargs
**kwargs,
) -> float:
"""Explained variance percentage.
Expand All @@ -258,7 +258,7 @@ def rsq(
tmin: Optional[TimestampType] = None,
tmax: Optional[TimestampType] = None,
weighted: bool = False,
**kwargs
**kwargs,
) -> float:
"""R-squared.
Expand All @@ -284,7 +284,7 @@ def kge_2012(
tmin: Optional[TimestampType] = None,
tmax: Optional[TimestampType] = None,
weighted: bool = False,
**kwargs
**kwargs,
) -> float:
"""Kling-Gupta Efficiency.
Expand Down
1 change: 0 additions & 1 deletion pastas/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,6 @@ def __init__(
tmax: Optional[TimestampType] = None,
update_iter: Optional[int] = None,
) -> None:

logger.warning(
"TrackSolve feature under development. If you find any bugs please post "
"an issue on GitHub: https://github.com/pastas/pastas/issues"
Expand Down
8 changes: 4 additions & 4 deletions pastas/recharge.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def simulate(
p: ArrayLike,
dt: float = 1.0,
return_full: bool = False,
**kwargs
**kwargs,
) -> ArrayLike:
"""Simulate the soil water balance model.
Expand Down Expand Up @@ -498,7 +498,7 @@ def get_water_balance(
temp: ArrayLike,
p: ArrayLike,
dt: float = 1.0,
**kwargs
**kwargs,
) -> DataFrame:
data = self.simulate(
prec=prec, evap=evap, temp=temp, p=p, dt=dt, return_full=True, **kwargs
Expand Down Expand Up @@ -611,7 +611,7 @@ def simulate(
p: ArrayLike,
dt: ArrayLike = 1.0,
return_full: bool = False,
**kwargs
**kwargs,
) -> Union[ArrayLike, Tuple[ArrayLike, ArrayLike, ArrayLike, ArrayLike]]:
"""Simulate the recharge flux.
Expand Down Expand Up @@ -760,7 +760,7 @@ def simulate(
p: ArrayLike,
dt: float = 1.0,
return_full: bool = False,
**kwargs
**kwargs,
) -> Union[ArrayLike, Tuple[ArrayLike, ArrayLike, ArrayLike, ArrayLike]]:
"""Simulate the recharge flux.
Expand Down
2 changes: 0 additions & 2 deletions pastas/rfunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,6 @@ def step(
cutoff: Optional[float] = None,
maxtmax: Optional[int] = None,
) -> ArrayLike:

# Because Model.get_response_tmax() provides parameters for the stressmodel,
# not only the response functions
if len(p) > 4:
Expand All @@ -1293,7 +1292,6 @@ def step(
return s

else:

t1 = -np.sqrt(3 / 5)
t2 = 0
t3 = np.sqrt(3 / 5)
Expand Down
1 change: 0 additions & 1 deletion pastas/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,6 @@ def solve(
method: Optional[str] = "leastsq",
**kwargs,
) -> Tuple[bool, ArrayLike, ArrayLike]:

# Deal with the parameters
parameters = lmfit.Parameters()
p = self.ml.parameters.loc[:, ["initial", "pmin", "pmax", "vary"]]
Expand Down
2 changes: 1 addition & 1 deletion pastas/stressmodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ def __init__(

distances = np.sort(distances)

if settings is None or isinstance(settings, str):
if settings is None or isinstance(settings, str) or isinstance(settings, dict):
settings = len(stress) * [settings]

# convert stresses to TimeSeries if necessary
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pastas"
version = "0.23.0"
version = "0.23.1"
description = "Pastas is an open-source Python framework for the analysis of groundwater time series."
license = { file = "LICENSE" }
readme = "README.rst"
Expand Down

0 comments on commit 2bbc91e

Please sign in to comment.