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

First draft of stationary extreme value analysis module #175

Merged
merged 176 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
ae79690
First proof-of-concept version of Extremes.jl wrapper, attempt no4 at…
Sci-pio May 14, 2024
d7b362e
Simplified parameterestimation subpackage structure, created working …
Sci-pio May 22, 2024
a6c92eb
Modifications to multiple-dispatch structure for maximumikelihood par…
Sci-pio May 23, 2024
2e03d12
Conversions of pandas dataframes <-> julia dataframes and modificatio…
Sci-pio May 24, 2024
8fd2737
Added many conversion rules between julia and python objects
Sci-pio May 29, 2024
019c12f
Added xarray.DataArray <-> Julia DataFrame conversion
Sci-pio May 31, 2024
9f66744
Reverting hotfix for xclim, xscen version and adding juliacall to env…
Sci-pio May 31, 2024
b337278
Fixed python BlockMaxima <-> julia BlockMaxima conversions + simplifi…
Sci-pio Jun 4, 2024
77105d7
Added some utility functions for AbstractFittedExtremeValueModel
Sci-pio Jun 4, 2024
a911f35
Utility functions for fitted models + standardized cluster.py in acco…
Sci-pio Jun 5, 2024
2e88e6f
First attempt at overall fit() function for extremes values analysis
Sci-pio Jun 7, 2024
0c82f11
Fixed imports + added global fit() in extreme_value_analysis with sim…
Sci-pio Jun 12, 2024
7aa9391
Debugging bayesian and maximumlikelihood estimations
Sci-pio Jun 20, 2024
79c52f2
modifying parameterestimation to directly return parameters
Sci-pio Jun 21, 2024
ea1060b
Tests for extreme_value_analysis stationary fitting
Sci-pio Jun 27, 2024
efb3967
Using getattr() to get the parameters from the fitted model instead o…
Sci-pio Jun 28, 2024
d77032e
Changing bayesien estimation to do average over simulations. Diff is …
Sci-pio Jul 4, 2024
aa51985
Changing package name to xhydro-temp for deployment testing to avoid …
Sci-pio Jul 5, 2024
2cae630
changing julia dependancy loading and pruning unnecessary code
Sci-pio Jul 10, 2024
8edad23
Preparing for merge with main
Sci-pio Jul 18, 2024
47c3a53
Cleaning notebooks
Sci-pio Jul 18, 2024
ea972e6
Renamed package to xhydro
Sci-pio Jul 18, 2024
31a22f4
Fixing merge conflict with main
Sci-pio Jul 18, 2024
26ff54b
Removed duplicate of xhydro created during main -> extreme_value_anal…
Sci-pio Jul 19, 2024
de151c5
hotfix for the .yaml pre-commit checks that fail on windows because o…
Sci-pio Jul 19, 2024
14087a9
Merge branch 'main' into extremes-wrapper
Sci-pio Jul 22, 2024
36888c4
Linting fix part 2
Sci-pio Jul 22, 2024
181c40e
Adding pyjuliacall to dependencies for PR pipeline
Sci-pio Jul 22, 2024
7c86a58
Small static code fixes
Sci-pio Jul 23, 2024
334a032
Merge branch 'main' into extremes-wrapper
Zeitsperre Jul 23, 2024
3bdb6ee
Merge 'main' into 'extremes-wrapper'
Sci-pio Jul 23, 2024
41f80b8
Fixing new line lint errors
Sci-pio Jul 23, 2024
04dcd85
Adding author, deleting unecessary file and rerunning tests on github
Sci-pio Jul 23, 2024
9efe4a9
Modifying test tolerance for genpareto distribution
Sci-pio Jul 24, 2024
cc460f1
Adding extreme_value_analysis.ipynb to index.rst
Sci-pio Jul 24, 2024
73eca82
First draft of non-stationary parameter estimation. Code unclean for now
Sci-pio Aug 1, 2024
138b1bb
Adding control over confidence level for parameters + updating docume…
Sci-pio Aug 1, 2024
4a2b8bc
Merge branch 'main' into extremes-wrapper
Zeitsperre Aug 7, 2024
35931ac
docstring cleanup
Zeitsperre Aug 7, 2024
07a3ec8
add import warning
Zeitsperre Aug 7, 2024
f1ab0d9
wip - configure pooch
Zeitsperre Aug 7, 2024
21e1f7a
Try/catch mechanism to return NANs when julia error occurs
Sci-pio Aug 8, 2024
baff763
WIP - simplify testing data management, integrate pytest-xdist support
Zeitsperre Aug 8, 2024
fbe1b38
configure testing data for extremes
Zeitsperre Aug 9, 2024
b8dfe71
update numpydoc
Zeitsperre Aug 9, 2024
f066fe1
address warnings
Zeitsperre Aug 9, 2024
0f91d9e
fix pooch creation
Zeitsperre Aug 9, 2024
3218d55
add xfail on CI, add pooch intersphinx mapping
Zeitsperre Aug 9, 2024
c3d8f65
use autodoc mock, pin some dependencies, add _data folder to .gitignore
Zeitsperre Aug 9, 2024
5cf5b5c
update warnings, update stackstac version
Zeitsperre Aug 12, 2024
f100bc0
update numpy type
Zeitsperre Aug 12, 2024
6aa31d4
add julia and non-julia builds, fix stackstac call
Zeitsperre Aug 12, 2024
f2653d4
Merge branch 'main' into extremes-wrapper
Zeitsperre Aug 12, 2024
2d96d52
add exception handling for notebook
Zeitsperre Aug 12, 2024
b218ce2
Linting fix part 2
Sci-pio Aug 15, 2024
0917add
Updating test_extremes
Sci-pio Aug 15, 2024
f2f969b
added return_level analysis
Sci-pio Aug 22, 2024
1b28b64
Some finishing touches to the return level functionnality before leav…
Sci-pio Aug 23, 2024
1325483
merge main changes, refactor textdata fetching logic
Zeitsperre Oct 8, 2024
44e2f11
add missing os keys
Zeitsperre Oct 8, 2024
2dfae38
minor adjustments
Zeitsperre Oct 8, 2024
0de7ac2
merge main
Zeitsperre Oct 22, 2024
e28a457
Merge remote-tracking branch 'origin/extremes-wrapper' into nonstatio…
ospinajulian Oct 23, 2024
14736c7
testing the PR view does not show recent commits of a merge
ospinajulian Oct 23, 2024
f47a744
Deleting the test
ospinajulian Oct 23, 2024
799dbe0
Added support for Pareto and multiple changes to compute all the para…
ospinajulian Oct 25, 2024
f72f9ad
return levels and fit works for all the distr and methods
ospinajulian Oct 26, 2024
920e964
An undefined parameter was deleted
ospinajulian Oct 26, 2024
514a41b
Bayes method was added to return levele estimation function
ospinajulian Oct 28, 2024
ac6e8e1
Return NaN in the right position when using return_level
ospinajulian Oct 29, 2024
4f357ab
Mask values in the fit data where covariates contain NaN entries
ospinajulian Oct 29, 2024
e9e7a15
Merge branch 'main' into nonstationary_extreme_value_analysis
ospinajulian Oct 29, 2024
760a830
return_level parallelization
ospinajulian Oct 31, 2024
3215d35
fit parallelized
ospinajulian Oct 31, 2024
cfe350a
Adjusted GEV functions to return -shape for consistency with xclim
ospinajulian Nov 1, 2024
8f4a79f
runtimewarning to userwarning and sanity check for nparam > len(data)
ospinajulian Nov 4, 2024
18509eb
Merge branch 'main' into extremes-wrapper
ospinajulian Nov 4, 2024
35538d5
First draft of non-stationary parameter estimation. Code unclean for now
Sci-pio Aug 1, 2024
b7758dc
Adding control over confidence level for parameters + updating docume…
Sci-pio Aug 1, 2024
59d85f1
Try/catch mechanism to return NANs when julia error occurs
Sci-pio Aug 8, 2024
0d3c2f9
Linting fix part 2
Sci-pio Aug 15, 2024
0c10b42
added return_level analysis
Sci-pio Aug 22, 2024
8d8ebed
Some finishing touches to the return level functionnality before leav…
Sci-pio Aug 23, 2024
bb52f4e
testing the PR view does not show recent commits of a merge
ospinajulian Oct 23, 2024
2baee6a
Deleting the test
ospinajulian Oct 23, 2024
8e9bdc1
Added support for Pareto and multiple changes to compute all the para…
ospinajulian Oct 25, 2024
465e6a3
return levels and fit works for all the distr and methods
ospinajulian Oct 26, 2024
c9e645a
An undefined parameter was deleted
ospinajulian Oct 26, 2024
e8b972c
Bayes method was added to return levele estimation function
ospinajulian Oct 28, 2024
bd77d56
Return NaN in the right position when using return_level
ospinajulian Oct 29, 2024
445078e
Mask values in the fit data where covariates contain NaN entries
ospinajulian Oct 29, 2024
9b66496
return_level parallelization
ospinajulian Oct 31, 2024
e64df54
fit parallelized
ospinajulian Oct 31, 2024
d72201d
Adjusted GEV functions to return -shape for consistency with xclim
ospinajulian Nov 1, 2024
15dd9f3
runtimewarning to userwarning and sanity check for nparam > len(data)
ospinajulian Nov 4, 2024
edb3e7b
Merge branch 'nonstationary_extreme_value_analysis_copy' of https://g…
ospinajulian Nov 4, 2024
7b122f8
test
ospinajulian Nov 4, 2024
848af1d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 4, 2024
79093c1
All the fit functions were combine in extremefit_param and extremefit…
ospinajulian Nov 8, 2024
8ed8536
Added unit tests
ospinajulian Nov 12, 2024
5730c25
attrs were modified
ospinajulian Nov 12, 2024
1c9d17a
_fit_model was wadded to be used in fit() and return_level()
ospinajulian Nov 18, 2024
659d4db
Merge branch 'main' into extremes-wrapper
ospinajulian Nov 18, 2024
a375c25
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 18, 2024
ae29253
Added @pytest.mark.skipif() to the test when julia is not find
ospinajulian Nov 19, 2024
53bccc2
@pytest.mark.skipif() was deleted from the tests
ospinajulian Nov 19, 2024
5f40da7
add juliacall >=0.9.23
ospinajulian Nov 19, 2024
21c6c12
juliacall in pyptoject.toml
ospinajulian Nov 19, 2024
b47f980
juliacall >=0.9.20
ospinajulian Nov 19, 2024
98a303d
pyjuliacall >=0.9.20
ospinajulian Nov 19, 2024
e279de6
Change the use of locals() for a dictionary to avoid problems in the …
ospinajulian Nov 19, 2024
be920d1
The notebook was executed again
ospinajulian Nov 19, 2024
bd9f2fd
exclude extreme_value_analysis.ipynb
ospinajulian Nov 20, 2024
bdda84f
Merge branch 'main' into extremes-wrapper
ospinajulian Nov 20, 2024
7e193c0
Merge branch 'main' into extremes-wrapper
ospinajulian Nov 29, 2024
ee49f8c
Update environment-dev.yml
ospinajulian Dec 5, 2024
4bfca73
Revert change in hydrological_modelling.ipynb
ospinajulian Dec 5, 2024
d15ff03
eau_precpitable_CanESM5 was deleted
ospinajulian Dec 5, 2024
26fef86
Merge branch 'main' into extremes-wrapper
ospinajulian Dec 5, 2024
ed221ba
Removed unused code lines
ospinajulian Dec 5, 2024
ea1be16
Merge branch 'extremes-wrapper' of https://github.com/hydrologie/xhyd…
ospinajulian Dec 5, 2024
2fede13
Trigger tests
ospinajulian Dec 6, 2024
a53ca94
docstring into a raw docstring create_nan_mask()
ospinajulian Dec 6, 2024
630ec56
\ in create_nan_mask() to solve inline emphasis docs problem
ospinajulian Dec 6, 2024
9dd9d90
Trigger tests
ospinajulian Dec 6, 2024
d924051
clear all outputs
ospinajulian Dec 9, 2024
f72019d
Test solve utf-8 problem
ospinajulian Dec 9, 2024
fdf397c
2nd test solve utf-8 problem
ospinajulian Dec 9, 2024
a901bb3
explicitly install julia
Zeitsperre Dec 11, 2024
5d476e4
allow connections
Zeitsperre Dec 11, 2024
b26b587
add version checks for blended model
Zeitsperre Dec 11, 2024
3fb4797
allow connections to julia packages
Zeitsperre Dec 11, 2024
3460d80
use devereaux, regenerate outputs
Zeitsperre Dec 11, 2024
c5ad72d
allow more julia connections
Zeitsperre Dec 11, 2024
53a8ad2
add suspected julia package endpoints
Zeitsperre Dec 11, 2024
7484ddd
update pre-commit, add more connections
Zeitsperre Dec 11, 2024
40bd527
try disabling julia install; not sure why this doesn't work remotely
Zeitsperre Dec 11, 2024
c14cbaa
remove julia markers and unpin micromamba version
Zeitsperre Dec 12, 2024
0ff9f33
add requires_julia mark to the tests
ospinajulian Dec 12, 2024
cce4afb
Disenabling notebook execution
ospinajulian Jan 9, 2025
4ff8b85
fixed environ variables when importern juliacall
ospinajulian Jan 9, 2025
d5cb8ed
Includes warning when working with chunks
ospinajulian Jan 10, 2025
381bb14
add workaround for sphinx-codeautolink
Zeitsperre Jan 13, 2025
1eae279
Read test data from xhydro-testdata
ospinajulian Jan 15, 2025
e1566de
remove workaround for sphinx-codeautolink
Zeitsperre Jan 20, 2025
79b38b9
pin dask
ospinajulian Jan 21, 2025
3d7560c
Merge branch 'extremes-wrapper' of https://github.com/hydrologie/xhyd…
ospinajulian Jan 21, 2025
17bdbc0
pin multiple packages
ospinajulian Jan 21, 2025
eda79c7
fixes pin
ospinajulian Jan 21, 2025
17b7aa0
Improve docstring
ospinajulian Jan 22, 2025
0edc786
Update src/xhydro/extreme_value_analysis/parameterestimation.py
ospinajulian Feb 5, 2025
a62fb89
Update src/xhydro/extreme_value_analysis/structures/util.py
ospinajulian Feb 5, 2025
5562593
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 5, 2025
6463f93
Update src/xhydro/extreme_value_analysis/structures/util.py
ospinajulian Feb 5, 2025
0ffe3f6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 5, 2025
c319c3a
Last changes proposed by Gabriel
ospinajulian Feb 5, 2025
f721372
make pyjuliacall installation optional, bypass linting error
Zeitsperre Feb 5, 2025
c44cb08
adapt workflows, notebooks, and pytest to optionally support Julia
Zeitsperre Feb 7, 2025
f12e1d6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 7, 2025
117cf4c
conditional install of pyjuliacall
Zeitsperre Feb 7, 2025
1de8f17
Update pyproject.toml
RondeauG Feb 7, 2025
c07e909
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 7, 2025
fa13ba2
Update environment-dev.yml
RondeauG Feb 7, 2025
0c9532a
Update environment.yml
RondeauG Feb 7, 2025
68e167c
Update pyproject.toml
RondeauG Feb 7, 2025
33d2572
fix formatting
Zeitsperre Feb 7, 2025
95eefd8
folder extraction fix, typing fixes
Zeitsperre Feb 7, 2025
b0a78af
remove mutable default arguments
RondeauG Feb 7, 2025
3367b76
fix test
RondeauG Feb 7, 2025
0da0c14
Merge remote-tracking branch 'origin/extremes-wrapper' into extremes-…
RondeauG Feb 7, 2025
85f5ef3
upd notebook
RondeauG Feb 7, 2025
7c80c08
docstring fixes and simplifications
Zeitsperre Feb 7, 2025
792e547
adjust test
Zeitsperre Feb 7, 2025
adae7ae
upd changelog
RondeauG Feb 7, 2025
1dcba36
Merge remote-tracking branch 'origin/extremes-wrapper' into extremes-…
RondeauG Feb 7, 2025
58cd699
more info
RondeauG Feb 7, 2025
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: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
# Public doc: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency Review'
on:
pull_request:
Expand Down
71 changes: 59 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
strategy:
matrix:
python-version:
- "3.x"
- "3.12" # FIXME: This will be adjusted in cookiecutter
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
Expand Down Expand Up @@ -92,29 +92,37 @@ jobs:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
185.125.188.54:443
185.125.188.55:443
185.125.188.58:443
185.125.188.59:443
ai4edataeuwest.blob.core.windows.net:443
api.github.com:443
cdn.proj.org:443
conda.anaconda.org:443
elevationeuwest.blob.core.windows.net:443
files.pythonhosted.org:443
github.com:443
objects.githubusercontent.com:443
pkg.julialang.org:443
planetarycomputer.microsoft.com:443
pypi.org:443
raw.githubusercontent.com:443
s3.us-east-2.wasabisys.com:443
s3.wasabisys.com:443
storage.julialang.net:443
us-east.pkg.julialang.org:443
us-west.pkg.julialang.org:443
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Conda (Micromamba) with Python${{ matrix.python-version }}
uses: mamba-org/setup-micromamba@617811f69075e3fd3ae68ca64220ad065877f246 # v2.0.0
with:
cache-downloads: true
cache-environment: false
cache-environment: true
environment-file: environment-dev.yml
create-args: >-
python=${{ matrix.python-version }}
micromamba-version: "1.5.10-0" # pinned to avoid the breaking changes with mamba and micromamba (2.0.0).
- name: Install xHydro
run: |
python -m pip install --no-deps .
Expand All @@ -127,6 +135,7 @@ jobs:
run: |
make test
env:
CI: "1"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

