Skip to content

Commit 83f14c7

Browse files
authored
Release version 1.5.0, Merge pull request #751 from sentinel-hub/develop
Release version 1.5.0
2 parents a65899e + d9dcffe commit 83f14c7

File tree

234 files changed

+4095
-21567
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+4095
-21567
lines changed

.github/workflows/ci_action.yml

+11-21
Original file line numberDiff line numberDiff line change
@@ -51,26 +51,14 @@ jobs:
5151
# caching the entire environment is faster when cache exists but slower for cache creation
5252

5353
- name: Install packages
54-
run: |
55-
pip install -r requirements-dev.txt --upgrade --upgrade-strategy eager
56-
python install_all.py
57-
pip install -r ml_tools/requirements-tdigest.txt
54+
run: pip install .[DEV] --upgrade --upgrade-strategy eager
5855

5956
- name: Run pylint
60-
run: make pylint
57+
run: pylint eolearn
6158

6259
- name: Run mypy
6360
if: success() || failure()
64-
run: |
65-
mypy \
66-
core/eolearn/core \
67-
coregistration/eolearn/coregistration \
68-
geometry/eolearn/geometry \
69-
features/eolearn/features \
70-
io/eolearn/io \
71-
mask/eolearn/mask \
72-
ml_tools/eolearn/ml_tools \
73-
visualization/eolearn/visualization
61+
run: mypy eolearn
7462

7563
test-on-github:
7664
runs-on: ubuntu-latest
@@ -95,24 +83,26 @@ jobs:
9583
uses: actions/setup-python@v4
9684
with:
9785
python-version: ${{ matrix.python-version }}
98-
# cache: pip # uncomment when all requirements are in `pyproject.toml`
86+
cache: pip
9987

10088
- name: Install packages
101-
run: |
102-
pip install -r requirements-dev.txt --upgrade --upgrade-strategy eager
103-
python install_all.py -e
89+
run: pip install -e .[DEV] --upgrade --upgrade-strategy eager
10490

10591
- name: Run full tests and code coverage
10692
if: ${{ matrix.full_test_suite }}
10793
run: |
10894
sentinelhub.config \
10995
--sh_client_id "${{ secrets.SH_CLIENT_ID }}" \
11096
--sh_client_secret "${{ secrets.SH_CLIENT_SECRET }}"
111-
pytest --cov --cov-report=term --cov-report=xml
97+
if [ ${{ github.event_name }} == 'push' ]; then
98+
pytest -m "not geopedia" --cov=eolearn --cov-report=term --cov-report=xml
99+
else
100+
pytest -m "not geopedia"
101+
fi
112102
113103
- name: Run reduced tests
114104
if: ${{ !matrix.full_test_suite }}
115-
run: pytest -m "not sh_integration"
105+
run: pytest -m "not sh_integration and not geopedia"
116106

117107
- name: Upload code coverage
118108
if: ${{ matrix.full_test_suite && github.event_name == 'push' }}

.gitlab-ci.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ run_sh_integration_tests:
1010
- apt-get update
1111
- apt-get install -y build-essential libgdal-dev graphviz proj-bin gcc libproj-dev libspatialindex-dev
1212
script:
13-
- pip install -r requirements-dev.txt --upgrade
14-
- python install_all.py
13+
- 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

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ repos:
1313
- id: debug-statements
1414

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

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

CHANGELOG.md

