Skip to content

Commit bd4717b

Browse files
authored
Release 1.5.3, Merge pull request #785 from sentinel-hub/develop
Release 1.5.3
2 parents 0310d55 + 43545cf commit bd4717b

32 files changed

+242
-245
lines changed

.github/workflows/ci_action.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ jobs:
8585
cache: pip
8686

8787
- name: Install packages
88-
run: pip install -e .[DEV] --upgrade --upgrade-strategy eager
88+
run: | # must install async-timeout until ray fixes issue
89+
pip install -e .[DEV] --upgrade --upgrade-strategy eager
90+
pip install async-timeout
8991
9092
- name: Run full tests and code coverage
9193
if: ${{ matrix.full_test_suite }}
@@ -110,3 +112,20 @@ jobs:
110112
files: coverage.xml
111113
fail_ci_if_error: true
112114
verbose: false
115+
116+
mirror-and-integration-test-on-gitlab:
117+
if: github.event_name == 'push'
118+
runs-on: ubuntu-latest
119+
steps:
120+
- uses: actions/checkout@v1
121+
- name: Mirror + trigger CI
122+
uses: SvanBoxel/gitlab-mirror-and-ci-action@master
123+
with:
124+
args: "https://git.sinergise.com/eo/code/eo-learn/"
125+
env:
126+
FOLLOW_TAGS: "true"
127+
GITLAB_HOSTNAME: "git.sinergise.com"
128+
GITLAB_USERNAME: "github-action"
129+
GITLAB_PASSWORD: ${{ secrets.GITLAB_PASSWORD }}
130+
GITLAB_PROJECT_ID: "164"
131+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci_trigger.yml

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,19 @@
1-
name: mirror_and_trigger
1+
name: trigger
22

33
on:
4-
pull_request:
5-
push:
6-
branches:
7-
- "master"
8-
- "develop"
9-
workflow_call:
104
release:
115
types:
126
- published
137

148
jobs:
15-
mirror-and-integration-test-on-gitlab:
16-
if: github.event_name == 'push'
9+
trigger:
1710
runs-on: ubuntu-latest
1811
steps:
19-
- uses: actions/checkout@v1
20-
- name: Mirror + trigger CI
21-
uses: SvanBoxel/gitlab-mirror-and-ci-action@master
22-
with:
23-
args: "https://git.sinergise.com/eo/code/eo-learn/"
24-
env:
25-
FOLLOW_TAGS: "true"
26-
GITLAB_HOSTNAME: "git.sinergise.com"
27-
GITLAB_USERNAME: "github-action"
28-
GITLAB_PASSWORD: ${{ secrets.GITLAB_PASSWORD }}
29-
GITLAB_PROJECT_ID: "164"
30-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12+
- name: Trigger API
13+
run: >
14+
curl -X POST --fail \
15+
-F token=${{ secrets.GITLAB_PIPELINE_TRIGGER_TOKEN }} \
16+
-F ref=main \
17+
-F variables[CUSTOM_RUN_TAG]=auto \
18+
-F variables[LAYER_NAME]=dotai-eo \
19+
https://git.sinergise.com/api/v4/projects/1031/trigger/pipeline

.gitlab-ci.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ image: python:3.9
22

33
stages:
44
- test
5-
- build
65

76
run_sh_integration_tests:
87
stage: test
@@ -14,17 +13,3 @@ run_sh_integration_tests:
1413
- pip install .[DEV]
1514
- sentinelhub.config --sh_client_id "$SH_CLIENT_ID" --sh_client_secret "$SH_CLIENT_SECRET" > /dev/null # Gitlab can't mask SH_CLIENT_SECRET in logs
1615
- pytest -m sh_integration
17-
18-
build_docker_image:
19-
stage: build
20-
needs: []
21-
rules:
22-
- if: $CI_COMMIT_TAG # run only on releases
23-
when: always
24-
variables:
25-
CUSTOM_RUN_TAG: auto # this will create images with the latest tag and the version tag
26-
LAYER_NAME: dotai-eo
27-
- when: manual
28-
trigger:
29-
project: eo/infra/docker
30-
allow_failure: true

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ repos:
1313
- id: debug-statements
1414

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

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

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

.zenodo.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,9 @@
206206
},
207207
{
208208
"id": "101004112"
209+
},
210+
{
211+
"id": "101059548"
209212
}
210213
]
211214
}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## [Version 1.5.3] - 2024-01-10
2+
3+
- Fix `numpy<2` in anticipation of numpy 2.0 release.
4+
5+
16
## [Version 1.5.2] - 2023-11-07
27

