From 5b18b64399d04853d4afd0988392f0d278c9ff7e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 15:05:15 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- xhydro/frequency_analysis/local.py | 14 ++++++++------ xhydro/utils.py | 6 +++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/xhydro/frequency_analysis/local.py b/xhydro/frequency_analysis/local.py index cbe80ed5..abdc12ca 100644 --- a/xhydro/frequency_analysis/local.py +++ b/xhydro/frequency_analysis/local.py @@ -1,21 +1,23 @@ -import xarray as xr -import numpy as np -import warnings import copy +import fnmatch +import warnings from typing import Union + +import numpy as np import pandas as pd -import fnmatch import scipy.stats -import xhydro as xh - +import xarray as xr from statsmodels.tools import eval_measures from xclim.indices.stats import fit, parametric_quantile +import xhydro as xh + __all__ = [ "Data", "Local", ] + class Data: def __init__(self, ds: xr.Dataset): """init function takes a dataset as input and initialize an empty diff --git a/xhydro/utils.py b/xhydro/utils.py index bdad1a75..22c2daaa 100644 --- a/xhydro/utils.py +++ b/xhydro/utils.py @@ -24,12 +24,12 @@ def get_julian_day(month, day, year=None): Examples -------- >>> import xarray as xr - >>> cehq_data_path = '/dbfs/mnt/devdlzxxkp01/datasets/xhydro/tests/cehq/zarr' + >>> cehq_data_path = "/dbfs/mnt/devdlzxxkp01/datasets/xhydro/tests/cehq/zarr" >>> ds = xr.open_zarr(cehq_data_path, consolidated=True) >>> donnees = Data(ds) - >>> jj = donnees.get_julian_day(month = 9, day = 1) + >>> jj = donnees.get_julian_day(month=9, day=1) >>> jj: 244 - >>> jj = donnees.get_julian_day(month = 9, day = 1, year = 2000) + >>> jj = donnees.get_julian_day(month=9, day=1, year=2000) >>> jj: 245 """ if year is None: