Skip to content

Commit c6b2b89

Browse files
Merge branch 'master' into dependabot/github_actions/actions/checkout-4.1.7
2 parents afbc31b + 8415f59 commit c6b2b89

File tree

9 files changed

+101
-38
lines changed

9 files changed

+101
-38
lines changed

.github/workflows/cicd.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
fail-fast: false
4242
matrix:
4343
os: [ubuntu-latest, macos-latest, windows-latest]
44-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
44+
python-version: ["3.9", "3.10", "3.11", "3.12"]
4545
with:
4646
os: ${{ matrix.os }}
4747
python-version: ${{ matrix.python-version }}
@@ -65,7 +65,7 @@ jobs:
6565
fail-fast: false
6666
matrix:
6767
os: [ubuntu-latest, windows-latest]
68-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
68+
python-version: ["3.9", "3.10", "3.11", "3.12"]
6969
with:
7070
os: ${{ matrix.os }}
7171
python-version: ${{ matrix.python-version }}

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.4.2
3+
rev: v0.4.9
44
hooks:
55
- id: ruff
66
args: [--fix]
77
- id: ruff-format
88
- repo: https://github.com/pycqa/flake8
9-
rev: 7.0.0
9+
rev: 7.1.0
1010
hooks:
1111
- id: flake8
1212
args: ["--select=E9,F63,F7,F82", "--show-source", "--statistics"]
@@ -20,13 +20,13 @@ repos:
2020
# - --install-types
2121
# - --non-interactive
2222
- repo: https://github.com/codespell-project/codespell
23-
rev: v2.2.6
23+
rev: v2.3.0
2424
hooks:
2525
- id: codespell
2626
additional_dependencies:
2727
- tomli
2828
- repo: https://github.com/pre-commit/pre-commit-hooks
29-
rev: v4.5.0
29+
rev: v4.6.0
3030
hooks:
3131
# all available hooks can be found here: https://github.com/pre-commit/pre-commit-hooks/blob/main/.pre-commit-hooks.yaml
3232
- id: check-yaml

CHANGELOG.md

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,63 @@
11
# Changelog
22

3-
## [Unreleased](https://github.com/btschwertfeger/python-cmethods/tree/HEAD)
3+
## [v2.2.5](https://github.com/btschwertfeger/python-cmethods/tree/v2.2.5) (2024-05-28)
44