38
- `RayExecutor` can now forward remote kwargs to ray jobs.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,4 +202,4 @@ See [LICENSE](https://github.com/sentinel-hub/eo-learn/blob/master/LICENSE).
202202

203203
## Acknowledgements
204204

205-
This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreements No. 776115 and No. 101004112.
205+
This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreements No. 776115, No. 101004112 and No. 101059548.

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.2"
3+
__version__ = "1.5.3"
44

55
import importlib.util
66
import warnings

eolearn/core/constants.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
from enum import Enum, EnumMeta
1414
from typing import Any, TypeVar
1515

16+
from typing_extensions import deprecated
17+
1618
from sentinelhub import BBox, MimeType
17-
from sentinelhub.exceptions import deprecated_function
1819

1920
from .exceptions import EODeprecationWarning
2021

@@ -157,14 +158,16 @@ def is_image(self) -> bool:
157158
"""True if FeatureType stores a dictionary with arrays that represent images. False otherwise."""
158159
return self.is_array() and self.is_spatial()
159160

160-
@deprecated_function(
161-
EODeprecationWarning, "Use the equivalent `is_array` method, or consider if `is_image` fits better."
161+
@deprecated(
162+
"The method `is_raster` has been deprecated. Use the equivalent `is_array` method, or consider if `is_image`"
163+
" fits better.",
164+
category=EODeprecationWarning,
162165
)
163166
def is_raster(self) -> bool:
164167
"""True if FeatureType stores a dictionary with raster data. False otherwise."""
165168
return self.is_array()
166169

167-
@deprecated_function(EODeprecationWarning)
170+
@deprecated("The method `has_dict` has been deprecated.", category=EODeprecationWarning)
168171
def has_dict(self) -> bool:
169172
"""True if FeatureType stores a dictionary. False otherwise."""
170173
return self in [
@@ -181,7 +184,7 @@ def has_dict(self) -> bool:
181184
FeatureType.META_INFO,
182185
]
183186

184-
@deprecated_function(EODeprecationWarning)
187+
@deprecated("The method `contains_ndarrays` has been deprecated.", category=EODeprecationWarning)
185188
def contains_ndarrays(self) -> bool:
186189
"""True if FeatureType stores a dictionary of numpy.ndarrays. False otherwise."""
187190
return self.is_array()
@@ -201,7 +204,7 @@ def ndim(self) -> int | None:
201204
}[self]
202205
return None
203206

204-
@deprecated_function(EODeprecationWarning)
207+
@deprecated("The method `type` has been deprecated.", category=EODeprecationWarning)
205208
def type(self) -> type:
206209
"""Returns type of the data for the given FeatureType."""
207210
if self is FeatureType.TIMESTAMPS:
@@ -210,7 +213,7 @@ def type(self) -> type:
210213
return BBox
211214
return dict
212215

213-
@deprecated_function(EODeprecationWarning)
216+
@deprecated("The method `file_format` has been deprecated.", category=EODeprecationWarning)
214217
def file_format(self) -> MimeType:
215218
"""Returns a mime type enum of a file format into which data of the feature type will be serialized"""
216219
if self.is_array():

eolearn/core/core_tasks.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
import fs
1919
import numpy as np
2020
from fs.base import FS
21+
from typing_extensions import deprecated
2122

2223
from sentinelhub import SHConfig
23-
from sentinelhub.exceptions import deprecated_class
2424

2525
from .constants import FeatureType, OverwritePermission
2626
from .eodata import EOPatch
@@ -56,7 +56,9 @@ def execute(self, eopatch: EOPatch) -> EOPatch:
5656
return eopatch.copy(features=self.features, deep=self.deep, copy_timestamps=self.copy_timestamps)
5757

5858

59-
@deprecated_class(EODeprecationWarning, "Use `CopyTask` with the configuration `deep=True`.")
59+
@deprecated(
60+
"Use `CopyTask` with the configuration `deep=True` instead of `DeepCopyTask`.", category=EODeprecationWarning
61+
)
6062
class DeepCopyTask(CopyTask):
6163
"""[DEPRECATED] Makes a deep copy of the given EOPatch."""
6264

@@ -119,7 +121,7 @@ def __init__(
119121
all features will be saved.
120122
:param overwrite_permission: A level of permission for overwriting an existing EOPatch
121123
to 9 (highest compression).
122-
:save_timestamps: Whether to save the timestamps of the EOPatch. With the `"auto"` setting timestamps are saved
124+
:save_timestamps: Save the timestamps of the EOPatch. With the `"auto"` setting timestamps are saved
123125
if `features=...` or if other temporal features are being saved.
124126
:param use_zarr: Saves numpy-array based features into Zarr files. Requires ZARR extra dependencies.
125127
:param temporal_selection: Writes all of the data to the chosen temporal indices of preexisting arrays. Can be
@@ -191,7 +193,7 @@ def __init__(
191193
default configuration will be taken.
192194
:param features: A collection of features to be loaded. By default, all features will be loaded.
193195
:param lazy_loading: If `True` features will be lazy loaded.
194-
:load_timestamps: Whether to load the timestamps of the EOPatch. With the `"auto"` setting timestamps are loaded
196+
:load_timestamps: Load the timestamps of the EOPatch. With the `"auto"` setting timestamps are loaded
195197
if `features=...` or if other temporal features are being loaded.
196198
:param temporal_selection: Only loads data corresponding to the chosen indices. Can also be a callable that,
197199
given a list of timestamps, returns a list of booleans declaring which temporal slices to load.

0 commit comments

Comments
 (0)