Skip to content

Commit

Permalink
Prepare for release (#784)
Browse files Browse the repository at this point in the history
* Update version and changelog

* update hooks

* fix date in changelog
  • Loading branch information
zigaLuksic authored Jan 10, 2024
1 parent 53dffc9 commit 43545cf
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ repos:
- id: debug-statements

- repo: https://github.com/psf/black
rev: 23.11.0
rev: 23.12.1
hooks:
- id: black
language_version: python3

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.1.5"
rev: "v0.1.11"
hooks:
- id: ruff

- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.0
rev: 1.7.1
hooks:
- id: nbqa-black
- id: nbqa-ruff
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [Version 1.5.3] - 2024-01-10

- Fix `numpy<2` in anticipation of numpy 2.0 release.


## [Version 1.5.2] - 2023-11-07

- `RayExecutor` can now forward remote kwargs to ray jobs.
Expand Down
2 changes: 1 addition & 1 deletion eolearn/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Main module of the `eolearn` package."""

__version__ = "1.5.2"
__version__ = "1.5.3"

import importlib.util
import warnings
Expand Down
6 changes: 3 additions & 3 deletions eolearn/core/eodata.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,9 @@ def __repr__(self) -> str:
content = self[feature_type]

content = {k: content._get_unloaded(k) for k in content} # noqa: SLF001
inner_content_repr = "\n ".join([
f"{label}: {self._repr_value(value)}" for label, value in sorted(content.items())
])
inner_content_repr = "\n ".join(
[f"{label}: {self._repr_value(value)}" for label, value in sorted(content.items())]
)
content_str = "{\n " + inner_content_repr + "\n }"

feature_repr_list.append(f"{feature_type.value}={content_str}")
Expand Down
8 changes: 4 additions & 4 deletions examples/water-monitor/WaterMonitorWorkflow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,9 @@
" # we're only interested in the water within the dam borders\n",
" water_masks = water_masks[..., np.newaxis] * eopatch.mask_timeless[\"NOMINAL_WATER\"]\n",
"\n",
" water_levels = np.asarray([\n",
" np.count_nonzero(mask) / np.count_nonzero(eopatch.mask_timeless[\"NOMINAL_WATER\"]) for mask in water_masks\n",
" ])\n",
" water_levels = np.asarray(\n",
" [np.count_nonzero(mask) / np.count_nonzero(eopatch.mask_timeless[\"NOMINAL_WATER\"]) for mask in water_masks]\n",
" )\n",
"\n",
" eopatch[FeatureType.MASK, \"WATER_MASK\"] = water_masks\n",
" eopatch[FeatureType.SCALAR, \"WATER_LEVEL\"] = water_levels[..., np.newaxis]\n",
Expand Down Expand Up @@ -646,7 +646,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
"version": "3.8.10"
},
"vscode": {
"interpreter": {
Expand Down
6 changes: 3 additions & 3 deletions tests/core/test_utils/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ class ApplyToAxesTestCase:
function=partial(np.flip, axis=0),
data=np.arange(2 * 3 * 4).reshape((2, 3, 4)),
spatial_axes=(1, 2),
expected=np.array([
[[8, 9, 10, 11], [4, 5, 6, 7], [0, 1, 2, 3]], [[20, 21, 22, 23], [16, 17, 18, 19], [12, 13, 14, 15]]
]),
expected=np.array(
[[[8, 9, 10, 11], [4, 5, 6, 7], [0, 1, 2, 3]], [[20, 21, 22, 23], [16, 17, 18, 19], [12, 13, 14, 15]]]
),
),
ApplyToAxesTestCase(
function=lambda x: x + 1,
Expand Down

0 comments on commit 43545cf

Please sign in to comment.