5-
[Full Changelog](https://github.com/btschwertfeger/python-cmethods/compare/v2.2.1...HEAD)
5+
[Full Changelog](https://github.com/btschwertfeger/python-cmethods/compare/v2.2.4...v2.2.5)
66

77
**Merged pull requests:**
88

9+
- Bump codecov/codecov-action from 4.4.0 to 4.4.1 [\#108](https://github.com/btschwertfeger/python-cmethods/pull/108) ([dependabot[bot]](https://github.com/apps/dependabot))
10+
- Adjust the DQM formula [\#107](https://github.com/btschwertfeger/python-cmethods/pull/107) ([btschwertfeger](https://github.com/btschwertfeger))
11+
- Fix the --version flag [\#106](https://github.com/btschwertfeger/python-cmethods/pull/106) ([btschwertfeger](https://github.com/btschwertfeger))
12+
- Bump codecov/codecov-action from 4.3.1 to 4.4.0 [\#105](https://github.com/btschwertfeger/python-cmethods/pull/105) ([dependabot[bot]](https://github.com/apps/dependabot))
13+
- Bump dependabot/fetch-metadata from 1.1.1 to 2.1.0 [\#104](https://github.com/btschwertfeger/python-cmethods/pull/104) ([dependabot[bot]](https://github.com/apps/dependabot))
14+
- Bump actions/checkout from 4.1.5 to 4.1.6 [\#103](https://github.com/btschwertfeger/python-cmethods/pull/103) ([dependabot[bot]](https://github.com/apps/dependabot))
15+
16+
## [v2.2.4](https://github.com/btschwertfeger/python-cmethods/tree/v2.2.4) (2024-05-20)
17+
18+
[Full Changelog](https://github.com/btschwertfeger/python-cmethods/compare/v2.2.3...v2.2.4)
19+
20+
**Fixed bugs:**
21+
22+
- QDM not working with longer simp length [\#101](https://github.com/btschwertfeger/python-cmethods/issues/101)
23+
24+
**Merged pull requests:**
25+
26+
- Resolve "QDM not working with longer simp length" [\#102](https://github.com/btschwertfeger/python-cmethods/pull/102) ([btschwertfeger](https://github.com/btschwertfeger))
27+
28+
## [v2.2.3](https://github.com/btschwertfeger/python-cmethods/tree/v2.2.3) (2024-05-17)
29+
30+
[Full Changelog](https://github.com/btschwertfeger/python-cmethods/compare/v2.2.2...v2.2.3)
31+
32+
**Fixed bugs:**
33+
34+
- A very small error [\#95](https://github.com/btschwertfeger/python-cmethods/issues/95)
35+
- The behavior for data sets with different temporal resolution are not uniform [\#99](https://github.com/btschwertfeger/python-cmethods/issues/99)
36+
37+
**Merged pull requests:**
38+
39+
- Bump actions/checkout from 4.1.4 to 4.1.5 [\#98](https://github.com/btschwertfeger/python-cmethods/pull/98) ([dependabot[bot]](https://github.com/apps/dependabot))
40+
- Bump ossf/scorecard-action from 2.3.1 to 2.3.3 [\#97](https://github.com/btschwertfeger/python-cmethods/pull/97) ([dependabot[bot]](https://github.com/apps/dependabot))
41+
- Resolve "The behavior for data sets with different temporal resolution are not uniform" [\#100](https://github.com/btschwertfeger/python-cmethods/pull/100) ([btschwertfeger](https://github.com/btschwertfeger))
42+
- Extend the documentation [\#96](https://github.com/btschwertfeger/python-cmethods/pull/96) ([btschwertfeger](https://github.com/btschwertfeger))
43+
44+
## [v2.2.2](https://github.com/btschwertfeger/python-cmethods/tree/v2.2.2) (2024-05-07)
45+
46+
[Full Changelog](https://github.com/btschwertfeger/python-cmethods/compare/v2.2.1...v2.2.2)
47+
48+
**Implemented enhancements:**
49+
50+
- Add python-cmethods to the conda registry [\#17](https://github.com/btschwertfeger/python-cmethods/issues/17)
51+
52+
**Merged pull requests:**
53+
54+
- Bump codecov/codecov-action from 4.3.0 to 4.3.1 [\#93](https://github.com/btschwertfeger/python-cmethods/pull/93) ([dependabot[bot]](https://github.com/apps/dependabot))
55+
- Bump actions/upload-artifact from 4.3.2 to 4.3.3 [\#91](https://github.com/btschwertfeger/python-cmethods/pull/91) ([dependabot[bot]](https://github.com/apps/dependabot))
956
- Bump actions/checkout from 4.1.2 to 4.1.4 [\#90](https://github.com/btschwertfeger/python-cmethods/pull/90) ([dependabot[bot]](https://github.com/apps/dependabot))
1057
- Bump actions/upload-artifact from 4.3.1 to 4.3.2 [\#89](https://github.com/btschwertfeger/python-cmethods/pull/89) ([dependabot[bot]](https://github.com/apps/dependabot))
1158
- Bump codecov/codecov-action from 4.2.0 to 4.3.0 [\#87](https://github.com/btschwertfeger/python-cmethods/pull/87) ([dependabot[bot]](https://github.com/apps/dependabot))
59+
- Update the publishing process [\#94](https://github.com/btschwertfeger/python-cmethods/pull/94) ([btschwertfeger](https://github.com/btschwertfeger))
60+
- Fix CI - Failing due to missing hdf5 and netcdf headers [\#92](https://github.com/btschwertfeger/python-cmethods/pull/92) ([btschwertfeger](https://github.com/btschwertfeger))
1261

1362
## [v2.2.1](https://github.com/btschwertfeger/python-cmethods/tree/v2.2.1) (2024-04-10)
1463

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div align="center">
44

55
[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com/btschwertfeger/python-cmethods)
6-
[![Generic badge](https://img.shields.io/badge/python-3.8_|_3.9_|_3.10_|_3.11|_3.12-blue.svg)](https://shields.io/)
6+
[![Generic badge](https://img.shields.io/badge/python-3.9_|_3.10_|_3.11|_3.12-blue.svg)](https://shields.io/)
77
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-orange.svg)](https://www.gnu.org/licenses/gpl-3.0)
88
[![PyPI Downloads](https://pepy.tech/badge/python-cmethods)](https://pepy.tech/project/python-cmethods)
99

@@ -141,8 +141,8 @@ https://python-cmethods.readthedocs.io/en/stable/
141141

142142
## 3. Installation
143143

144-
> For optimal compatibility on macOS, ensure that 'hdf5' and 'netcdf' are
145-
> pre-installed using Homebrew (`brew install hdf5 netcdf`).
144+
> If the installation fails due to missing HDF5 headers, ensure that 'hdf5' and
145+
> 'netcdf' are pre-installed, e.g. on macOS using: `brew install hdf5 netcdf`.
146146
147147
```bash
148148
python3 -m pip install python-cmethods

doc/getting_started.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ Getting Started
99
Installation
1010
------------
1111

12-
(For optimal compatibility on macOS, ensure that 'hdf5' and 'netcdf' are
13-
pre-installed using Homebrew (``brew install hdf5 netcdf``).)
14-
1512
The `python-cmethods`_ module can be installed using the package manager pip:
1613

1714
.. code-block:: bash
1815
1916
python3 -m pip install python-cmethods
2017
18+
If the installation fails due to missing HDF5 headers, ensure that 'hdf5' and
19+
'netcdf' are pre-installed, e.g. on macOS using: ``brew install hdf5 netcdf``.
20+
2121
The package is also available via conda-forge. See
2222
`python_cmethods-conda`_ for more information.
2323

doc/links.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
.. |License badge| image:: https://img.shields.io/badge/License-GPLv3-orange.svg
3333
:target: https://www.gnu.org/licenses/gpl-3.0
3434

35-
.. |PyVersions badge| image:: https://img.shields.io/badge/python-3.8_|_3.9_|_3.10_|_3.11|_3.12-blue.svg
35+
.. |PyVersions badge| image:: https://img.shields.io/badge/python-3.9_|_3.10_|_3.11|_3.12-blue.svg
3636
:target: https://github.com/btschwertfeger/python-cmethods
3737

3838
.. |Downloads badge| image:: https://static.pepy.tech/personalized-badge/python-cmethods?period=total&units=abbreviation&left_color=grey&right_color=orange&left_text=downloads

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ maintainers = [
1414
description = "A collection of bias correction techniques written in Python - for climate sciences."
1515
readme = "README.md"
1616
license = { file = "LICENSE" }
17-
requires-python = ">=3.8"
17+
requires-python = ">=3.9"
1818
dependencies = [
1919
"xarray>=2022.11.0",
2020
"netCDF4>=1.6.1",
@@ -39,7 +39,6 @@ keywords = [
3939
classifiers = [
4040
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
4141
"Programming Language :: Python",
42-
"Programming Language :: Python :: 3.8",
4342
"Programming Language :: Python :: 3.9",
4443
"Programming Language :: Python :: 3.10",
4544
"Programming Language :: Python :: 3.11",

tests/test_misc.py

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,40 @@ def test_not_implemented_errors(
3030
) -> None:
3131
caplog.set_level(logging.INFO)
3232

33-
with pytest.raises(
34-
NotImplementedError,
35-
match=re.escape(r"kind='/' not available for linear_scaling."),
36-
), pytest.warns(UserWarning, match="Do not call linear_scaling"):
33+
with (
34+
pytest.raises(
35+
NotImplementedError,
36+
match=re.escape(r"kind='/' not available for linear_scaling."),
37+
),
38+
pytest.warns(UserWarning, match="Do not call linear_scaling"),
39+
):
3740
linear_scaling(obs=[], simh=[], simp=[], kind="/")
3841

39-
with pytest.raises(
40-
NotImplementedError,
41-
match=re.escape(r"kind='/' not available for variance_scaling."),
42-
), pytest.warns(UserWarning, match="Do not call variance_scaling"):
42+
with (
43+
pytest.raises(
44+
NotImplementedError,
45+
match=re.escape(r"kind='/' not available for variance_scaling."),
46+
),
47+
pytest.warns(UserWarning, match="Do not call variance_scaling"),
48+
):
4349
variance_scaling(obs=[], simh=[], simp=[], kind="/")
4450

45-
with pytest.raises(
46-
NotImplementedError,
47-
match=re.escape(r"kind='/' not available for delta_method. "),
48-
), pytest.warns(UserWarning, match="Do not call delta_method"):
51+
with (
52+
pytest.raises(
53+
NotImplementedError,
54+
match=re.escape(r"kind='/' not available for delta_method. "),
55+
),
56+
pytest.warns(UserWarning, match="Do not call delta_method"),
57+
):
4958
delta_method(obs=[], simh=[], simp=[], kind="/")
5059

51-
with pytest.raises(
52-
NotImplementedError,
53-
match=re.escape(r"kind='/' for quantile_mapping is not available."),
54-
), pytest.warns(UserWarning, match="Do not call quantile_mapping"):
60+
with (
61+
pytest.raises(
62+
NotImplementedError,
63+
match=re.escape(r"kind='/' for quantile_mapping is not available."),
64+
),
65+
pytest.warns(UserWarning, match="Do not call quantile_mapping"),
66+
):
5567
quantile_mapping(
5668
obs=np.array(datasets["+"]["obsh"][:, 0, 0]),
5769
simh=np.array(datasets["+"]["simh"][:, 0, 0]),
@@ -71,10 +83,13 @@ def test_not_implemented_errors(
7183
n_quantiles=100,
7284
)
7385

74-
with pytest.raises(
75-
NotImplementedError,
76-
match=re.escape(r"kind='/' not available for quantile_delta_mapping."),
77-
), pytest.warns(UserWarning, match="Do not call quantile_delta_mapping"):
86+
with (
87+
pytest.raises(
88+
NotImplementedError,
89+
match=re.escape(r"kind='/' not available for quantile_delta_mapping."),
90+
),
91+
pytest.warns(UserWarning, match="Do not call quantile_delta_mapping"),
92+
):
7893
quantile_delta_mapping(
7994
obs=np.array(datasets["+"]["obsh"][:, 0, 0]),
8095
simh=np.array(datasets["+"]["simh"][:, 0, 0]),

tests/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def test_quantile_delta_mapping_all_nan() -> None:
8585

8686
def test_nan_or_equal() -> None:
8787
assert nan_or_equal(0, 0)
88-
assert nan_or_equal(np.NaN, np.NaN)
88+
assert nan_or_equal(np.nan, np.nan)
8989
assert not nan_or_equal(0, 1)
9090

9191

0 commit comments

Comments
 (0)