Skip to content

Commit bf90d05

Browse files
authored
Prepare for release (#790)
* add merge patches to docs * update files * update changelog
1 parent 61ef0c2 commit bf90d05

File tree

16 files changed

+110
-79
lines changed

16 files changed

+110
-79
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.5.0
3+
rev: v4.6.0
44
hooks:
55
- id: end-of-file-fixer
66
- id: requirements-txt-fixer
@@ -13,18 +13,18 @@ repos:
1313
- id: debug-statements
1414

1515
- repo: https://github.com/psf/black
16-
rev: 23.12.1
16+
rev: 24.4.2
1717
hooks:
1818
- id: black
1919
language_version: python3
2020

2121
- repo: https://github.com/charliermarsh/ruff-pre-commit
22-
rev: "v0.1.11"
22+
rev: "v0.4.4"
2323
hooks:
2424
- id: ruff
2525

2626
- repo: https://github.com/nbQA-dev/nbQA
27-
rev: 1.7.1
27+
rev: 1.8.5
2828
hooks:
2929
- id: nbqa-black
3030
- id: nbqa-ruff

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## [Version 1.5.4] - 2024-05-13
2+
3+
- Minor fixes for documentation
4+
5+
16
## [Version 1.5.3] - 2024-01-10
27

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

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def get_subclasses(cls):
265265
module = "eolearn"
266266

267267
APIDOC_OPTIONS = ["--module-first", "--separate", "--no-toc", "--templatedir", os.path.join(current_dir, "_templates")]
268-
APIDOC_EXCLUDE = ["graph.py", "eodata_io.py", "eodata_merge.py"]
268+
APIDOC_EXCLUDE = ["graph.py", "eodata_io.py"]
269269

270270
shutil.rmtree(reference_dir, ignore_errors=True)
271271
shutil.copytree(custom_reference_dir, reference_dir)

eolearn/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Main module of the `eolearn` package."""
22

3-
__version__ = "1.5.3"
3+
__version__ = "1.5.4"
44

55
import importlib.util
66
import warnings

eolearn/core/eoexecution.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def __init__(
131131

132132
@staticmethod
133133
def _parse_and_validate_execution_kwargs(
134-
execution_kwargs: Iterable[dict[EONode, dict[str, object]]]
134+
execution_kwargs: Iterable[dict[EONode, dict[str, object]]],
135135
) -> list[dict[EONode, dict[str, object]]]:
136136
"""Parses and validates execution arguments provided by user and raises an error if something is wrong."""
137137
for input_kwargs in execution_kwargs:

eolearn/features/extra/interpolation.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,12 @@ def interpolate_data(self, data: np.ndarray, times: np.ndarray, resampled_times:
273273

274274
# array defining index correspondence between reference times and resampled times
275275
min_time, max_time = np.min(resampled_times), np.max(resampled_times)
276-
ori2res = np.array([
277-
np.abs(resampled_times - orig_time).argmin() if min_time <= orig_time <= max_time else None
278-
for orig_time in times
279-
])
276+
ori2res = np.array(
277+
[
278+
np.abs(resampled_times - orig_time).argmin() if min_time <= orig_time <= max_time else None
279+
for orig_time in times
280+
]
281+
)
280282

281283
# find NaNs that start or end a time-series
282284
row_nans, col_nans = np.where(self._get_start_end_nans(data))

eolearn/io/sentinelhub_process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Input tasks that collect data from `Sentinel-Hub Process API
1+
"""Input tasks that collect data from `Sentinel-Hub Process API
22
<https://docs.sentinel-hub.com/api/latest/api/process/>`__
33
44
Copyright (c) 2017- Sinergise and contributors

eolearn/visualization/eoexecutor.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,17 @@ def _get_node_descriptions(self) -> list[dict[str, Any]]:
163163
f" usually {np.mean(durations):.4g} ± {np.std(durations):.4g} seconds"
164164
)
165165

166-
descriptions.append({
167-
"name": f"{node_name} ({node.uid})",
168-
"uid": node.uid,
169-
"args": {
170-
key: value.replace("<", "&lt;").replace(">", "&gt;") # type: ignore[attr-defined]
171-
for key, value in node.task.private_task_config.init_args.items()
172-
},
173-
"duration_report": duration_report,
174-
})
166+
descriptions.append(
167+
{
168+
"name": f"{node_name} ({node.uid})",
169+
"uid": node.uid,
170+
"args": {
171+
key: value.replace("<", "&lt;").replace(">", "&gt;") # type: ignore[attr-defined]
172+
for key, value in node.task.private_task_config.init_args.items()
173+
},
174+
"duration_report": duration_report,
175+
}
176+
)
175177
return descriptions
176178

177179
def _render_execution_tracebacks(self, formatter: pygments.formatter.Formatter) -> list:

examples/core/CoreOverview.ipynb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -801,11 +801,13 @@
801801
}
802802
],
803803
"source": [
804-
"results = workflow.execute({\n",
805-
" load_node: {\"eopatch_folder\": \"TestEOPatch\"},\n",
806-
" add_feature_node: {\"data\": np.zeros((68, 3), dtype=np.uint8)},\n",
807-
" save_node: {\"eopatch_folder\": \"WorkflowEOPatch\"},\n",
808-
"})\n",
804+
"results = workflow.execute(\n",
805+
" {\n",
806+
" load_node: {\"eopatch_folder\": \"TestEOPatch\"},\n",
807+
" add_feature_node: {\"data\": np.zeros((68, 3), dtype=np.uint8)},\n",
808+
" save_node: {\"eopatch_folder\": \"WorkflowEOPatch\"},\n",
809+
" }\n",
810+
")\n",
809811
"\n",
810812
"results"
811813
]

examples/io/SentinelHubIO.ipynb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,12 @@
374374
"workflow_nodes = linearly_connect_tasks(input_task, add_indices, add_l2a_and_scl, add_dem, save, output_task)\n",
375375
"workflow = EOWorkflow(workflow_nodes)\n",
376376
"\n",
377-
"result = workflow.execute({\n",
378-
" workflow_nodes[0]: {\"bbox\": roi_bbox, \"time_interval\": time_interval},\n",
379-
" workflow_nodes[-2]: {\"eopatch_folder\": \"eopatch\"},\n",
380-
"})"
377+
"result = workflow.execute(\n",
378+
" {\n",
379+
" workflow_nodes[0]: {\"bbox\": roi_bbox, \"time_interval\": time_interval},\n",
380+
" workflow_nodes[-2]: {\"eopatch_folder\": \"eopatch\"},\n",
381+
" }\n",
382+
")"
381383
]
382384
},
383385
{

0 commit comments

Comments
 (0)