test-conda:
Expand All @@ -142,6 +151,11 @@ jobs:
matrix:
os: [ 'ubuntu-latest' ]
python-version: [ "3.10", "3.11", "3.12" ]
julia: [ false ]
include: # Only run the latest Python version on push
- os: 'ubuntu-latest'
python-version: "3.12"
julia: true
defaults:
run:
shell: bash -l {0}
Expand All @@ -152,31 +166,41 @@ jobs:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
185.125.188.54:443
185.125.188.55:443
185.125.188.58:443
185.125.188.59:443
ai4edataeuwest.blob.core.windows.net:443
api.github.com:443
cdn.proj.org:443
conda.anaconda.org:443
coveralls.io:443
elevationeuwest.blob.core.windows.net:443
files.pythonhosted.org:443
github.com:443
objects.githubusercontent.com:443
planetarycomputer.microsoft.com:443
pkg.julialang.org:443
pypi.org:443
raw.githubusercontent.com:443
s3.us-east-2.wasabisys.com:443
s3.wasabisys.com:443
storage.julialang.net:443
us-east.pkg.julialang.org:443
us-west.pkg.julialang.org:443
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Conda (Micromamba) with Python${{ matrix.python-version }}
uses: mamba-org/setup-micromamba@617811f69075e3fd3ae68ca64220ad065877f246 # v2.0.0
with:
cache-downloads: true
cache-environment: false
cache-environment: true
environment-file: environment-dev.yml
create-args: >-
lmoments3
python=${{ matrix.python-version }}
micromamba-version: "1.5.10-0" # pinned to avoid the breaking changes with mamba and micromamba (2.0.0).
- name: Install PyJuliaCall
if: ${{ matrix.julia == true }}
run: |
micromamba install -c conda-forge "pyjuliacall>=0.9.20"
- name: Install xHydro
run: |
python -m pip install --no-deps .
Expand All @@ -192,6 +216,7 @@ jobs:
run: |
python -m coveralls
env:
CI: "1"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: run-Python${{ matrix.python-version }}-conda
COVERALLS_PARALLEL: true
Expand All @@ -210,6 +235,11 @@ jobs:
matrix:
os: [ 'ubuntu-latest' ]
python-version: [ "3.10", "3.11", "3.12" ]
julia: [ false ]
include:
- os: 'ubuntu-latest'
python-version: "3.10"
julia: true
defaults:
run:
shell: bash -l {0}
Expand All @@ -220,30 +250,42 @@ jobs:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
185.125.188.54:443
185.125.188.55:443
185.125.188.58:443
185.125.188.59:443
ai4edataeuwest.blob.core.windows.net:443
api.github.com:443
api.ipify.org:443
cdn.proj.org:443
conda.anaconda.org:443
elevationeuwest.blob.core.windows.net:443
files.pythonhosted.org:443
github.com:443
objects.githubusercontent.com:443
pkg.julialang.org:443
planetarycomputer.microsoft.com:443
pypi.org:443
raw.githubusercontent.com:443
s3.us-east-2.wasabisys.com:443
s3.wasabisys.com:443
storage.julialang.net:443
us-east.pkg.julialang.org:443
us-west.pkg.julialang.org:443
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Conda (Micromamba) with Python${{ matrix.python-version }}
uses: mamba-org/setup-micromamba@v2
uses: mamba-org/setup-micromamba@617811f69075e3fd3ae68ca64220ad065877f246 # v2.0.0
with:
cache-downloads: true
cache-environment: false
cache-environment: true
environment-file: environment-dev.yml
create-args: >-
lmoments3
python=${{ matrix.python-version }}
micromamba-version: "1.5.10-0" # pinned to avoid the breaking changes with mamba and micromamba (2.0.0).
- name: Install PyJuliaCall
if: ${{ matrix.julia == true }}
run: |
micromamba install -c conda-forge "pyjuliacall>=0.9.20"
- name: Install xHydro
run: |
python -m pip install --no-deps .
Expand All @@ -252,7 +294,12 @@ jobs:
micromamba list
echo ESMF_VERSION=$(cat $ESMFMKFILE | grep "ESMF_VERSION_STRING=" | awk -F= '{print $2}' | tr -d "'")
python -m pip check || true
- name: Test Notebooks
- name: Test Notebooks (no Julia)
if: ${{ matrix.julia == false }}
run: |
make test-notebooks-lax-noextremes
- name: Test Notebooks (Julia)
if: ${{ matrix.julia == true }}
run: |
make test-notebooks-lax

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ instance/
docs/_build/
docs/apidoc/modules.rst
docs/apidoc/xhydro*.rst
docs/notebooks/_data/*

# PyBuilder
target/
Expand Down Expand Up @@ -111,3 +112,4 @@ ENV/
# IDE settings
.vscode/
.idea/
.VSCodeCounter/
15 changes: 8 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_language_version:

repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
rev: v3.19.0
hooks:
- id: pyupgrade
args: [ '--py310-plus' ]
Expand All @@ -21,7 +21,7 @@ repos:
- id: check-yaml
args: [ '--allow-multiple-documents' ]
- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
rev: v0.24.2
hooks:
- id: toml-sort-fix
- repo: https://github.com/pre-commit/pygrep-hooks
Expand All @@ -42,7 +42,7 @@ repos:
- id: isort
exclude: ^docs/
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
rev: v0.8.2
hooks:
- id: ruff
args: [ '--fix' ]
Expand All @@ -65,17 +65,18 @@ repos:
additional_dependencies: [ 'black==24.10.0' ]
- id: blackdoc-autoupdate-black
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
rev: 0.8.1
hooks:
- id: nbstripout
files: '.ipynb'
exclude: "docs/notebooks/extreme_value_analysis.ipynb"
args: [ '--keep-count', '--keep-output', '--drop-empty-cells', '--extra-keys=metadata.kernelspec' ]
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.8.7
rev: 1.9.1
hooks:
- id: nbqa-pyupgrade
args: [ '--py310-plus' ]
additional_dependencies: [ 'pyupgrade==3.17.0' ]
additional_dependencies: [ 'pyupgrade==3.19.0' ]
- id: nbqa-black
additional_dependencies: [ 'black==24.10.0' ]
- id: nbqa-isort
Expand All @@ -91,7 +92,7 @@ repos:
- id: numpydoc-validation
exclude: ^docs/|^tests/
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.3
rev: 0.30.0
hooks:
- id: check-github-workflows
- id: check-readthedocs
Expand Down
3 changes: 3 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"affiliation": "École de technologie supérieure, Montréal, Québec, Canada",
"orcid": "0000-0003-2834-2750"
},
{
"name": "Maarite, Kamil"
},
{
"name": "Arnal, Louise",
"affiliation": "Ouranos, Montréal, Québec, Canada",
Expand Down
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Co-Developers
* Gabriel Rondeau-Genesse <[email protected]> `@RondeauG <https://github.com/RondeauG>`_
* Sébastien Langlois `@sebastienlanglois <https://github.com/sebastienlanglois>`_
* Julián Ospina `@ospinajulian <https://github.com/ospinajulian>`_
* Kamil Maarite `@Sci-pio <https://github.com/Sci-pio>`_

Contributors
------------
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ v0.5.0 (unreleased)
-------------------
Contributors to this version: Thomas-Charles Fortier Filion (:user:`TC-FF`) Gabriel Rondeau-Genesse (:user:`RondeauG`), Trevor James Smith (:user:`Zeitsperre`).

New features and enhancements
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* Added a new module `xhydro.extreme_value_analysis` that wraps the `Extremes.jl` package for Julia. (:pull:`175`).
* The module provides functions to fit extreme value distributions to data, compute return levels, and get uncertainty estimates.
* The module is designed to be optional and requires the user to have Julia installed with the `Extremes.jl` package, along with the `PyJuliaCall` package for Python.
* You can use `pip install xhydro[julia]` to install the required dependencies.

Internal changes
^^^^^^^^^^^^^^^^
* `"land_use_classification"` default collection has been changed to `"io-lulc-annual-v02"`, as the previous one will be deprecated in December 2024. (:pull:`227`).
Expand Down
1 change: 0 additions & 1 deletion CI/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import re
import time
from pathlib import Path
from typing import Union

import deep_translator

Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,18 @@ lint: lint/flake8 lint/black ## check style
test: ## run tests quickly with the default Python
python -m pytest

test-distributed: ## run tests quickly with the default Python and distibuted workers
python -m pytest --num-processes=logical

test-notebooks: ## run tests on notebooks and compare outputs
pytest --no-cov --nbval --rootdir=tests/ docs/notebooks

test-notebooks-lax: ## run tests on notebooks but don't be so strict about outputs
pytest --no-cov --nbval-lax --rootdir=tests/ docs/notebooks

test-notebooks-lax-noextremes: ## run tests on notebooks but don't be so strict about outputs
pytest --no-cov --nbval-lax --rootdir=tests/ docs/notebooks --ignore='docs/notebooks/extreme_value_analysis.ipynb'

test-all: ## run tests on every Python version with tox
python -m tox

Expand Down
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,14 @@
"special-members": False,
}

autodoc_mock_imports = ["esmpy", "xesmf"]
autodoc_mock_imports = ["esmpy", "juliacall", "juliapkg", "xesmf"]

# For styling class attributes
napoleon_use_ivar = True

# For external documentation links
intersphinx_mapping = {
"pooch": ("https://www.fatiando.org/pooch/latest/", None),
"xclim": ("https://xclim.readthedocs.io/en/latest/", None),
"xscen": ("https://xscen.readthedocs.io/en/latest/", None),
}
Expand Down
Loading
Loading