+31-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,32 @@
1-
## [Version 1.4.2] - 2023-3-14
1+
## [Version 1.5.0] - 2023-09-06
2+
3+
The release focuses on making `eo-learn` much simpler to install, reducing the number of dependencies, and improving validation of soundness of `EOPatch` data.
4+
5+
- `eo-learn` is now distributed as a single package. Installation of `eo-learn-mask` and similar is no longer necessary and users are warned when such installations are detected.
6+
- Changes to `timestamps` and `bbox` attributes of `EOPatch` objects:
7+
- `FeatureType.TIMESTAMPS` and `FeatureType.BBOX` have been deprecated, data should be accessed via attributes. Feature parsers no longer return these values (for instance when calling `EOPatch.get_features`).
8+
- EOPatches without temporal information now have a timestamp value of `None`, whereas a timestamp value `[]` signifies that the EOPatch has a temporal dimension of 0.
9+
- Introduced a `get_timestamps` method that will fail if `timestamps` are `None`. This can be used in cases where timestamps are assumed to be present (to avoid issues with type-checking and ill formed inputs).
10+
- Loading, saving, and copying of EOPatches will take `timestamps` into account either when processing the full eopatch (i.e. `features=...`) or if the selection contains a temporal feature. The behavior can be controlled via the `load_timestamps`/`save_timestamps`/`copy_timestamps` parameter.
11+
- Saving and loading of `FeatureType.META_INFO` now processes each feature as a separate file, allowing better filtering and preventing accidental overwriting.
12+
- The default backend for `SpatialResizeTask` has been switched to `cv2` to reduce the number of dependencies.
13+
- `eolearn.geometry.morphology` tasks now use `cv2` instead of `scikit-image` to reduce the number of dependencies. The task interfaces have been slightly adjusted.
14+
- Improved reports:
15+
- Exception grouping is now done by exception origin instead of exception message, resulting in shorter reports.
16+
- Added execution time statistics per node
17+
- `CloudMaskTask` has been restricted to mono-temporal predictions using the `s2cloudless` package. For the multi-temporal one check [here](https://github.com/sentinel-hub/eo-learn-examples/blob/main/extra-tasks/cloud_mask/cloud_mask.py).
18+
- Certain tasks (for instance `SaveTask` and `LoadTask`) no longer pass arguments to the super-class via **kwargs in order to improve documentation and type-checking.
19+
- `SaveTask` and `LoadTask` now raise `OSError` exceptions instead of `IOError`.
20+
- Project-specific and outdated EOTasks were moved to extras or to the example repository [eo-learn-examples/extra-tasks](https://github.com/sentinel-hub/eo-learn-examples/tree/main/extra-tasks).
21+
- The submodule `eolearn.features.bands_extraction` has been renamed to `eolearn.features.ndi`.
22+
- The submodule `eolearn.ml_tools.extra.plotting` has been moved to `eolearn.visualization.utils`.
23+
- Compression of EOPatch files has been hardcoded. The parameter `compression_level` has been deprecated and has no effect.
24+
- Introduced experimental `zarr` support for loading/saving temporal slices of temporal features. The API might be changed in future releases.
25+
- Limited `rasterio` to 1.3.7 due to an issue with importing rasters from AWS S3
26+
- Updated examples, simplified tests, various improvements.
27+
28+
29+
## [Version 1.4.2] - 2023-03-14
230

331
- Introduced support for Python 3.11.
432
- Removed support for Python 3.7.
@@ -13,7 +41,7 @@
1341
- Various refactoring efforts and dependency improvements.
1442
- Various improvements to tests and code.
1543

16-
## [Version 1.4.1] - 2023-3-14
44+
## [Version 1.4.1] - 2023-03-14
1745

1846
- The codebase is now fully annotated and type annotations are mandatory for all new code.
1947
- In the future `EOPatch` objects will **require** a valid `bbox`. For now the users are warned when no such value is provided.
@@ -27,7 +55,7 @@
2755
- Various other minor improvements and deprecations.
2856

2957

30-
## [Version 1.4.0] - 2023-1-20
58+
## [Version 1.4.0] - 2023-01-20
3159

3260
- (**codebreaking**) Complete overhaul of `eolearn.coregistration`. See documentation for details.
3361
- (**codebreaking**) Removed non-working HVPlot backend for `eolearn.visualization`.

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ For any question, feel free to contact us at [[email protected]](eoresear
2222

2323
We strive to provide high-quality working code, but bugs happen nevertheless.
2424

25-
When reporting a bug, please check [here][open-bug-list] whether the bug was already reported. If not, open an issue with the **bug** label and report the following information:
25+
When reporting a bug, please check [the issue tracker][open-bug-list] whether the bug was already reported. If not, open an issue with the **bug** label and report the following information:
2626

2727
* Issue description
2828
* How to reproduce the issue
@@ -36,7 +36,7 @@ This information helps us to reproduce, pinpoint, and fix the reported issue. If
3636

3737
## Feature Requests
3838

39-
Existing feature requests can be found [here][existing-feature-requests].
39+
Existing feature requests can be found [in the issues][existing-feature-requests].
4040

4141
A new feature request can be created by opening a new issue with the **enhancement** label, and describing how the feature would benefit the **eo-learn** community. Providing an example use-case would help assessing the scope of the feature request.
4242

MANIFEST.in

-5
This file was deleted.

Makefile

+10-176
Original file line numberDiff line numberDiff line change
@@ -1,187 +1,21 @@
11
# Makefile for creating a new release of the package and uploading it to PyPI
22

33
PYTHON = python3
4-
PACKAGES = core coregistration features geometry io mask ml_tools visualization
5-
PYLINT = pylint
64

75
.PHONY: $(PACKAGES:test)
8-
.SILENT: pylint pylint-fast
96

107
help:
11-
@echo "Use 'make upload-<package>' to upload the package to PyPi"
12-
@echo "Use 'make pylint' to run pylint on the code of all subpackages"
8+
@echo "Use 'make test-upload' to upload the package to testPyPi"
9+
@echo "Use 'make upload' to upload the package to PyPi"
1310

14-
mypy:
15-
mypy \
16-
core/eolearn/core \
17-
coregistration/eolearn/coregistration \
18-
geometry/eolearn/geometry \
19-
features/eolearn/features \
20-
io/eolearn/io \
21-
mask/eolearn/mask \
22-
ml_tools/eolearn/ml_tools \
23-
visualization/eolearn/visualization
2411

25-
pylint:
26-
# Runs pylint on all subpackages consecutively and makes sure any error status code gets propagated.
27-
export PYLINT_STATUS=0
28-
for package in $(PACKAGES) ; do \
29-
$(PYLINT) $$package/eolearn/$$package || export PYLINT_STATUS=$$?; \
30-
done;
31-
exit $$PYLINT_STATUS
32-
33-
34-
pylint-fast:
35-
# Runs pylint on all subpackages in parallel. Because of that output verdicts are not in the order of package
36-
# names and this process cannot be interrupted.
37-
for package in $(PACKAGES) ; do \
38-
$(PYLINT) $$package/eolearn/$$package & \
39-
done;
40-
wait
41-
42-
.ONESHELL:
43-
build-core:
44-
cd core
45-
cp ../LICENSE LICENSE
46-
rm -r dist build | true
47-
$(PYTHON) setup.py sdist bdist_wheel
48-
rm LICENSE
49-
50-
.ONESHELL:
51-
build-coregistration:
52-
cd coregistration
53-
cp ../LICENSE LICENSE
54-
rm -r dist build | true
55-
$(PYTHON) setup.py sdist bdist_wheel
56-
rm LICENSE
57-
58-
.ONESHELL:
59-
build-features:
60-
cd features
61-
cp ../LICENSE LICENSE
62-
rm -r dist build | true
63-
$(PYTHON) setup.py sdist bdist_wheel
64-
rm LICENSE
65-
66-
.ONESHELL:
67-
build-geometry:
68-
cd geometry
69-
cp ../LICENSE LICENSE
70-
rm -r dist build | true
71-
$(PYTHON) setup.py sdist bdist_wheel
72-
rm LICENSE
73-
74-
.ONESHELL:
75-
build-io:
76-
cd io
77-
cp ../LICENSE LICENSE
78-
rm -r dist build | true
79-
$(PYTHON) setup.py sdist bdist_wheel
80-
rm LICENSE
81-
82-
.ONESHELL:
83-
build-mask:
84-
cd mask
85-
cp ../LICENSE LICENSE
86-
rm -r dist build | true
87-
$(PYTHON) setup.py sdist bdist_wheel
88-
rm LICENSE
89-
90-
.ONESHELL:
91-
build-ml-tools:
92-
cd ml_tools
93-
cp ../LICENSE LICENSE
94-
rm -r dist build | true
95-
$(PYTHON) setup.py sdist bdist_wheel
96-
rm LICENSE
97-
98-
.ONESHELL:
99-
build-visualization:
100-
cd visualization
101-
cp ../LICENSE LICENSE
102-
rm -r dist build | true
103-
$(PYTHON) setup.py sdist bdist_wheel
104-
rm LICENSE
105-
106-
.ONESHELL:
107-
build-abstract-package:
108-
rm -r dist build | true
109-
$(PYTHON) setup.py sdist bdist_wheel
110-
111-
upload-core: build-core
112-
twine upload core/dist/*
113-
114-
upload-coregistration: build-coregistration
115-
twine upload coregistration/dist/*
116-
117-
upload-features: build-features
118-
twine upload features/dist/*
119-
120-
upload-geometry: build-geometry
121-
twine upload geometry/dist/*
122-
123-
upload-io: build-io
124-
twine upload io/dist/*
125-
126-
upload-mask: build-mask
127-
twine upload mask/dist/*
128-
129-
upload-ml-tools: build-ml-tools
130-
twine upload ml_tools/dist/*
131-
132-
upload-visualization: build-visualization
133-
twine upload visualization/dist/*
134-
135-
upload-abstract-package: build-abstract-package
136-
twine upload dist/*
137-
138-
upload-all: \
139-
upload-core \
140-
upload-coregistration \
141-
upload-features \
142-
upload-geometry \
143-
upload-io \
144-
upload-mask \
145-
upload-ml-tools \
146-
upload-visualization \
147-
upload-abstract-package
12+
upload:
13+
rm -r dist | true
14+
python -m build --sdist --wheel
15+
twine upload --skip-existing dist/*
14816

14917
# For testing:
150-
151-
test-upload-core: build-core
152-
twine upload --repository testpypi core/dist/*
153-
154-
test-upload-coregistration: build-coregistration
155-
twine upload --repository testpypi coregistration/dist/*
156-
157-
test-upload-features: build-features
158-
twine upload --repository testpypi features/dist/*
159-
160-
test-upload-geometry: build-geometry
161-
twine upload --repository testpypi geometry/dist/*
162-
163-
test-upload-io: build-io
164-
twine upload --repository testpypi io/dist/*
165-
166-
test-upload-mask: build-mask
167-
twine upload --repository testpypi mask/dist/*
168-
169-
test-upload-ml-tools: build-ml-tools
170-
twine upload --repository testpypi ml_tools/dist/*
171-
172-
test-upload-visualization: build-visualization
173-
twine upload --repository testpypi visualization/dist/*
174-
175-
test-upload-abstract-package: build-abstract-package
176-
twine upload --repository testpypi dist/*
177-
178-
test-upload-all: \
179-
test-upload-core \
180-
test-upload-coregistration \
181-
test-upload-features \
182-
test-upload-geometry \
183-
test-upload-io \
184-
test-upload-mask \
185-
test-upload-ml-tools \
186-
test-upload-visualization \
187-
test-upload-abstract-package
18+
test-upload:
19+
rm -r dist | true
20+
python -m build --sdist --wheel
21+
twine upload --repository testpypi --skip-existing dist/*

0 commit comments

Comments
 (0)