diff --git a/CHANGELOG.md b/CHANGELOG.md index 6eb67907..be0dc2dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,31 @@ +## [Version 1.5.0] - 2023-09-06 + +The release focuses on making `eo-learn` much simpler to install, reducing the number of dependencies, and improving validation of soundness of `EOPatch` data. + +- `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. +- Changes to `timestamps` and `bbox` attributes of `EOPatch` objects: + - `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`). + - 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. + - 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). + - 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. +- Saving and loading of `FeatureType.META_INFO` now processes each feature as a separate file, allowing better filtering and preventing accidental overwriting. +- The default backend for `SpatialResizeTask` has been switched to `cv2` to reduce the number of dependencies. +- `eolearn.geometry.morphology` tasks now use `cv2` instead of `scikit-image` to reduce the number of dependencies. The task interfaces have been slightly adjusted. +- Improved reports: + - Exception grouping is now done by exception origin instead of exception message, resulting in shorter reports. + - Added execution time statistics per node +- `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). +- 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. +- `SaveTask` and `LoadTask` now raise `OSError` exceptions instead of `IOError`. +- 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). +- The submodule `eolearn.features.bands_extraction` has been renamed to `eolearn.features.ndi`. +- The submodule `eolearn.ml_tools.extra.plotting` has been moved to `eolearn.visualization.utils`. +- Compression of EOPatch files has been hardcoded. The parameter `compression_level` has been deprecated and has no effect. +- Introduced experimental `zarr` support for loading/saving temporal slices of temporal features. The API might be changed in future releases. +- Limited `rasterio` to 1.3.7 due to an issue with importing rasters from AWS S3 +- Updated examples, simplified tests, various improvements. + + ## [Version 1.4.2] - 2023-03-14 - Introduced support for Python 3.11. diff --git a/core/requirements.txt b/core/requirements.txt index b25b4e9c..56205006 100644 --- a/core/requirements.txt +++ b/core/requirements.txt @@ -1 +1 @@ -eo-learn[ALL] +eo-learn diff --git a/coregistration/requirements.txt b/coregistration/requirements.txt index b25b4e9c..56205006 100644 --- a/coregistration/requirements.txt +++ b/coregistration/requirements.txt @@ -1 +1 @@ -eo-learn[ALL] +eo-learn diff --git a/eolearn/__init__.py b/eolearn/__init__.py index c3566b29..61e39397 100644 --- a/eolearn/__init__.py +++ b/eolearn/__init__.py @@ -1,5 +1,5 @@ """Main module of the `eolearn` package.""" -__version__ = "1.4.2" +__version__ = "1.5.0" import importlib.util import warnings diff --git a/eolearn/core/eodata.py b/eolearn/core/eodata.py index 0a1b8549..5f0dda5a 100644 --- a/eolearn/core/eodata.py +++ b/eolearn/core/eodata.py @@ -782,7 +782,7 @@ def plot( from eolearn.visualization.eopatch import plot_eopatch except ImportError: raise RuntimeError( - "Subpackage eo-learn-visualization has to be installed in order to use EOPatch visualization method" + "Dependencies `eo-learn[VISUALIZATION]` have to be installed in order to use EOPatch plotting." ) return plot_eopatch( diff --git a/eolearn/core/eoexecution.py b/eolearn/core/eoexecution.py index 2636c75b..de224990 100644 --- a/eolearn/core/eoexecution.py +++ b/eolearn/core/eoexecution.py @@ -358,7 +358,7 @@ def make_report(self, include_logs: bool = True) -> None: from eolearn.visualization.eoexecutor import EOExecutorVisualization except ImportError: raise RuntimeError( - "Subpackage eo-learn-visualization has to be installed in order to create EOExecutor reports." + "Dependencies `eo-learn[VISUALIZATION]` have to be installed in order to create EOExecutor reports." ) return EOExecutorVisualization(self).make_report(include_logs=include_logs) diff --git a/eolearn/core/eoworkflow.py b/eolearn/core/eoworkflow.py index aeefcab4..3c7e5fe6 100644 --- a/eolearn/core/eoworkflow.py +++ b/eolearn/core/eoworkflow.py @@ -347,7 +347,7 @@ def _get_visualization(self): # type: ignore[no-untyped-def] # cannot type with from eolearn.visualization.eoworkflow import EOWorkflowVisualization except ImportError: raise RuntimeError( - "Subpackage eo-learn-visualization has to be installed in order to use EOWorkflow visualization methods" + "Dependencies `eo-learn[VISUALIZATION]` have to be installed in order to use EOWorkflow visualization." ) return EOWorkflowVisualization(self._nodes) diff --git a/examples/visualization/EOPatchVisualization.ipynb b/examples/visualization/EOPatchVisualization.ipynb index d61f1c57..5eef2ecc 100644 --- a/examples/visualization/EOPatchVisualization.ipynb +++ b/examples/visualization/EOPatchVisualization.ipynb @@ -97,7 +97,7 @@ "source": [ "## Basics\n", "\n", - "All visualizations can be done simply by calling `EOPatch.plot` method, however calling this method still requires that `eo-learn-visualization` subpackage is installed.\n", + "All visualizations can be done simply by calling `EOPatch.plot` method, however calling this method still requires that Dependencies `eo-learn[VISUALIZATION]` are installed.\n", "\n", "Plotting a simple timeless single-channel feature produces a single-image plot. Plotting method always returns a 2D grid of `AxesSubplot` objects which can be further customized before a plot is produced." ] @@ -342,7 +342,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.4" + "version": "3.8.10" }, "vscode": { "interpreter": { diff --git a/features/requirements.txt b/features/requirements.txt index b25b4e9c..56205006 100644 --- a/features/requirements.txt +++ b/features/requirements.txt @@ -1 +1 @@ -eo-learn[ALL] +eo-learn diff --git a/geometry/requirements.txt b/geometry/requirements.txt index b25b4e9c..56205006 100644 --- a/geometry/requirements.txt +++ b/geometry/requirements.txt @@ -1 +1 @@ -eo-learn[ALL] +eo-learn diff --git a/install_all.py b/install_all.py index 90ac76ad..e225d69f 100644 --- a/install_all.py +++ b/install_all.py @@ -16,5 +16,5 @@ subprocess.check_call([sys.executable, "-m", "pip", "install", *sys.argv[1:], ".[ALL]"]) warnings.warn( "Installing via `install_all.py` is no longer necessary and has been deprecated. Use `pip install" - " eo-learn[ALL]` instead." + " eo-learn` instead." ) diff --git a/io/requirements.txt b/io/requirements.txt index b25b4e9c..56205006 100644 --- a/io/requirements.txt +++ b/io/requirements.txt @@ -1 +1 @@ -eo-learn[ALL] +eo-learn diff --git a/mask/requirements.txt b/mask/requirements.txt index b25b4e9c..56205006 100644 --- a/mask/requirements.txt +++ b/mask/requirements.txt @@ -1 +1 @@ -eo-learn[ALL] +eo-learn diff --git a/ml_tools/requirements.txt b/ml_tools/requirements.txt index b25b4e9c..56205006 100644 --- a/ml_tools/requirements.txt +++ b/ml_tools/requirements.txt @@ -1 +1 @@ -eo-learn[ALL] +eo-learn diff --git a/pyproject.toml b/pyproject.toml index f3aeb34a..a360da13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,26 +53,23 @@ dependencies = [ "sentinelhub>=3.9.0", "tqdm>=4.27", "typing-extensions", + "opencv-python-headless", + "affine", + "rasterio>=1.2.7, <1.3.8", + "shapely", + "fiona>=1.8.18", ] [project.optional-dependencies] -all = [ - "eo-learn[COREGISTRATION,FEATURES,GEOMETRY,IO,MASK,MLTOOLS,VISUALIZATION]", -] -full = ["eo-learn[ALL,RAY,ZARR,FEATURES_EXTRA,MASK_EXTRA]"] + +full = ["eo-learn[RAY,ZARR,FEATURES_EXTRA,MASK_EXTRA,VISUALIZATION]"] ray = ["ray[default]"] zarr = ["s3fs", "zarr"] -coregistration = ["opencv-python-headless"] -features = ["opencv-python-headless"] features_extra = ["numba>=0.53.0", "scikit-learn", "scipy"] -geometry = ["affine", "opencv-python-headless", "rasterio>=1.2.7, <1.3.8", "shapely"] -io = ["affine", "fiona>=1.8.18", "rasterio>=1.2.7, <1.3.8"] -mask = ["opencv-python-headless"] mask_extra = ["s2cloudless"] -mltools = ["shapely"] visualization = ["graphviz>=0.10.1", "jinja2", "matplotlib", "pygments"] docs = [ - "eo-learn[ALL]", + "eo-learn[FULL]", "jupyter", "nbsphinx", "sphinx==7.1.2", diff --git a/visualization/requirements.txt b/visualization/requirements.txt index b25b4e9c..56205006 100644 --- a/visualization/requirements.txt +++ b/visualization/requirements.txt @@ -1 +1 @@ -eo-learn[ALL] +eo-learn