From f3a2ba1d0f6c584d2b66121fe2bf5fd2211f66f4 Mon Sep 17 00:00:00 2001 From: Ziga Luksic Date: Tue, 27 Jun 2023 13:40:55 +0200 Subject: [PATCH 01/18] move core files --- core/MANIFEST.in | 8 -------- core/eolearn/__init__.py | 1 - {core/eolearn => eolearn}/core/__init__.py | 0 {core/eolearn => eolearn}/core/constants.py | 0 {core/eolearn => eolearn}/core/core_tasks.py | 0 {core/eolearn => eolearn}/core/eodata.py | 0 {core/eolearn => eolearn}/core/eodata_io.py | 0 {core/eolearn => eolearn}/core/eodata_merge.py | 0 {core/eolearn => eolearn}/core/eoexecution.py | 0 {core/eolearn => eolearn}/core/eonode.py | 0 {core/eolearn => eolearn}/core/eotask.py | 0 {core/eolearn => eolearn}/core/eoworkflow.py | 0 {core/eolearn => eolearn}/core/eoworkflow_tasks.py | 0 {core/eolearn => eolearn}/core/exceptions.py | 0 {core/eolearn => eolearn}/core/extra/__init__.py | 0 {core/eolearn => eolearn}/core/extra/ray.py | 0 {core/eolearn => eolearn}/core/graph.py | 0 {core/eolearn => eolearn}/core/py.typed | 0 {core/eolearn => eolearn}/core/types.py | 0 {core/eolearn => eolearn}/core/utils/__init__.py | 0 {core/eolearn => eolearn}/core/utils/common.py | 0 {core/eolearn => eolearn}/core/utils/fs.py | 0 {core/eolearn => eolearn}/core/utils/logging.py | 0 {core/eolearn => eolearn}/core/utils/parallelize.py | 0 {core/eolearn => eolearn}/core/utils/parsing.py | 0 {core/eolearn => eolearn}/core/utils/raster.py | 0 {core/eolearn => eolearn}/core/utils/testing.py | 0 {core/eolearn => eolearn}/core/utils/types.py | 0 {core/eolearn/tests => tests/core}/__init__.py | 0 {core/eolearn/tests => tests/core}/conftest.py | 0 .../tests => tests/core}/stats/test_save_stats.pkl | Bin .../eolearn/tests => tests/core}/test_constants.py | 0 .../eolearn/tests => tests/core}/test_core_tasks.py | 0 {core/eolearn/tests => tests/core}/test_eodata.py | 0 .../eolearn/tests => tests/core}/test_eodata_io.py | 0 .../tests => tests/core}/test_eodata_merge.py | 0 .../eolearn/tests => tests/core}/test_eoexecutor.py | 0 {core/eolearn/tests => tests/core}/test_eonode.py | 0 {core/eolearn/tests => tests/core}/test_eotask.py | 0 .../eolearn/tests => tests/core}/test_eoworkflow.py | 0 .../tests => tests/core}/test_eoworkflow_tasks.py | 0 .../tests => tests/core}/test_extra/__init__.py | 0 .../tests => tests/core}/test_extra/test_ray.py | 0 {core/eolearn/tests => tests/core}/test_graph.py | 0 .../tests => tests/core}/test_utils/test_common.py | 0 .../tests => tests/core}/test_utils/test_fs.py | 0 .../core}/test_utils/test_parallelize.py | 0 .../tests => tests/core}/test_utils/test_parsing.py | 0 .../tests => tests/core}/test_utils/test_raster.py | 0 .../tests => tests/core}/test_utils/test_testing.py | 0 50 files changed, 9 deletions(-) delete mode 100644 core/MANIFEST.in delete mode 100644 core/eolearn/__init__.py rename {core/eolearn => eolearn}/core/__init__.py (100%) rename {core/eolearn => eolearn}/core/constants.py (100%) rename {core/eolearn => eolearn}/core/core_tasks.py (100%) rename {core/eolearn => eolearn}/core/eodata.py (100%) rename {core/eolearn => eolearn}/core/eodata_io.py (100%) rename {core/eolearn => eolearn}/core/eodata_merge.py (100%) rename {core/eolearn => eolearn}/core/eoexecution.py (100%) rename {core/eolearn => eolearn}/core/eonode.py (100%) rename {core/eolearn => eolearn}/core/eotask.py (100%) rename {core/eolearn => eolearn}/core/eoworkflow.py (100%) rename {core/eolearn => eolearn}/core/eoworkflow_tasks.py (100%) rename {core/eolearn => eolearn}/core/exceptions.py (100%) rename {core/eolearn => eolearn}/core/extra/__init__.py (100%) rename {core/eolearn => eolearn}/core/extra/ray.py (100%) rename {core/eolearn => eolearn}/core/graph.py (100%) rename {core/eolearn => eolearn}/core/py.typed (100%) rename {core/eolearn => eolearn}/core/types.py (100%) rename {core/eolearn => eolearn}/core/utils/__init__.py (100%) rename {core/eolearn => eolearn}/core/utils/common.py (100%) rename {core/eolearn => eolearn}/core/utils/fs.py (100%) rename {core/eolearn => eolearn}/core/utils/logging.py (100%) rename {core/eolearn => eolearn}/core/utils/parallelize.py (100%) rename {core/eolearn => eolearn}/core/utils/parsing.py (100%) rename {core/eolearn => eolearn}/core/utils/raster.py (100%) rename {core/eolearn => eolearn}/core/utils/testing.py (100%) rename {core/eolearn => eolearn}/core/utils/types.py (100%) rename {core/eolearn/tests => tests/core}/__init__.py (100%) rename {core/eolearn/tests => tests/core}/conftest.py (100%) rename {core/eolearn/tests => tests/core}/stats/test_save_stats.pkl (100%) rename {core/eolearn/tests => tests/core}/test_constants.py (100%) rename {core/eolearn/tests => tests/core}/test_core_tasks.py (100%) rename {core/eolearn/tests => tests/core}/test_eodata.py (100%) rename {core/eolearn/tests => tests/core}/test_eodata_io.py (100%) rename {core/eolearn/tests => tests/core}/test_eodata_merge.py (100%) rename {core/eolearn/tests => tests/core}/test_eoexecutor.py (100%) rename {core/eolearn/tests => tests/core}/test_eonode.py (100%) rename {core/eolearn/tests => tests/core}/test_eotask.py (100%) rename {core/eolearn/tests => tests/core}/test_eoworkflow.py (100%) rename {core/eolearn/tests => tests/core}/test_eoworkflow_tasks.py (100%) rename {core/eolearn/tests => tests/core}/test_extra/__init__.py (100%) rename {core/eolearn/tests => tests/core}/test_extra/test_ray.py (100%) rename {core/eolearn/tests => tests/core}/test_graph.py (100%) rename {core/eolearn/tests => tests/core}/test_utils/test_common.py (100%) rename {core/eolearn/tests => tests/core}/test_utils/test_fs.py (100%) rename {core/eolearn/tests => tests/core}/test_utils/test_parallelize.py (100%) rename {core/eolearn/tests => tests/core}/test_utils/test_parsing.py (100%) rename {core/eolearn/tests => tests/core}/test_utils/test_raster.py (100%) rename {core/eolearn/tests => tests/core}/test_utils/test_testing.py (100%) diff --git a/core/MANIFEST.in b/core/MANIFEST.in deleted file mode 100644 index 4b271965f..000000000 --- a/core/MANIFEST.in +++ /dev/null @@ -1,8 +0,0 @@ -include requirements*.txt -include LICENSE -include README.md -include eolearn/core/py.typed -exclude eolearn/tests/* -exclude eolearn/tests/test_extra/* -exclude eolearn/tests/test_utils/* -exclude eolearn/tests/stats/* diff --git a/core/eolearn/__init__.py b/core/eolearn/__init__.py deleted file mode 100644 index 8db66d3d0..000000000 --- a/core/eolearn/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/core/eolearn/core/__init__.py b/eolearn/core/__init__.py similarity index 100% rename from core/eolearn/core/__init__.py rename to eolearn/core/__init__.py diff --git a/core/eolearn/core/constants.py b/eolearn/core/constants.py similarity index 100% rename from core/eolearn/core/constants.py rename to eolearn/core/constants.py diff --git a/core/eolearn/core/core_tasks.py b/eolearn/core/core_tasks.py similarity index 100% rename from core/eolearn/core/core_tasks.py rename to eolearn/core/core_tasks.py diff --git a/core/eolearn/core/eodata.py b/eolearn/core/eodata.py similarity index 100% rename from core/eolearn/core/eodata.py rename to eolearn/core/eodata.py diff --git a/core/eolearn/core/eodata_io.py b/eolearn/core/eodata_io.py similarity index 100% rename from core/eolearn/core/eodata_io.py rename to eolearn/core/eodata_io.py diff --git a/core/eolearn/core/eodata_merge.py b/eolearn/core/eodata_merge.py similarity index 100% rename from core/eolearn/core/eodata_merge.py rename to eolearn/core/eodata_merge.py diff --git a/core/eolearn/core/eoexecution.py b/eolearn/core/eoexecution.py similarity index 100% rename from core/eolearn/core/eoexecution.py rename to eolearn/core/eoexecution.py diff --git a/core/eolearn/core/eonode.py b/eolearn/core/eonode.py similarity index 100% rename from core/eolearn/core/eonode.py rename to eolearn/core/eonode.py diff --git a/core/eolearn/core/eotask.py b/eolearn/core/eotask.py similarity index 100% rename from core/eolearn/core/eotask.py rename to eolearn/core/eotask.py diff --git a/core/eolearn/core/eoworkflow.py b/eolearn/core/eoworkflow.py similarity index 100% rename from core/eolearn/core/eoworkflow.py rename to eolearn/core/eoworkflow.py diff --git a/core/eolearn/core/eoworkflow_tasks.py b/eolearn/core/eoworkflow_tasks.py similarity index 100% rename from core/eolearn/core/eoworkflow_tasks.py rename to eolearn/core/eoworkflow_tasks.py diff --git a/core/eolearn/core/exceptions.py b/eolearn/core/exceptions.py similarity index 100% rename from core/eolearn/core/exceptions.py rename to eolearn/core/exceptions.py diff --git a/core/eolearn/core/extra/__init__.py b/eolearn/core/extra/__init__.py similarity index 100% rename from core/eolearn/core/extra/__init__.py rename to eolearn/core/extra/__init__.py diff --git a/core/eolearn/core/extra/ray.py b/eolearn/core/extra/ray.py similarity index 100% rename from core/eolearn/core/extra/ray.py rename to eolearn/core/extra/ray.py diff --git a/core/eolearn/core/graph.py b/eolearn/core/graph.py similarity index 100% rename from core/eolearn/core/graph.py rename to eolearn/core/graph.py diff --git a/core/eolearn/core/py.typed b/eolearn/core/py.typed similarity index 100% rename from core/eolearn/core/py.typed rename to eolearn/core/py.typed diff --git a/core/eolearn/core/types.py b/eolearn/core/types.py similarity index 100% rename from core/eolearn/core/types.py rename to eolearn/core/types.py diff --git a/core/eolearn/core/utils/__init__.py b/eolearn/core/utils/__init__.py similarity index 100% rename from core/eolearn/core/utils/__init__.py rename to eolearn/core/utils/__init__.py diff --git a/core/eolearn/core/utils/common.py b/eolearn/core/utils/common.py similarity index 100% rename from core/eolearn/core/utils/common.py rename to eolearn/core/utils/common.py diff --git a/core/eolearn/core/utils/fs.py b/eolearn/core/utils/fs.py similarity index 100% rename from core/eolearn/core/utils/fs.py rename to eolearn/core/utils/fs.py diff --git a/core/eolearn/core/utils/logging.py b/eolearn/core/utils/logging.py similarity index 100% rename from core/eolearn/core/utils/logging.py rename to eolearn/core/utils/logging.py diff --git a/core/eolearn/core/utils/parallelize.py b/eolearn/core/utils/parallelize.py similarity index 100% rename from core/eolearn/core/utils/parallelize.py rename to eolearn/core/utils/parallelize.py diff --git a/core/eolearn/core/utils/parsing.py b/eolearn/core/utils/parsing.py similarity index 100% rename from core/eolearn/core/utils/parsing.py rename to eolearn/core/utils/parsing.py diff --git a/core/eolearn/core/utils/raster.py b/eolearn/core/utils/raster.py similarity index 100% rename from core/eolearn/core/utils/raster.py rename to eolearn/core/utils/raster.py diff --git a/core/eolearn/core/utils/testing.py b/eolearn/core/utils/testing.py similarity index 100% rename from core/eolearn/core/utils/testing.py rename to eolearn/core/utils/testing.py diff --git a/core/eolearn/core/utils/types.py b/eolearn/core/utils/types.py similarity index 100% rename from core/eolearn/core/utils/types.py rename to eolearn/core/utils/types.py diff --git a/core/eolearn/tests/__init__.py b/tests/core/__init__.py similarity index 100% rename from core/eolearn/tests/__init__.py rename to tests/core/__init__.py diff --git a/core/eolearn/tests/conftest.py b/tests/core/conftest.py similarity index 100% rename from core/eolearn/tests/conftest.py rename to tests/core/conftest.py diff --git a/core/eolearn/tests/stats/test_save_stats.pkl b/tests/core/stats/test_save_stats.pkl similarity index 100% rename from core/eolearn/tests/stats/test_save_stats.pkl rename to tests/core/stats/test_save_stats.pkl diff --git a/core/eolearn/tests/test_constants.py b/tests/core/test_constants.py similarity index 100% rename from core/eolearn/tests/test_constants.py rename to tests/core/test_constants.py diff --git a/core/eolearn/tests/test_core_tasks.py b/tests/core/test_core_tasks.py similarity index 100% rename from core/eolearn/tests/test_core_tasks.py rename to tests/core/test_core_tasks.py diff --git a/core/eolearn/tests/test_eodata.py b/tests/core/test_eodata.py similarity index 100% rename from core/eolearn/tests/test_eodata.py rename to tests/core/test_eodata.py diff --git a/core/eolearn/tests/test_eodata_io.py b/tests/core/test_eodata_io.py similarity index 100% rename from core/eolearn/tests/test_eodata_io.py rename to tests/core/test_eodata_io.py diff --git a/core/eolearn/tests/test_eodata_merge.py b/tests/core/test_eodata_merge.py similarity index 100% rename from core/eolearn/tests/test_eodata_merge.py rename to tests/core/test_eodata_merge.py diff --git a/core/eolearn/tests/test_eoexecutor.py b/tests/core/test_eoexecutor.py similarity index 100% rename from core/eolearn/tests/test_eoexecutor.py rename to tests/core/test_eoexecutor.py diff --git a/core/eolearn/tests/test_eonode.py b/tests/core/test_eonode.py similarity index 100% rename from core/eolearn/tests/test_eonode.py rename to tests/core/test_eonode.py diff --git a/core/eolearn/tests/test_eotask.py b/tests/core/test_eotask.py similarity index 100% rename from core/eolearn/tests/test_eotask.py rename to tests/core/test_eotask.py diff --git a/core/eolearn/tests/test_eoworkflow.py b/tests/core/test_eoworkflow.py similarity index 100% rename from core/eolearn/tests/test_eoworkflow.py rename to tests/core/test_eoworkflow.py diff --git a/core/eolearn/tests/test_eoworkflow_tasks.py b/tests/core/test_eoworkflow_tasks.py similarity index 100% rename from core/eolearn/tests/test_eoworkflow_tasks.py rename to tests/core/test_eoworkflow_tasks.py diff --git a/core/eolearn/tests/test_extra/__init__.py b/tests/core/test_extra/__init__.py similarity index 100% rename from core/eolearn/tests/test_extra/__init__.py rename to tests/core/test_extra/__init__.py diff --git a/core/eolearn/tests/test_extra/test_ray.py b/tests/core/test_extra/test_ray.py similarity index 100% rename from core/eolearn/tests/test_extra/test_ray.py rename to tests/core/test_extra/test_ray.py diff --git a/core/eolearn/tests/test_graph.py b/tests/core/test_graph.py similarity index 100% rename from core/eolearn/tests/test_graph.py rename to tests/core/test_graph.py diff --git a/core/eolearn/tests/test_utils/test_common.py b/tests/core/test_utils/test_common.py similarity index 100% rename from core/eolearn/tests/test_utils/test_common.py rename to tests/core/test_utils/test_common.py diff --git a/core/eolearn/tests/test_utils/test_fs.py b/tests/core/test_utils/test_fs.py similarity index 100% rename from core/eolearn/tests/test_utils/test_fs.py rename to tests/core/test_utils/test_fs.py diff --git a/core/eolearn/tests/test_utils/test_parallelize.py b/tests/core/test_utils/test_parallelize.py similarity index 100% rename from core/eolearn/tests/test_utils/test_parallelize.py rename to tests/core/test_utils/test_parallelize.py diff --git a/core/eolearn/tests/test_utils/test_parsing.py b/tests/core/test_utils/test_parsing.py similarity index 100% rename from core/eolearn/tests/test_utils/test_parsing.py rename to tests/core/test_utils/test_parsing.py diff --git a/core/eolearn/tests/test_utils/test_raster.py b/tests/core/test_utils/test_raster.py similarity index 100% rename from core/eolearn/tests/test_utils/test_raster.py rename to tests/core/test_utils/test_raster.py diff --git a/core/eolearn/tests/test_utils/test_testing.py b/tests/core/test_utils/test_testing.py similarity index 100% rename from core/eolearn/tests/test_utils/test_testing.py rename to tests/core/test_utils/test_testing.py From cfe44fcb5194036f3e319fe4f9ab202df4870461 Mon Sep 17 00:00:00 2001 From: Ziga Luksic Date: Tue, 27 Jun 2023 13:45:55 +0200 Subject: [PATCH 02/18] move coregistration files --- coregistration/MANIFEST.in | 5 ----- coregistration/eolearn/__init__.py | 1 - .../eolearn => eolearn}/coregistration/__init__.py | 0 .../eolearn => eolearn}/coregistration/coregistration.py | 0 {coregistration/eolearn => eolearn}/coregistration/py.typed | 0 .../eolearn/tests => tests/coregistration}/conftest.py | 0 .../tests => tests/coregistration}/test_coregistration.py | 0 7 files changed, 6 deletions(-) delete mode 100644 coregistration/MANIFEST.in delete mode 100644 coregistration/eolearn/__init__.py rename {coregistration/eolearn => eolearn}/coregistration/__init__.py (100%) rename {coregistration/eolearn => eolearn}/coregistration/coregistration.py (100%) rename {coregistration/eolearn => eolearn}/coregistration/py.typed (100%) rename {coregistration/eolearn/tests => tests/coregistration}/conftest.py (100%) rename {coregistration/eolearn/tests => tests/coregistration}/test_coregistration.py (100%) diff --git a/coregistration/MANIFEST.in b/coregistration/MANIFEST.in deleted file mode 100644 index 7d9a0dcc1..000000000 --- a/coregistration/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -include requirements*.txt -include LICENSE -include README.md -include eolearn/coregistration/py.typed -exclude eolearn/tests/* diff --git a/coregistration/eolearn/__init__.py b/coregistration/eolearn/__init__.py deleted file mode 100644 index 8db66d3d0..000000000 --- a/coregistration/eolearn/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/coregistration/eolearn/coregistration/__init__.py b/eolearn/coregistration/__init__.py similarity index 100% rename from coregistration/eolearn/coregistration/__init__.py rename to eolearn/coregistration/__init__.py diff --git a/coregistration/eolearn/coregistration/coregistration.py b/eolearn/coregistration/coregistration.py similarity index 100% rename from coregistration/eolearn/coregistration/coregistration.py rename to eolearn/coregistration/coregistration.py diff --git a/coregistration/eolearn/coregistration/py.typed b/eolearn/coregistration/py.typed similarity index 100% rename from coregistration/eolearn/coregistration/py.typed rename to eolearn/coregistration/py.typed diff --git a/coregistration/eolearn/tests/conftest.py b/tests/coregistration/conftest.py similarity index 100% rename from coregistration/eolearn/tests/conftest.py rename to tests/coregistration/conftest.py diff --git a/coregistration/eolearn/tests/test_coregistration.py b/tests/coregistration/test_coregistration.py similarity index 100% rename from coregistration/eolearn/tests/test_coregistration.py rename to tests/coregistration/test_coregistration.py From ebf8800415472074efd802acc497efc23b0b42c2 Mon Sep 17 00:00:00 2001 From: Ziga Luksic Date: Tue, 27 Jun 2023 13:49:03 +0200 Subject: [PATCH 03/18] move features --- {features/eolearn => eolearn}/features/__init__.py | 0 {features/eolearn => eolearn}/features/bands_extraction.py | 0 {features/eolearn => eolearn}/features/blob.py | 0 {features/eolearn => eolearn}/features/clustering.py | 0 .../features/doubly_logistic_approximation.py | 0 .../eolearn => eolearn}/features/feature_manipulation.py | 0 {features/eolearn => eolearn}/features/haralick.py | 0 {features/eolearn => eolearn}/features/hog.py | 0 {features/eolearn => eolearn}/features/interpolation.py | 0 .../eolearn => eolearn}/features/local_binary_pattern.py | 0 {features/eolearn => eolearn}/features/py.typed | 0 .../features/radiometric_normalization.py | 0 {features/eolearn => eolearn}/features/temporal_features.py | 0 {features/eolearn => eolearn}/features/utils.py | 0 features/MANIFEST.in | 5 ----- features/eolearn/__init__.py | 1 - {features/eolearn/tests => tests/features}/conftest.py | 0 .../tests => tests/features}/test_bands_extraction.py | 0 {features/eolearn/tests => tests/features}/test_blob.py | 0 .../eolearn/tests => tests/features}/test_clustering.py | 0 .../features}/test_doubly_logistic_approximation.py | 0 .../tests => tests/features}/test_feature_manipulation.py | 0 .../eolearn/tests => tests/features}/test_features_utils.py | 0 {features/eolearn/tests => tests/features}/test_haralick.py | 0 {features/eolearn/tests => tests/features}/test_hog.py | 0 .../eolearn/tests => tests/features}/test_interpolation.py | 0 .../tests => tests/features}/test_local_binary_pattern.py | 0 .../features}/test_radiometric_normalization.py | 0 .../tests => tests/features}/test_temporal_features.py | 0 29 files changed, 6 deletions(-) rename {features/eolearn => eolearn}/features/__init__.py (100%) rename {features/eolearn => eolearn}/features/bands_extraction.py (100%) rename {features/eolearn => eolearn}/features/blob.py (100%) rename {features/eolearn => eolearn}/features/clustering.py (100%) rename {features/eolearn => eolearn}/features/doubly_logistic_approximation.py (100%) rename {features/eolearn => eolearn}/features/feature_manipulation.py (100%) rename {features/eolearn => eolearn}/features/haralick.py (100%) rename {features/eolearn => eolearn}/features/hog.py (100%) rename {features/eolearn => eolearn}/features/interpolation.py (100%) rename {features/eolearn => eolearn}/features/local_binary_pattern.py (100%) rename {features/eolearn => eolearn}/features/py.typed (100%) rename {features/eolearn => eolearn}/features/radiometric_normalization.py (100%) rename {features/eolearn => eolearn}/features/temporal_features.py (100%) rename {features/eolearn => eolearn}/features/utils.py (100%) delete mode 100644 features/MANIFEST.in delete mode 100644 features/eolearn/__init__.py rename {features/eolearn/tests => tests/features}/conftest.py (100%) rename {features/eolearn/tests => tests/features}/test_bands_extraction.py (100%) rename {features/eolearn/tests => tests/features}/test_blob.py (100%) rename {features/eolearn/tests => tests/features}/test_clustering.py (100%) rename {features/eolearn/tests => tests/features}/test_doubly_logistic_approximation.py (100%) rename {features/eolearn/tests => tests/features}/test_feature_manipulation.py (100%) rename {features/eolearn/tests => tests/features}/test_features_utils.py (100%) rename {features/eolearn/tests => tests/features}/test_haralick.py (100%) rename {features/eolearn/tests => tests/features}/test_hog.py (100%) rename {features/eolearn/tests => tests/features}/test_interpolation.py (100%) rename {features/eolearn/tests => tests/features}/test_local_binary_pattern.py (100%) rename {features/eolearn/tests => tests/features}/test_radiometric_normalization.py (100%) rename {features/eolearn/tests => tests/features}/test_temporal_features.py (100%) diff --git a/features/eolearn/features/__init__.py b/eolearn/features/__init__.py similarity index 100% rename from features/eolearn/features/__init__.py rename to eolearn/features/__init__.py diff --git a/features/eolearn/features/bands_extraction.py b/eolearn/features/bands_extraction.py similarity index 100% rename from features/eolearn/features/bands_extraction.py rename to eolearn/features/bands_extraction.py diff --git a/features/eolearn/features/blob.py b/eolearn/features/blob.py similarity index 100% rename from features/eolearn/features/blob.py rename to eolearn/features/blob.py diff --git a/features/eolearn/features/clustering.py b/eolearn/features/clustering.py similarity index 100% rename from features/eolearn/features/clustering.py rename to eolearn/features/clustering.py diff --git a/features/eolearn/features/doubly_logistic_approximation.py b/eolearn/features/doubly_logistic_approximation.py similarity index 100% rename from features/eolearn/features/doubly_logistic_approximation.py rename to eolearn/features/doubly_logistic_approximation.py diff --git a/features/eolearn/features/feature_manipulation.py b/eolearn/features/feature_manipulation.py similarity index 100% rename from features/eolearn/features/feature_manipulation.py rename to eolearn/features/feature_manipulation.py diff --git a/features/eolearn/features/haralick.py b/eolearn/features/haralick.py similarity index 100% rename from features/eolearn/features/haralick.py rename to eolearn/features/haralick.py diff --git a/features/eolearn/features/hog.py b/eolearn/features/hog.py similarity index 100% rename from features/eolearn/features/hog.py rename to eolearn/features/hog.py diff --git a/features/eolearn/features/interpolation.py b/eolearn/features/interpolation.py similarity index 100% rename from features/eolearn/features/interpolation.py rename to eolearn/features/interpolation.py diff --git a/features/eolearn/features/local_binary_pattern.py b/eolearn/features/local_binary_pattern.py similarity index 100% rename from features/eolearn/features/local_binary_pattern.py rename to eolearn/features/local_binary_pattern.py diff --git a/features/eolearn/features/py.typed b/eolearn/features/py.typed similarity index 100% rename from features/eolearn/features/py.typed rename to eolearn/features/py.typed diff --git a/features/eolearn/features/radiometric_normalization.py b/eolearn/features/radiometric_normalization.py similarity index 100% rename from features/eolearn/features/radiometric_normalization.py rename to eolearn/features/radiometric_normalization.py diff --git a/features/eolearn/features/temporal_features.py b/eolearn/features/temporal_features.py similarity index 100% rename from features/eolearn/features/temporal_features.py rename to eolearn/features/temporal_features.py diff --git a/features/eolearn/features/utils.py b/eolearn/features/utils.py similarity index 100% rename from features/eolearn/features/utils.py rename to eolearn/features/utils.py diff --git a/features/MANIFEST.in b/features/MANIFEST.in deleted file mode 100644 index 9f43ca148..000000000 --- a/features/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -include requirements*.txt -include LICENSE -include README.md -include eolearn/features/py.typed -exclude eolearn/tests/* diff --git a/features/eolearn/__init__.py b/features/eolearn/__init__.py deleted file mode 100644 index 8db66d3d0..000000000 --- a/features/eolearn/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/features/eolearn/tests/conftest.py b/tests/features/conftest.py similarity index 100% rename from features/eolearn/tests/conftest.py rename to tests/features/conftest.py diff --git a/features/eolearn/tests/test_bands_extraction.py b/tests/features/test_bands_extraction.py similarity index 100% rename from features/eolearn/tests/test_bands_extraction.py rename to tests/features/test_bands_extraction.py diff --git a/features/eolearn/tests/test_blob.py b/tests/features/test_blob.py similarity index 100% rename from features/eolearn/tests/test_blob.py rename to tests/features/test_blob.py diff --git a/features/eolearn/tests/test_clustering.py b/tests/features/test_clustering.py similarity index 100% rename from features/eolearn/tests/test_clustering.py rename to tests/features/test_clustering.py diff --git a/features/eolearn/tests/test_doubly_logistic_approximation.py b/tests/features/test_doubly_logistic_approximation.py similarity index 100% rename from features/eolearn/tests/test_doubly_logistic_approximation.py rename to tests/features/test_doubly_logistic_approximation.py diff --git a/features/eolearn/tests/test_feature_manipulation.py b/tests/features/test_feature_manipulation.py similarity index 100% rename from features/eolearn/tests/test_feature_manipulation.py rename to tests/features/test_feature_manipulation.py diff --git a/features/eolearn/tests/test_features_utils.py b/tests/features/test_features_utils.py similarity index 100% rename from features/eolearn/tests/test_features_utils.py rename to tests/features/test_features_utils.py diff --git a/features/eolearn/tests/test_haralick.py b/tests/features/test_haralick.py similarity index 100% rename from features/eolearn/tests/test_haralick.py rename to tests/features/test_haralick.py diff --git a/features/eolearn/tests/test_hog.py b/tests/features/test_hog.py similarity index 100% rename from features/eolearn/tests/test_hog.py rename to tests/features/test_hog.py diff --git a/features/eolearn/tests/test_interpolation.py b/tests/features/test_interpolation.py similarity index 100% rename from features/eolearn/tests/test_interpolation.py rename to tests/features/test_interpolation.py diff --git a/features/eolearn/tests/test_local_binary_pattern.py b/tests/features/test_local_binary_pattern.py similarity index 100% rename from features/eolearn/tests/test_local_binary_pattern.py rename to tests/features/test_local_binary_pattern.py diff --git a/features/eolearn/tests/test_radiometric_normalization.py b/tests/features/test_radiometric_normalization.py similarity index 100% rename from features/eolearn/tests/test_radiometric_normalization.py rename to tests/features/test_radiometric_normalization.py diff --git a/features/eolearn/tests/test_temporal_features.py b/tests/features/test_temporal_features.py similarity index 100% rename from features/eolearn/tests/test_temporal_features.py rename to tests/features/test_temporal_features.py From e89b80ac4601bba194e95583bd61f57c85c38624 Mon Sep 17 00:00:00 2001 From: Ziga Luksic Date: Tue, 27 Jun 2023 13:49:48 +0200 Subject: [PATCH 04/18] move geometry files --- {geometry/eolearn => eolearn}/geometry/__init__.py | 0 {geometry/eolearn => eolearn}/geometry/morphology.py | 0 {geometry/eolearn => eolearn}/geometry/py.typed | 0 {geometry/eolearn => eolearn}/geometry/superpixel.py | 0 {geometry/eolearn => eolearn}/geometry/transformations.py | 0 geometry/MANIFEST.in | 5 ----- geometry/eolearn/__init__.py | 1 - {geometry/eolearn/tests => tests/geometry}/conftest.py | 0 .../eolearn/tests => tests/geometry}/test_morphology.py | 0 .../eolearn/tests => tests/geometry}/test_superpixel.py | 0 .../eolearn/tests => tests/geometry}/test_transformations.py | 0 11 files changed, 6 deletions(-) rename {geometry/eolearn => eolearn}/geometry/__init__.py (100%) rename {geometry/eolearn => eolearn}/geometry/morphology.py (100%) rename {geometry/eolearn => eolearn}/geometry/py.typed (100%) rename {geometry/eolearn => eolearn}/geometry/superpixel.py (100%) rename {geometry/eolearn => eolearn}/geometry/transformations.py (100%) delete mode 100644 geometry/MANIFEST.in delete mode 100644 geometry/eolearn/__init__.py rename {geometry/eolearn/tests => tests/geometry}/conftest.py (100%) rename {geometry/eolearn/tests => tests/geometry}/test_morphology.py (100%) rename {geometry/eolearn/tests => tests/geometry}/test_superpixel.py (100%) rename {geometry/eolearn/tests => tests/geometry}/test_transformations.py (100%) diff --git a/geometry/eolearn/geometry/__init__.py b/eolearn/geometry/__init__.py similarity index 100% rename from geometry/eolearn/geometry/__init__.py rename to eolearn/geometry/__init__.py diff --git a/geometry/eolearn/geometry/morphology.py b/eolearn/geometry/morphology.py similarity index 100% rename from geometry/eolearn/geometry/morphology.py rename to eolearn/geometry/morphology.py diff --git a/geometry/eolearn/geometry/py.typed b/eolearn/geometry/py.typed similarity index 100% rename from geometry/eolearn/geometry/py.typed rename to eolearn/geometry/py.typed diff --git a/geometry/eolearn/geometry/superpixel.py b/eolearn/geometry/superpixel.py similarity index 100% rename from geometry/eolearn/geometry/superpixel.py rename to eolearn/geometry/superpixel.py diff --git a/geometry/eolearn/geometry/transformations.py b/eolearn/geometry/transformations.py similarity index 100% rename from geometry/eolearn/geometry/transformations.py rename to eolearn/geometry/transformations.py diff --git a/geometry/MANIFEST.in b/geometry/MANIFEST.in deleted file mode 100644 index b7faef195..000000000 --- a/geometry/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -include requirements*.txt -include LICENSE -include README.md -include eolearn/geometry/py.typed -exclude eolearn/tests/* diff --git a/geometry/eolearn/__init__.py b/geometry/eolearn/__init__.py deleted file mode 100644 index 8db66d3d0..000000000 --- a/geometry/eolearn/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/geometry/eolearn/tests/conftest.py b/tests/geometry/conftest.py similarity index 100% rename from geometry/eolearn/tests/conftest.py rename to tests/geometry/conftest.py diff --git a/geometry/eolearn/tests/test_morphology.py b/tests/geometry/test_morphology.py similarity index 100% rename from geometry/eolearn/tests/test_morphology.py rename to tests/geometry/test_morphology.py diff --git a/geometry/eolearn/tests/test_superpixel.py b/tests/geometry/test_superpixel.py similarity index 100% rename from geometry/eolearn/tests/test_superpixel.py rename to tests/geometry/test_superpixel.py diff --git a/geometry/eolearn/tests/test_transformations.py b/tests/geometry/test_transformations.py similarity index 100% rename from geometry/eolearn/tests/test_transformations.py rename to tests/geometry/test_transformations.py From 2ce72c8c43e6bb403fb98a50aa622b1cfbb507b1 Mon Sep 17 00:00:00 2001 From: Ziga Luksic Date: Tue, 27 Jun 2023 13:50:44 +0200 Subject: [PATCH 05/18] move io files --- {io/eolearn => eolearn}/io/__init__.py | 0 {io/eolearn => eolearn}/io/extra/__init__.py | 0 {io/eolearn => eolearn}/io/extra/geodb.py | 0 {io/eolearn => eolearn}/io/extra/meteoblue.py | 0 {io/eolearn => eolearn}/io/geometry_io.py | 0 {io/eolearn => eolearn}/io/geopedia.py | 0 {io/eolearn => eolearn}/io/py.typed | 0 {io/eolearn => eolearn}/io/raster_io.py | 0 {io/eolearn => eolearn}/io/sentinelhub_process.py | 0 io/MANIFEST.in | 7 ------- io/eolearn/__init__.py | 1 - .../io}/TestInputs/test_meteoblue_raster_input.bin | Bin .../io}/TestInputs/test_meteoblue_vector_input.bin | 0 {io/eolearn/tests => tests/io}/conftest.py | 0 .../tests => tests/io}/test_extra/test_geodb.py | 0 .../tests => tests/io}/test_extra/test_meteoblue.py | 0 {io/eolearn/tests => tests/io}/test_geometry_io.py | 0 {io/eolearn/tests => tests/io}/test_raster_io.py | 0 .../tests => tests/io}/test_sentinelhub_process.py | 0 19 files changed, 8 deletions(-) rename {io/eolearn => eolearn}/io/__init__.py (100%) rename {io/eolearn => eolearn}/io/extra/__init__.py (100%) rename {io/eolearn => eolearn}/io/extra/geodb.py (100%) rename {io/eolearn => eolearn}/io/extra/meteoblue.py (100%) rename {io/eolearn => eolearn}/io/geometry_io.py (100%) rename {io/eolearn => eolearn}/io/geopedia.py (100%) rename {io/eolearn => eolearn}/io/py.typed (100%) rename {io/eolearn => eolearn}/io/raster_io.py (100%) rename {io/eolearn => eolearn}/io/sentinelhub_process.py (100%) delete mode 100644 io/MANIFEST.in delete mode 100644 io/eolearn/__init__.py rename {io/eolearn/tests => tests/io}/TestInputs/test_meteoblue_raster_input.bin (100%) rename {io/eolearn/tests => tests/io}/TestInputs/test_meteoblue_vector_input.bin (100%) rename {io/eolearn/tests => tests/io}/conftest.py (100%) rename {io/eolearn/tests => tests/io}/test_extra/test_geodb.py (100%) rename {io/eolearn/tests => tests/io}/test_extra/test_meteoblue.py (100%) rename {io/eolearn/tests => tests/io}/test_geometry_io.py (100%) rename {io/eolearn/tests => tests/io}/test_raster_io.py (100%) rename {io/eolearn/tests => tests/io}/test_sentinelhub_process.py (100%) diff --git a/io/eolearn/io/__init__.py b/eolearn/io/__init__.py similarity index 100% rename from io/eolearn/io/__init__.py rename to eolearn/io/__init__.py diff --git a/io/eolearn/io/extra/__init__.py b/eolearn/io/extra/__init__.py similarity index 100% rename from io/eolearn/io/extra/__init__.py rename to eolearn/io/extra/__init__.py diff --git a/io/eolearn/io/extra/geodb.py b/eolearn/io/extra/geodb.py similarity index 100% rename from io/eolearn/io/extra/geodb.py rename to eolearn/io/extra/geodb.py diff --git a/io/eolearn/io/extra/meteoblue.py b/eolearn/io/extra/meteoblue.py similarity index 100% rename from io/eolearn/io/extra/meteoblue.py rename to eolearn/io/extra/meteoblue.py diff --git a/io/eolearn/io/geometry_io.py b/eolearn/io/geometry_io.py similarity index 100% rename from io/eolearn/io/geometry_io.py rename to eolearn/io/geometry_io.py diff --git a/io/eolearn/io/geopedia.py b/eolearn/io/geopedia.py similarity index 100% rename from io/eolearn/io/geopedia.py rename to eolearn/io/geopedia.py diff --git a/io/eolearn/io/py.typed b/eolearn/io/py.typed similarity index 100% rename from io/eolearn/io/py.typed rename to eolearn/io/py.typed diff --git a/io/eolearn/io/raster_io.py b/eolearn/io/raster_io.py similarity index 100% rename from io/eolearn/io/raster_io.py rename to eolearn/io/raster_io.py diff --git a/io/eolearn/io/sentinelhub_process.py b/eolearn/io/sentinelhub_process.py similarity index 100% rename from io/eolearn/io/sentinelhub_process.py rename to eolearn/io/sentinelhub_process.py diff --git a/io/MANIFEST.in b/io/MANIFEST.in deleted file mode 100644 index 7802b675f..000000000 --- a/io/MANIFEST.in +++ /dev/null @@ -1,7 +0,0 @@ -include requirements*.txt -include LICENSE -include README.md -include eolearn/io/py.typed -exclude eolearn/tests/* -exclude eolearn/tests/test_extra/* -exclude eolearn/tests/TestInputs/* diff --git a/io/eolearn/__init__.py b/io/eolearn/__init__.py deleted file mode 100644 index 8db66d3d0..000000000 --- a/io/eolearn/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/io/eolearn/tests/TestInputs/test_meteoblue_raster_input.bin b/tests/io/TestInputs/test_meteoblue_raster_input.bin similarity index 100% rename from io/eolearn/tests/TestInputs/test_meteoblue_raster_input.bin rename to tests/io/TestInputs/test_meteoblue_raster_input.bin diff --git a/io/eolearn/tests/TestInputs/test_meteoblue_vector_input.bin b/tests/io/TestInputs/test_meteoblue_vector_input.bin similarity index 100% rename from io/eolearn/tests/TestInputs/test_meteoblue_vector_input.bin rename to tests/io/TestInputs/test_meteoblue_vector_input.bin diff --git a/io/eolearn/tests/conftest.py b/tests/io/conftest.py similarity index 100% rename from io/eolearn/tests/conftest.py rename to tests/io/conftest.py diff --git a/io/eolearn/tests/test_extra/test_geodb.py b/tests/io/test_extra/test_geodb.py similarity index 100% rename from io/eolearn/tests/test_extra/test_geodb.py rename to tests/io/test_extra/test_geodb.py diff --git a/io/eolearn/tests/test_extra/test_meteoblue.py b/tests/io/test_extra/test_meteoblue.py similarity index 100% rename from io/eolearn/tests/test_extra/test_meteoblue.py rename to tests/io/test_extra/test_meteoblue.py diff --git a/io/eolearn/tests/test_geometry_io.py b/tests/io/test_geometry_io.py similarity index 100% rename from io/eolearn/tests/test_geometry_io.py rename to tests/io/test_geometry_io.py diff --git a/io/eolearn/tests/test_raster_io.py b/tests/io/test_raster_io.py similarity index 100% rename from io/eolearn/tests/test_raster_io.py rename to tests/io/test_raster_io.py diff --git a/io/eolearn/tests/test_sentinelhub_process.py b/tests/io/test_sentinelhub_process.py similarity index 100% rename from io/eolearn/tests/test_sentinelhub_process.py rename to tests/io/test_sentinelhub_process.py From 2801750278c4ac5a4241234aa5ee96a3b60f0287 Mon Sep 17 00:00:00 2001 From: Ziga Luksic Date: Tue, 27 Jun 2023 13:51:19 +0200 Subject: [PATCH 06/18] move mask files --- {mask/eolearn => eolearn}/mask/__init__.py | 0 {mask/eolearn => eolearn}/mask/cloud_mask.py | 0 {mask/eolearn => eolearn}/mask/mask_counting.py | 0 {mask/eolearn => eolearn}/mask/masking.py | 0 .../mask/models/pixel_s2_cloud_detector_lightGBM_v0.2.txt | 0 .../mask/models/ssim_s2_cloud_detector_lightGBM_v0.2.txt | 0 {mask/eolearn => eolearn}/mask/py.typed | 0 {mask/eolearn => eolearn}/mask/snow_mask.py | 0 {mask/eolearn => eolearn}/mask/utils.py | 0 mask/MANIFEST.in | 6 ------ mask/eolearn/__init__.py | 1 - {mask/eolearn/tests => tests/mask}/conftest.py | 0 {mask/eolearn/tests => tests/mask}/test_cloud_mask.py | 0 {mask/eolearn/tests => tests/mask}/test_mask_counting.py | 0 {mask/eolearn/tests => tests/mask}/test_mask_utils.py | 0 {mask/eolearn/tests => tests/mask}/test_masking.py | 0 {mask/eolearn/tests => tests/mask}/test_snow_mask.py | 0 17 files changed, 7 deletions(-) rename {mask/eolearn => eolearn}/mask/__init__.py (100%) rename {mask/eolearn => eolearn}/mask/cloud_mask.py (100%) rename {mask/eolearn => eolearn}/mask/mask_counting.py (100%) rename {mask/eolearn => eolearn}/mask/masking.py (100%) rename {mask/eolearn => eolearn}/mask/models/pixel_s2_cloud_detector_lightGBM_v0.2.txt (100%) rename {mask/eolearn => eolearn}/mask/models/ssim_s2_cloud_detector_lightGBM_v0.2.txt (100%) rename {mask/eolearn => eolearn}/mask/py.typed (100%) rename {mask/eolearn => eolearn}/mask/snow_mask.py (100%) rename {mask/eolearn => eolearn}/mask/utils.py (100%) delete mode 100644 mask/MANIFEST.in delete mode 100644 mask/eolearn/__init__.py rename {mask/eolearn/tests => tests/mask}/conftest.py (100%) rename {mask/eolearn/tests => tests/mask}/test_cloud_mask.py (100%) rename {mask/eolearn/tests => tests/mask}/test_mask_counting.py (100%) rename {mask/eolearn/tests => tests/mask}/test_mask_utils.py (100%) rename {mask/eolearn/tests => tests/mask}/test_masking.py (100%) rename {mask/eolearn/tests => tests/mask}/test_snow_mask.py (100%) diff --git a/mask/eolearn/mask/__init__.py b/eolearn/mask/__init__.py similarity index 100% rename from mask/eolearn/mask/__init__.py rename to eolearn/mask/__init__.py diff --git a/mask/eolearn/mask/cloud_mask.py b/eolearn/mask/cloud_mask.py similarity index 100% rename from mask/eolearn/mask/cloud_mask.py rename to eolearn/mask/cloud_mask.py diff --git a/mask/eolearn/mask/mask_counting.py b/eolearn/mask/mask_counting.py similarity index 100% rename from mask/eolearn/mask/mask_counting.py rename to eolearn/mask/mask_counting.py diff --git a/mask/eolearn/mask/masking.py b/eolearn/mask/masking.py similarity index 100% rename from mask/eolearn/mask/masking.py rename to eolearn/mask/masking.py diff --git a/mask/eolearn/mask/models/pixel_s2_cloud_detector_lightGBM_v0.2.txt b/eolearn/mask/models/pixel_s2_cloud_detector_lightGBM_v0.2.txt similarity index 100% rename from mask/eolearn/mask/models/pixel_s2_cloud_detector_lightGBM_v0.2.txt rename to eolearn/mask/models/pixel_s2_cloud_detector_lightGBM_v0.2.txt diff --git a/mask/eolearn/mask/models/ssim_s2_cloud_detector_lightGBM_v0.2.txt b/eolearn/mask/models/ssim_s2_cloud_detector_lightGBM_v0.2.txt similarity index 100% rename from mask/eolearn/mask/models/ssim_s2_cloud_detector_lightGBM_v0.2.txt rename to eolearn/mask/models/ssim_s2_cloud_detector_lightGBM_v0.2.txt diff --git a/mask/eolearn/mask/py.typed b/eolearn/mask/py.typed similarity index 100% rename from mask/eolearn/mask/py.typed rename to eolearn/mask/py.typed diff --git a/mask/eolearn/mask/snow_mask.py b/eolearn/mask/snow_mask.py similarity index 100% rename from mask/eolearn/mask/snow_mask.py rename to eolearn/mask/snow_mask.py diff --git a/mask/eolearn/mask/utils.py b/eolearn/mask/utils.py similarity index 100% rename from mask/eolearn/mask/utils.py rename to eolearn/mask/utils.py diff --git a/mask/MANIFEST.in b/mask/MANIFEST.in deleted file mode 100644 index dad260ce5..000000000 --- a/mask/MANIFEST.in +++ /dev/null @@ -1,6 +0,0 @@ -include requirements*.txt -include eolearn/mask/models/* -include LICENSE -include README.md -include eolearn/mask/py.typed -exclude eolearn/tests/* diff --git a/mask/eolearn/__init__.py b/mask/eolearn/__init__.py deleted file mode 100644 index 8db66d3d0..000000000 --- a/mask/eolearn/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/mask/eolearn/tests/conftest.py b/tests/mask/conftest.py similarity index 100% rename from mask/eolearn/tests/conftest.py rename to tests/mask/conftest.py diff --git a/mask/eolearn/tests/test_cloud_mask.py b/tests/mask/test_cloud_mask.py similarity index 100% rename from mask/eolearn/tests/test_cloud_mask.py rename to tests/mask/test_cloud_mask.py diff --git a/mask/eolearn/tests/test_mask_counting.py b/tests/mask/test_mask_counting.py similarity index 100% rename from mask/eolearn/tests/test_mask_counting.py rename to tests/mask/test_mask_counting.py diff --git a/mask/eolearn/tests/test_mask_utils.py b/tests/mask/test_mask_utils.py similarity index 100% rename from mask/eolearn/tests/test_mask_utils.py rename to tests/mask/test_mask_utils.py diff --git a/mask/eolearn/tests/test_masking.py b/tests/mask/test_masking.py similarity index 100% rename from mask/eolearn/tests/test_masking.py rename to tests/mask/test_masking.py diff --git a/mask/eolearn/tests/test_snow_mask.py b/tests/mask/test_snow_mask.py similarity index 100% rename from mask/eolearn/tests/test_snow_mask.py rename to tests/mask/test_snow_mask.py From d45a8dee4e2cdea13642958244f430b4f193f1bb Mon Sep 17 00:00:00 2001 From: Ziga Luksic Date: Tue, 27 Jun 2023 13:53:21 +0200 Subject: [PATCH 07/18] move ml_tools files --- {ml_tools/eolearn => eolearn}/ml_tools/__init__.py | 0 {ml_tools/eolearn => eolearn}/ml_tools/extra/__init__.py | 0 {ml_tools/eolearn => eolearn}/ml_tools/extra/plotting.py | 0 {ml_tools/eolearn => eolearn}/ml_tools/py.typed | 0 {ml_tools/eolearn => eolearn}/ml_tools/sampling.py | 0 {ml_tools/eolearn => eolearn}/ml_tools/tdigest.py | 0 {ml_tools/eolearn => eolearn}/ml_tools/train_test_split.py | 0 {ml_tools/eolearn => eolearn}/ml_tools/utils.py | 0 ml_tools/eolearn/__init__.py | 1 - {ml_tools/eolearn/tests => tests/ml_tools}/conftest.py | 0 {ml_tools/eolearn/tests => tests/ml_tools}/test_sampling.py | 0 {ml_tools/eolearn/tests => tests/ml_tools}/test_train_split.py | 0 12 files changed, 1 deletion(-) rename {ml_tools/eolearn => eolearn}/ml_tools/__init__.py (100%) rename {ml_tools/eolearn => eolearn}/ml_tools/extra/__init__.py (100%) rename {ml_tools/eolearn => eolearn}/ml_tools/extra/plotting.py (100%) rename {ml_tools/eolearn => eolearn}/ml_tools/py.typed (100%) rename {ml_tools/eolearn => eolearn}/ml_tools/sampling.py (100%) rename {ml_tools/eolearn => eolearn}/ml_tools/tdigest.py (100%) rename {ml_tools/eolearn => eolearn}/ml_tools/train_test_split.py (100%) rename {ml_tools/eolearn => eolearn}/ml_tools/utils.py (100%) delete mode 100644 ml_tools/eolearn/__init__.py rename {ml_tools/eolearn/tests => tests/ml_tools}/conftest.py (100%) rename {ml_tools/eolearn/tests => tests/ml_tools}/test_sampling.py (100%) rename {ml_tools/eolearn/tests => tests/ml_tools}/test_train_split.py (100%) diff --git a/ml_tools/eolearn/ml_tools/__init__.py b/eolearn/ml_tools/__init__.py similarity index 100% rename from ml_tools/eolearn/ml_tools/__init__.py rename to eolearn/ml_tools/__init__.py diff --git a/ml_tools/eolearn/ml_tools/extra/__init__.py b/eolearn/ml_tools/extra/__init__.py similarity index 100% rename from ml_tools/eolearn/ml_tools/extra/__init__.py rename to eolearn/ml_tools/extra/__init__.py diff --git a/ml_tools/eolearn/ml_tools/extra/plotting.py b/eolearn/ml_tools/extra/plotting.py similarity index 100% rename from ml_tools/eolearn/ml_tools/extra/plotting.py rename to eolearn/ml_tools/extra/plotting.py diff --git a/ml_tools/eolearn/ml_tools/py.typed b/eolearn/ml_tools/py.typed similarity index 100% rename from ml_tools/eolearn/ml_tools/py.typed rename to eolearn/ml_tools/py.typed diff --git a/ml_tools/eolearn/ml_tools/sampling.py b/eolearn/ml_tools/sampling.py similarity index 100% rename from ml_tools/eolearn/ml_tools/sampling.py rename to eolearn/ml_tools/sampling.py diff --git a/ml_tools/eolearn/ml_tools/tdigest.py b/eolearn/ml_tools/tdigest.py similarity index 100% rename from ml_tools/eolearn/ml_tools/tdigest.py rename to eolearn/ml_tools/tdigest.py diff --git a/ml_tools/eolearn/ml_tools/train_test_split.py b/eolearn/ml_tools/train_test_split.py similarity index 100% rename from ml_tools/eolearn/ml_tools/train_test_split.py rename to eolearn/ml_tools/train_test_split.py diff --git a/ml_tools/eolearn/ml_tools/utils.py b/eolearn/ml_tools/utils.py similarity index 100% rename from ml_tools/eolearn/ml_tools/utils.py rename to eolearn/ml_tools/utils.py diff --git a/ml_tools/eolearn/__init__.py b/ml_tools/eolearn/__init__.py deleted file mode 100644 index 8db66d3d0..000000000 --- a/ml_tools/eolearn/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/ml_tools/eolearn/tests/conftest.py b/tests/ml_tools/conftest.py similarity index 100% rename from ml_tools/eolearn/tests/conftest.py rename to tests/ml_tools/conftest.py diff --git a/ml_tools/eolearn/tests/test_sampling.py b/tests/ml_tools/test_sampling.py similarity index 100% rename from ml_tools/eolearn/tests/test_sampling.py rename to tests/ml_tools/test_sampling.py diff --git a/ml_tools/eolearn/tests/test_train_split.py b/tests/ml_tools/test_train_split.py similarity index 100% rename from ml_tools/eolearn/tests/test_train_split.py rename to tests/ml_tools/test_train_split.py From 60b3ecc88a9bca975082a387e5e36c3cc04e06ac Mon Sep 17 00:00:00 2001 From: Ziga Luksic Date: Tue, 27 Jun 2023 13:53:56 +0200 Subject: [PATCH 08/18] move visualization files --- .../eolearn => eolearn}/visualization/__init__.py | 0 .../eolearn => eolearn}/visualization/eoexecutor.py | 0 {visualization/eolearn => eolearn}/visualization/eopatch.py | 0 .../eolearn => eolearn}/visualization/eoworkflow.py | 0 {visualization/eolearn => eolearn}/visualization/py.typed | 0 .../visualization/report_templates/report.html | 0 .../tests => tests/visualization}/test_eoexecutor.py | 0 .../eolearn/tests => tests/visualization}/test_eopatch.py | 0 .../tests => tests/visualization}/test_eoworkflow.py | 0 visualization/MANIFEST.in | 6 ------ visualization/eolearn/__init__.py | 1 - 11 files changed, 7 deletions(-) rename {visualization/eolearn => eolearn}/visualization/__init__.py (100%) rename {visualization/eolearn => eolearn}/visualization/eoexecutor.py (100%) rename {visualization/eolearn => eolearn}/visualization/eopatch.py (100%) rename {visualization/eolearn => eolearn}/visualization/eoworkflow.py (100%) rename {visualization/eolearn => eolearn}/visualization/py.typed (100%) rename {visualization/eolearn => eolearn}/visualization/report_templates/report.html (100%) rename {visualization/eolearn/tests => tests/visualization}/test_eoexecutor.py (100%) rename {visualization/eolearn/tests => tests/visualization}/test_eopatch.py (100%) rename {visualization/eolearn/tests => tests/visualization}/test_eoworkflow.py (100%) delete mode 100644 visualization/MANIFEST.in delete mode 100644 visualization/eolearn/__init__.py diff --git a/visualization/eolearn/visualization/__init__.py b/eolearn/visualization/__init__.py similarity index 100% rename from visualization/eolearn/visualization/__init__.py rename to eolearn/visualization/__init__.py diff --git a/visualization/eolearn/visualization/eoexecutor.py b/eolearn/visualization/eoexecutor.py similarity index 100% rename from visualization/eolearn/visualization/eoexecutor.py rename to eolearn/visualization/eoexecutor.py diff --git a/visualization/eolearn/visualization/eopatch.py b/eolearn/visualization/eopatch.py similarity index 100% rename from visualization/eolearn/visualization/eopatch.py rename to eolearn/visualization/eopatch.py diff --git a/visualization/eolearn/visualization/eoworkflow.py b/eolearn/visualization/eoworkflow.py similarity index 100% rename from visualization/eolearn/visualization/eoworkflow.py rename to eolearn/visualization/eoworkflow.py diff --git a/visualization/eolearn/visualization/py.typed b/eolearn/visualization/py.typed similarity index 100% rename from visualization/eolearn/visualization/py.typed rename to eolearn/visualization/py.typed diff --git a/visualization/eolearn/visualization/report_templates/report.html b/eolearn/visualization/report_templates/report.html similarity index 100% rename from visualization/eolearn/visualization/report_templates/report.html rename to eolearn/visualization/report_templates/report.html diff --git a/visualization/eolearn/tests/test_eoexecutor.py b/tests/visualization/test_eoexecutor.py similarity index 100% rename from visualization/eolearn/tests/test_eoexecutor.py rename to tests/visualization/test_eoexecutor.py diff --git a/visualization/eolearn/tests/test_eopatch.py b/tests/visualization/test_eopatch.py similarity index 100% rename from visualization/eolearn/tests/test_eopatch.py rename to tests/visualization/test_eopatch.py diff --git a/visualization/eolearn/tests/test_eoworkflow.py b/tests/visualization/test_eoworkflow.py similarity index 100% rename from visualization/eolearn/tests/test_eoworkflow.py rename to tests/visualization/test_eoworkflow.py diff --git a/visualization/MANIFEST.in b/visualization/MANIFEST.in deleted file mode 100644 index 84f45995e..000000000 --- a/visualization/MANIFEST.in +++ /dev/null @@ -1,6 +0,0 @@ -include requirements*.txt -include eolearn/visualization/report_templates/report.html -include LICENSE -include README.md -include eolearn/visualization/py.typed -exclude eolearn/tests/* diff --git a/visualization/eolearn/__init__.py b/visualization/eolearn/__init__.py deleted file mode 100644 index 8db66d3d0..000000000 --- a/visualization/eolearn/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) From 52988822c0ec2c037456131358ee636f28381cc8 Mon Sep 17 00:00:00 2001 From: Ziga Luksic Date: Tue, 27 Jun 2023 14:03:03 +0200 Subject: [PATCH 09/18] make it installable --- eolearn/__init__.py | 2 + pyproject.toml | 139 ++++++++++++++++++++++++++++++++++++++++++ requirements-dev.txt | 11 ---- requirements-docs.txt | 14 ----- setup.py | 73 ---------------------- 5 files changed, 141 insertions(+), 98 deletions(-) create mode 100644 eolearn/__init__.py delete mode 100644 requirements-dev.txt delete mode 100644 requirements-docs.txt delete mode 100644 setup.py diff --git a/eolearn/__init__.py b/eolearn/__init__.py new file mode 100644 index 000000000..0f4393e52 --- /dev/null +++ b/eolearn/__init__.py @@ -0,0 +1,2 @@ +"""Main module of the `eolearn` package.""" +__version__ = "1.4.2" diff --git a/pyproject.toml b/pyproject.toml index ef9c253b7..fb9424a93 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,142 @@ +[build-system] +requires = ['hatchling'] +build-backend = 'hatchling.build' + +[tool.hatch.metadata] +allow-direct-references = true + +[tool.hatch.version] +path = 'eolearn/__init__.py' + +[tool.hatch.build.targets.sdist] +include = ['/README.md', '/LICENSE.md', '/eolearn'] + +[tool.hatch.build.targets.wheel] +include = ['/eolearn'] + +[project] +name = "eo-learn" +dynamic = ["version"] +description = "Earth observation processing framework for machine learning in Python" +readme = "README.md" +requires-python = ">= 3.8" +license = { file = "LICENSE" } +authors = [ + { name = "Sinergise EO research team", email = "eoresearch@sinergise.com" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Intended Audience :: Education", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: MIT License", + "Operating System :: MacOS", + "Operating System :: Microsoft :: Windows", + "Operating System :: Unix", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Topic :: Scientific/Engineering", + "Topic :: Scientific/Engineering :: GIS", + "Topic :: Scientific/Engineering :: Image Processing", +] +dependencies = [ + "boto3", + "fs", + "fs-s3fs", + "geopandas>=0.11.0", + "numpy>=1.20.0", + "python-dateutil", + "sentinelhub>=3.9.0", + "tqdm>=4.27", + "typing-extensions", +] + +[project.optional-dependencies] +all = ["eo-learn[COREGISTRATION,FEATURES,GEOMETRY,IO,MASK,MLTOOLS,VISUALIZATION]"] +full = ["eo-learn[ALL,RAY,ZARR,METEOBLUE,TDIGEST]"] +ray = ["ray[default]"] +zarr = ["s3fs", "zarr"] +coregistration = [ + "opencv-python-headless", +] # using headless version of opencv, otherwise gitlab runners fail +features = [ + "numba>=0.53.0", + "numpy", + "pillow>=9.1.0", + "python-dateutil", + "scikit-image>=0.19.0", + "scikit-learn", + "scipy", + "typing-extensions", +] +geometry = [ + "geopandas>=0.8.1", + "rasterio>=1.2.7", + "scikit-image>=0.15.0", + "shapely", +] +io = [ + "affine", + "boto3", + "eo-learn-core", + "fiona>=1.8.18", + "geopandas>=0.8.1", + "rasterio>=1.2.7", + "sentinelhub>=3.8.0", + "typing-extensions", +] +geodb = [ + "python-dotenv", + "xcube-geodb @ git+git://github.com/dcs4cop/xcube-geodb.git", +] +meteoblue = ["meteoblue_dataset_sdk>=1,<2"] +mask = [ + "lightgbm>=2.0.11", + "numpy", + "opencv-python-headless", + "scikit-image>=0.13.0", + "sentinelhub", + "typing-extensions", +] +mltools = ["numpy", "shapely"] +tdigest = ["tdigest==0.5.2.2"] +mltoolsplotting = ["matplotlib"] +visualization = ["graphviz>=0.10.1", "jinja2", "matplotlib", "pygments"] +docs = [ + "eo-learn[ALL]", + "jupyter", + "nbsphinx", + "sphinx", + "sphinx_mdinclude", + "sphinx_rtd_theme", +] +dev = [ + "build", + "eo-learn[FULL]", + "hypothesis", + "moto", + "mypy>=0.990", + "pylint>=2.14.0", + "pytest>=7.0.0", + "pytest-cov", + "pytest-lazy-fixture", + "pytest-mock", + "twine", + "types-python-dateutil", +] + +[project.urls] +Homepage = "https://github.com/sentinel-hub/eo-learn" +Documentation = "https://eo-learn.readthedocs.io" +Issues = "https://github.com/sentinel-hub/eo-learn/issues" +Source = "https://github.com/sentinel-hub/eo-learn" +Forum = "https://forum.sentinel-hub.com" + + [tool.black] line-length = 120 preview = true diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index 928639c88..000000000 --- a/requirements-dev.txt +++ /dev/null @@ -1,11 +0,0 @@ -hypothesis -moto -mypy>=0.990 -pylint>=2.14.0 -pytest>=7.0.0 -pytest-cov -pytest-lazy-fixture -pytest-mock -ray[default] -twine -types-python-dateutil diff --git a/requirements-docs.txt b/requirements-docs.txt deleted file mode 100644 index 8066f501b..000000000 --- a/requirements-docs.txt +++ /dev/null @@ -1,14 +0,0 @@ - --e ./core --e ./coregistration --e ./features --e ./geometry --e ./io --e ./mask --e ./ml_tools --e ./visualization -jupyter -nbsphinx -sphinx -sphinx_mdinclude -sphinx_rtd_theme diff --git a/setup.py b/setup.py deleted file mode 100644 index a7b77d8f7..000000000 --- a/setup.py +++ /dev/null @@ -1,73 +0,0 @@ -from __future__ import annotations - -import os - -from setuptools import setup - - -def get_long_description(): - this_directory = os.path.abspath(os.path.dirname(__file__)) - - with open(os.path.join(this_directory, "README.md"), encoding="utf-8") as f: - long_description = f.read() - - # Removes lines with an image from description - return "\n".join(line for line in long_description.split("\n") if not line.strip().startswith(" Date: Tue, 27 Jun 2023 14:23:27 +0200 Subject: [PATCH 10/18] make tests work --- pyproject.toml | 1 - tests/__init__.py | 1 + tests/core/conftest.py | 2 +- tests/coregistration/conftest.py | 2 +- tests/features/conftest.py | 4 ++-- tests/geometry/conftest.py | 2 +- tests/io/conftest.py | 4 ++-- tests/mask/conftest.py | 2 +- tests/ml_tools/conftest.py | 2 +- tests/visualization/test_eopatch.py | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 tests/__init__.py diff --git a/pyproject.toml b/pyproject.toml index fb9424a93..3fca217f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,6 @@ geometry = [ io = [ "affine", "boto3", - "eo-learn-core", "fiona>=1.8.18", "geopandas>=0.8.1", "rasterio>=1.2.7", diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 000000000..cda745988 --- /dev/null +++ b/tests/__init__.py @@ -0,0 +1 @@ +# Required for Ray tests diff --git a/tests/core/conftest.py b/tests/core/conftest.py index 0cc4c2c21..d9287dee2 100644 --- a/tests/core/conftest.py +++ b/tests/core/conftest.py @@ -21,7 +21,7 @@ @pytest.fixture(scope="session", name="test_eopatch_path") def test_eopatch_path_fixture() -> str: - return os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "..", "example_data", "TestEOPatch") + return os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "example_data", "TestEOPatch") @pytest.fixture(name="test_eopatch") diff --git a/tests/coregistration/conftest.py b/tests/coregistration/conftest.py index 12bd0b889..b40eff87a 100644 --- a/tests/coregistration/conftest.py +++ b/tests/coregistration/conftest.py @@ -16,7 +16,7 @@ pytest.register_assert_rewrite("sentinelhub.testing_utils") # makes asserts in helper functions work with pytest -EXAMPLE_DATA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "..", "example_data") +EXAMPLE_DATA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "example_data") EXAMPLE_EOPATCH_PATH = os.path.join(EXAMPLE_DATA_PATH, "TestEOPatch") diff --git a/tests/features/conftest.py b/tests/features/conftest.py index a45f6f31a..77c533c41 100644 --- a/tests/features/conftest.py +++ b/tests/features/conftest.py @@ -20,12 +20,12 @@ @pytest.fixture(scope="session", name="example_data_path") def example_data_path_fixture() -> str: - return os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "..", "example_data") + return os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "example_data") @pytest.fixture(name="example_eopatch") def example_eopatch_fixture(): - path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "..", "example_data", "TestEOPatch") + path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "example_data", "TestEOPatch") return EOPatch.load(path, lazy_loading=True) diff --git a/tests/geometry/conftest.py b/tests/geometry/conftest.py index b8a63f2f0..95de24661 100644 --- a/tests/geometry/conftest.py +++ b/tests/geometry/conftest.py @@ -14,7 +14,7 @@ from eolearn.core import EOPatch -EXAMPLE_DATA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "..", "example_data") +EXAMPLE_DATA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "example_data") TEST_EOPATCH_PATH = os.path.join(EXAMPLE_DATA_PATH, "TestEOPatch") diff --git a/tests/io/conftest.py b/tests/io/conftest.py index 699a9aeb2..65d7a2a27 100644 --- a/tests/io/conftest.py +++ b/tests/io/conftest.py @@ -20,7 +20,7 @@ from eolearn.core import EOPatch # noqa[E402] -EXAMPLE_DATA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "..", "example_data") +EXAMPLE_DATA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "example_data") TEST_EOPATCH_PATH = os.path.join(EXAMPLE_DATA_PATH, "TestEOPatch") @@ -37,7 +37,7 @@ def example_data_path_fixture(): @pytest.fixture(name="gpkg_file") def local_gpkg_example_file_fixture(): """A pytest fixture to retrieve a gpkg example file""" - return os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../../example_data/import-gpkg-test.gpkg") + return os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../example_data/import-gpkg-test.gpkg") @pytest.fixture(name="s3_gpkg_file") diff --git a/tests/mask/conftest.py b/tests/mask/conftest.py index b8a63f2f0..95de24661 100644 --- a/tests/mask/conftest.py +++ b/tests/mask/conftest.py @@ -14,7 +14,7 @@ from eolearn.core import EOPatch -EXAMPLE_DATA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "..", "example_data") +EXAMPLE_DATA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "example_data") TEST_EOPATCH_PATH = os.path.join(EXAMPLE_DATA_PATH, "TestEOPatch") diff --git a/tests/ml_tools/conftest.py b/tests/ml_tools/conftest.py index 7767390ba..92513cf05 100644 --- a/tests/ml_tools/conftest.py +++ b/tests/ml_tools/conftest.py @@ -14,7 +14,7 @@ from eolearn.core import EOPatch -EXAMPLE_DATA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "..", "example_data") +EXAMPLE_DATA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "example_data") TEST_EOPATCH_PATH = os.path.join(EXAMPLE_DATA_PATH, "TestEOPatch") diff --git a/tests/visualization/test_eopatch.py b/tests/visualization/test_eopatch.py index 3307b8522..794ac0473 100644 --- a/tests/visualization/test_eopatch.py +++ b/tests/visualization/test_eopatch.py @@ -20,7 +20,7 @@ @pytest.fixture(name="eopatch", scope="module") def eopatch_fixture(): - path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "..", "example_data", "TestEOPatch") + path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "example_data", "TestEOPatch") return EOPatch.load(path) From 205cf33149d032de88bb854b5058cf1561065256 Mon Sep 17 00:00:00 2001 From: Ziga Luksic Date: Tue, 27 Jun 2023 14:43:36 +0200 Subject: [PATCH 11/18] consolidate py.typed files --- eolearn/coregistration/py.typed | 0 eolearn/features/py.typed | 0 eolearn/geometry/py.typed | 0 eolearn/io/py.typed | 0 eolearn/mask/py.typed | 0 eolearn/ml_tools/py.typed | 0 eolearn/{core => }/py.typed | 0 eolearn/visualization/py.typed | 0 8 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 eolearn/coregistration/py.typed delete mode 100644 eolearn/features/py.typed delete mode 100644 eolearn/geometry/py.typed delete mode 100644 eolearn/io/py.typed delete mode 100644 eolearn/mask/py.typed delete mode 100644 eolearn/ml_tools/py.typed rename eolearn/{core => }/py.typed (100%) delete mode 100644 eolearn/visualization/py.typed diff --git a/eolearn/coregistration/py.typed b/eolearn/coregistration/py.typed deleted file mode 100644 index e69de29bb..000000000 diff --git a/eolearn/features/py.typed b/eolearn/features/py.typed deleted file mode 100644 index e69de29bb..000000000 diff --git a/eolearn/geometry/py.typed b/eolearn/geometry/py.typed deleted file mode 100644 index e69de29bb..000000000 diff --git a/eolearn/io/py.typed b/eolearn/io/py.typed deleted file mode 100644 index e69de29bb..000000000 diff --git a/eolearn/mask/py.typed b/eolearn/mask/py.typed deleted file mode 100644 index e69de29bb..000000000 diff --git a/eolearn/ml_tools/py.typed b/eolearn/ml_tools/py.typed deleted file mode 100644 index e69de29bb..000000000 diff --git a/eolearn/core/py.typed b/eolearn/py.typed similarity index 100% rename from eolearn/core/py.typed rename to eolearn/py.typed diff --git a/eolearn/visualization/py.typed b/eolearn/visualization/py.typed deleted file mode 100644 index e69de29bb..000000000 From 768bc600ad6e74c77c81042647d9707ce51de877 Mon Sep 17 00:00:00 2001 From: Ziga Luksic Date: Tue, 27 Jun 2023 14:53:08 +0200 Subject: [PATCH 12/18] fix some environments --- .gitlab-ci.yml | 3 +-- MANIFEST.in | 5 ----- docker/eolearn.dockerfile | 35 ++++++++++------------------------- docs/environment.yml | 29 +++++++++++------------------ install_all.py | 25 ++++++------------------- 5 files changed, 28 insertions(+), 69 deletions(-) delete mode 100644 MANIFEST.in diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7f4f03215..71f367cc8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,6 @@ run_sh_integration_tests: - apt-get update - apt-get install -y build-essential libgdal-dev graphviz proj-bin gcc libproj-dev libspatialindex-dev script: - - pip install -r requirements-dev.txt --upgrade - - python install_all.py + - pip install eolearn[DEV] - 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 - pytest -m sh_integration diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 07c61fc6f..000000000 --- a/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -include requirements*.txt - -include README.md -include CREDITS.md -include LICENSE diff --git a/docker/eolearn.dockerfile b/docker/eolearn.dockerfile index c978c180f..3c768b5d4 100644 --- a/docker/eolearn.dockerfile +++ b/docker/eolearn.dockerfile @@ -4,12 +4,12 @@ LABEL maintainer="Sinergise EO research team " LABEL description="An official eo-learn docker image with a full eo-learn installation and Jupyter notebook." RUN apt-get update && apt-get install -y \ - gcc \ - libgdal-dev \ - graphviz \ - proj-bin \ - libproj-dev \ - libspatialindex-dev \ + gcc \ + libgdal-dev \ + graphviz \ + proj-bin \ + libproj-dev \ + libspatialindex-dev \ && apt-get clean && apt-get autoremove -y && rm -rf /var/lib/apt/lists/* ENV CPLUS_INCLUDE_PATH=/usr/include/gdal @@ -20,25 +20,10 @@ RUN pip3 install --no-cache-dir shapely --no-binary :all: WORKDIR /tmp -COPY core core -COPY coregistration coregistration -COPY features features -COPY geometry geometry -COPY io io -COPY mask mask -COPY ml_tools ml_tools -COPY visualization visualization -COPY setup.py README.md requirements-dev.txt ./ +COPY eolearn eolearn +COPY pyproject.toml README.md ./ -RUN pip3 install --no-cache-dir \ - ./core[RAY] \ - ./coregistration \ - ./features \ - ./geometry \ - ./io[METEOBLUE] \ - ./mask \ - ./ml_tools \ - ./visualization +RUN pip3 install --no-cache-dir .[FULL] RUN pip3 install --no-cache-dir \ . \ @@ -56,4 +41,4 @@ WORKDIR /home/eolearner EXPOSE 8888 CMD ["/usr/local/bin/jupyter", "notebook", "--no-browser", "--port=8888", "--ip=0.0.0.0", \ - "--NotebookApp.token=''", "--allow-root"] + "--NotebookApp.token=''", "--allow-root"] diff --git a/docs/environment.yml b/docs/environment.yml index 8808b0b25..d7e3451e6 100644 --- a/docs/environment.yml +++ b/docs/environment.yml @@ -1,22 +1,15 @@ name: eo-learn-docs channels: -- conda-forge + - conda-forge dependencies: -- rasterio -- pip -- python=3.10 -- pip: - - Sphinx - - sphinx_rtd_theme - - nbsphinx - - jupyter - - sphinx_mdinclude + - rasterio + - pip + - python=3.10 + - pip: + - Sphinx + - sphinx_rtd_theme + - nbsphinx + - jupyter + - sphinx_mdinclude - - ./../core - - ./../coregistration - - ./../features - - ./../geometry - - ./../io[METEOBLUE] - - ./../mask - - ./../ml_tools[TDIGEST] - - ./../visualization + - ./../.[FULL] diff --git a/install_all.py b/install_all.py index 2ead69bfa..90ac76ad4 100644 --- a/install_all.py +++ b/install_all.py @@ -10,24 +10,11 @@ import subprocess import sys - -SUBPACKAGE_LIST = [ - "core", - "coregistration", - "features", - "geometry", - "io[METEOBLUE]", - "mask", - "ml_tools", - "visualization", -] - - -def pip_command(name, args): - args = [arg for arg in args if not arg.startswith(".")] - subprocess.check_call([sys.executable, "-m", "pip", "install", *args, f"./{name}"]) - +import warnings if __name__ == "__main__": - for subpackage in SUBPACKAGE_LIST: - pip_command(subpackage, sys.argv[1:]) + 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." + ) From 563a4ddd4c71f2c168462f6dacac8c566b75a8e5 Mon Sep 17 00:00:00 2001 From: Ziga Luksic Date: Tue, 27 Jun 2023 15:00:51 +0200 Subject: [PATCH 13/18] simplify makefile --- Makefile | 186 +++---------------------------------------------- pyproject.toml | 1 + 2 files changed, 11 insertions(+), 176 deletions(-) diff --git a/Makefile b/Makefile index 70e976d12..25520ee29 100644 --- a/Makefile +++ b/Makefile @@ -1,187 +1,21 @@ # Makefile for creating a new release of the package and uploading it to PyPI PYTHON = python3 -PACKAGES = core coregistration features geometry io mask ml_tools visualization -PYLINT = pylint .PHONY: $(PACKAGES:test) -.SILENT: pylint pylint-fast help: - @echo "Use 'make upload-' to upload the package to PyPi" - @echo "Use 'make pylint' to run pylint on the code of all subpackages" + @echo "Use 'make test-upload' to upload the package to testPyPi" + @echo "Use 'make upload' to upload the package to PyPi" -mypy: - mypy \ - core/eolearn/core \ - coregistration/eolearn/coregistration \ - geometry/eolearn/geometry \ - features/eolearn/features \ - io/eolearn/io \ - mask/eolearn/mask \ - ml_tools/eolearn/ml_tools \ - visualization/eolearn/visualization -pylint: - # Runs pylint on all subpackages consecutively and makes sure any error status code gets propagated. - export PYLINT_STATUS=0 - for package in $(PACKAGES) ; do \ - $(PYLINT) $$package/eolearn/$$package || export PYLINT_STATUS=$$?; \ - done; - exit $$PYLINT_STATUS - - -pylint-fast: - # Runs pylint on all subpackages in parallel. Because of that output verdicts are not in the order of package - # names and this process cannot be interrupted. - for package in $(PACKAGES) ; do \ - $(PYLINT) $$package/eolearn/$$package & \ - done; - wait - -.ONESHELL: -build-core: - cd core - cp ../LICENSE LICENSE - rm -r dist build | true - $(PYTHON) setup.py sdist bdist_wheel - rm LICENSE - -.ONESHELL: -build-coregistration: - cd coregistration - cp ../LICENSE LICENSE - rm -r dist build | true - $(PYTHON) setup.py sdist bdist_wheel - rm LICENSE - -.ONESHELL: -build-features: - cd features - cp ../LICENSE LICENSE - rm -r dist build | true - $(PYTHON) setup.py sdist bdist_wheel - rm LICENSE - -.ONESHELL: -build-geometry: - cd geometry - cp ../LICENSE LICENSE - rm -r dist build | true - $(PYTHON) setup.py sdist bdist_wheel - rm LICENSE - -.ONESHELL: -build-io: - cd io - cp ../LICENSE LICENSE - rm -r dist build | true - $(PYTHON) setup.py sdist bdist_wheel - rm LICENSE - -.ONESHELL: -build-mask: - cd mask - cp ../LICENSE LICENSE - rm -r dist build | true - $(PYTHON) setup.py sdist bdist_wheel - rm LICENSE - -.ONESHELL: -build-ml-tools: - cd ml_tools - cp ../LICENSE LICENSE - rm -r dist build | true - $(PYTHON) setup.py sdist bdist_wheel - rm LICENSE - -.ONESHELL: -build-visualization: - cd visualization - cp ../LICENSE LICENSE - rm -r dist build | true - $(PYTHON) setup.py sdist bdist_wheel - rm LICENSE - -.ONESHELL: -build-abstract-package: - rm -r dist build | true - $(PYTHON) setup.py sdist bdist_wheel - -upload-core: build-core - twine upload core/dist/* - -upload-coregistration: build-coregistration - twine upload coregistration/dist/* - -upload-features: build-features - twine upload features/dist/* - -upload-geometry: build-geometry - twine upload geometry/dist/* - -upload-io: build-io - twine upload io/dist/* - -upload-mask: build-mask - twine upload mask/dist/* - -upload-ml-tools: build-ml-tools - twine upload ml_tools/dist/* - -upload-visualization: build-visualization - twine upload visualization/dist/* - -upload-abstract-package: build-abstract-package - twine upload dist/* - -upload-all: \ - upload-core \ - upload-coregistration \ - upload-features \ - upload-geometry \ - upload-io \ - upload-mask \ - upload-ml-tools \ - upload-visualization \ - upload-abstract-package +upload: + rm -r dist | true + python -m build --sdist --wheel + twine upload --skip-existing dist/* # For testing: - -test-upload-core: build-core - twine upload --repository testpypi core/dist/* - -test-upload-coregistration: build-coregistration - twine upload --repository testpypi coregistration/dist/* - -test-upload-features: build-features - twine upload --repository testpypi features/dist/* - -test-upload-geometry: build-geometry - twine upload --repository testpypi geometry/dist/* - -test-upload-io: build-io - twine upload --repository testpypi io/dist/* - -test-upload-mask: build-mask - twine upload --repository testpypi mask/dist/* - -test-upload-ml-tools: build-ml-tools - twine upload --repository testpypi ml_tools/dist/* - -test-upload-visualization: build-visualization - twine upload --repository testpypi visualization/dist/* - -test-upload-abstract-package: build-abstract-package - twine upload --repository testpypi dist/* - -test-upload-all: \ - test-upload-core \ - test-upload-coregistration \ - test-upload-features \ - test-upload-geometry \ - test-upload-io \ - test-upload-mask \ - test-upload-ml-tools \ - test-upload-visualization \ - test-upload-abstract-package +test-upload: + rm -r dist | true + python -m build --sdist --wheel + twine upload --repository testpypi --skip-existing dist/* diff --git a/pyproject.toml b/pyproject.toml index 3fca217f2..172c7585f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -227,6 +227,7 @@ disable = [ "unspecified-encoding", "unnecessary-ellipsis", "use-dict-literal", + "cyclic-import", ] [tool.pylint.design] From c8c4943b24142d6ee900f0664cd93d3f2669142f Mon Sep 17 00:00:00 2001 From: Ziga Luksic Date: Tue, 27 Jun 2023 15:32:34 +0200 Subject: [PATCH 14/18] make docs (hopefully) work --- CONTRIBUTING.md | 4 ++-- README.md | 2 +- docs/Makefile | 2 +- docs/source/conf.py | 30 ++++++++++++------------------ 4 files changed, 16 insertions(+), 22 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c3152f648..ee31fbec8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,7 +22,7 @@ For any question, feel free to contact us at [eoresearch@sinergise.com](eoresear We strive to provide high-quality working code, but bugs happen nevertheless. -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: +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: * Issue description * How to reproduce the issue @@ -36,7 +36,7 @@ This information helps us to reproduce, pinpoint, and fix the reported issue. If ## Feature Requests -Existing feature requests can be found [here][existing-feature-requests]. +Existing feature requests can be found [in the issues][existing-feature-requests]. 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. diff --git a/README.md b/README.md index dab165af6..a9d9280ee 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ Examples and introductions to the package can be found [here](https://github.com ## Contributions -The list of all `eo-learn` contributors can be found [here](./CONTRIBUTING.md). If you would like to contribute to `eo-learn`, please check our [contribution guidelines](./CONTRIBUTING.md). +The list of all `eo-learn` contributors are listed in the [credits file](./CREDITS.md). If you would like to contribute to `eo-learn`, please check our [contribution guidelines](./CONTRIBUTING.md). ## Blog posts and papers diff --git a/docs/Makefile b/docs/Makefile index 0b88aba07..0227ea890 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -19,4 +19,4 @@ help: %: Makefile rm -rf ./build/ $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - rm -r source/examples source/markdowns source/reference source/eotasks.rst + # rm -r source/examples source/markdowns source/reference source/eotasks.rst diff --git a/docs/source/conf.py b/docs/source/conf.py index 00247a5d0..a7e3beaae 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -15,7 +15,6 @@ import os import shutil import sys -from collections import defaultdict from typing import Any, Dict, Optional import sphinx.ext.autodoc @@ -43,11 +42,13 @@ # built documents. # # The release is read from __init__ file and version is shortened release string. -with open(os.path.join(os.path.dirname(__file__), "../../setup.py")) as setup_file: - for line in setup_file: - if "version=" in line: - release = line.split("=")[1].strip('", \n').strip("'") - version = release.rsplit(".", 1)[0] +with open(os.path.join(os.path.dirname(__file__), "../../eolearn/__init__.py")) as init_file: + for line in init_file: + if line.find("__version__") >= 0: + release = line.split("=")[1].strip() + release = release.strip('"').strip("'") + +version = release.rsplit(".", 1)[0] # -- General configuration --------------------------------------------------- @@ -221,9 +222,6 @@ # A list of files that should not be packed into the epub file. epub_exclude_files = ["search.html"] -# Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {"https://docs.python.org/3.8/": None} - # -- Custom settings ---------------------------------------------- @@ -356,10 +354,10 @@ def get_subclasses(cls): custom_reference_files = {filename.rsplit(".", 1)[0] for filename in os.listdir(custom_reference_dir)} repository_dir = os.path.join(current_dir, "..", "..") -modules = ["core", "coregistration", "features", "geometry", "io", "mask", "ml_tools", "visualization"] +module = "eolearn" APIDOC_OPTIONS = ["--module-first", "--separate", "--no-toc", "--templatedir", os.path.join(current_dir, "_templates")] -APIDOC_EXCLUDE = defaultdict(list, {"core": ["graph.py", "eodata_io.py", "eodata_merge.py"]}) +APIDOC_EXCLUDE = ["graph.py", "eodata_io.py", "eodata_merge.py"] shutil.rmtree(reference_dir, ignore_errors=True) shutil.copytree(custom_reference_dir, reference_dir) @@ -369,13 +367,9 @@ def run_apidoc(_): from sphinx.ext.apidoc import main sys.path.append(os.path.join(os.path.dirname(__file__), "..")) - for module in modules: - module_dir = os.path.join(current_dir, "..", "..", module) - - exclude = [os.path.join(module_dir, "eolearn", module, filename) for filename in APIDOC_EXCLUDE[module]] - exclude.extend([os.path.join(module_dir, "setup.py"), os.path.join(module_dir, "eolearn", "tests")]) - - main(["-e", "-o", reference_dir, module_dir, *exclude, *APIDOC_OPTIONS]) + module_dir = os.path.join(current_dir, "..", "..", module) + exclude = [os.path.join(module_dir, "core", filename) for filename in APIDOC_EXCLUDE] + main(["-e", "-o", reference_dir, module_dir, *exclude, *APIDOC_OPTIONS]) def configure_github_link(_app: Any, pagename: str, _templatename: Any, context: Dict[str, Any], _doctree: Any) -> None: From a00f107edebce9f1cfb6d7ed1b99e1436d08262b Mon Sep 17 00:00:00 2001 From: Ziga Luksic Date: Tue, 27 Jun 2023 16:10:01 +0200 Subject: [PATCH 15/18] make docker work --- docker/eolearn.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/eolearn.dockerfile b/docker/eolearn.dockerfile index 3c768b5d4..50685d569 100644 --- a/docker/eolearn.dockerfile +++ b/docker/eolearn.dockerfile @@ -21,7 +21,7 @@ RUN pip3 install --no-cache-dir shapely --no-binary :all: WORKDIR /tmp COPY eolearn eolearn -COPY pyproject.toml README.md ./ +COPY pyproject.toml README.md LICENSE ./ RUN pip3 install --no-cache-dir .[FULL] From bee199110ce36e93b88b83083d043110a659505d Mon Sep 17 00:00:00 2001 From: Ziga Luksic Date: Wed, 28 Jun 2023 08:28:59 +0200 Subject: [PATCH 16/18] adjust CI --- .github/workflows/ci_action.yml | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci_action.yml b/.github/workflows/ci_action.yml index 72379379f..c348e0430 100644 --- a/.github/workflows/ci_action.yml +++ b/.github/workflows/ci_action.yml @@ -51,26 +51,14 @@ jobs: # caching the entire environment is faster when cache exists but slower for cache creation - name: Install packages - run: | - pip install -r requirements-dev.txt --upgrade --upgrade-strategy eager - python install_all.py - pip install -r ml_tools/requirements-tdigest.txt + run: pip install .[DEV] --upgrade --upgrade-strategy eager - name: Run pylint - run: make pylint + run: pylint eolearn - name: Run mypy if: success() || failure() - run: | - mypy \ - core/eolearn/core \ - coregistration/eolearn/coregistration \ - geometry/eolearn/geometry \ - features/eolearn/features \ - io/eolearn/io \ - mask/eolearn/mask \ - ml_tools/eolearn/ml_tools \ - visualization/eolearn/visualization + run: mypy eolearn test-on-github: runs-on: ubuntu-latest @@ -95,19 +83,10 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - # cache: pip # uncomment when all requirements are in `pyproject.toml` + cache: pip - name: Install packages - if: matrix.python-version != '3.9' - run: | - pip install -r requirements-dev.txt --upgrade --upgrade-strategy eager - python install_all.py -e - - - name: Install zarr backend # this will run Zarr backend tests on 3.9 - if: matrix.python-version == '3.9' - run: | - pip install -r requirements-dev.txt -r core/requirements-zarr.txt --upgrade --upgrade-strategy eager - python install_all.py -e + run: pip install -e .[DEV] --upgrade --upgrade-strategy eager - name: Run full tests and code coverage if: ${{ matrix.full_test_suite }} From 06cde976b1ad1b23675c1bd0803509c154eada39 Mon Sep 17 00:00:00 2001 From: Ziga Luksic Date: Wed, 28 Jun 2023 13:18:33 +0200 Subject: [PATCH 17/18] simplify dependencies --- pyproject.toml | 35 +++++++---------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 172c7585f..e4ffa01a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,9 @@ dependencies = [ ] [project.optional-dependencies] -all = ["eo-learn[COREGISTRATION,FEATURES,GEOMETRY,IO,MASK,MLTOOLS,VISUALIZATION]"] +all = [ + "eo-learn[COREGISTRATION,FEATURES,GEOMETRY,IO,MASK,MLTOOLS,VISUALIZATION]", +] full = ["eo-learn[ALL,RAY,ZARR,METEOBLUE,TDIGEST]"] ray = ["ray[default]"] zarr = ["s3fs", "zarr"] @@ -65,43 +67,20 @@ coregistration = [ ] # using headless version of opencv, otherwise gitlab runners fail features = [ "numba>=0.53.0", - "numpy", "pillow>=9.1.0", - "python-dateutil", "scikit-image>=0.19.0", "scikit-learn", "scipy", - "typing-extensions", -] -geometry = [ - "geopandas>=0.8.1", - "rasterio>=1.2.7", - "scikit-image>=0.15.0", - "shapely", -] -io = [ - "affine", - "boto3", - "fiona>=1.8.18", - "geopandas>=0.8.1", - "rasterio>=1.2.7", - "sentinelhub>=3.8.0", - "typing-extensions", ] +geometry = ["rasterio>=1.2.7", "scikit-image>=0.15.0", "shapely"] +io = ["affine", "fiona>=1.8.18", "rasterio>=1.2.7"] geodb = [ "python-dotenv", "xcube-geodb @ git+git://github.com/dcs4cop/xcube-geodb.git", ] meteoblue = ["meteoblue_dataset_sdk>=1,<2"] -mask = [ - "lightgbm>=2.0.11", - "numpy", - "opencv-python-headless", - "scikit-image>=0.13.0", - "sentinelhub", - "typing-extensions", -] -mltools = ["numpy", "shapely"] +mask = ["lightgbm>=2.0.11", "opencv-python-headless", "scikit-image>=0.13.0"] +mltools = ["shapely"] tdigest = ["tdigest==0.5.2.2"] mltoolsplotting = ["matplotlib"] visualization = ["graphviz>=0.10.1", "jinja2", "matplotlib", "pygments"] From 6e9d9dfb98a97495c0fa573a813f64859a56e6cd Mon Sep 17 00:00:00 2001 From: Ziga Luksic Date: Tue, 25 Jul 2023 13:55:04 +0200 Subject: [PATCH 18/18] add lgbm restriction --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e4ffa01a5..4222d3bdc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,7 +79,7 @@ geodb = [ "xcube-geodb @ git+git://github.com/dcs4cop/xcube-geodb.git", ] meteoblue = ["meteoblue_dataset_sdk>=1,<2"] -mask = ["lightgbm>=2.0.11", "opencv-python-headless", "scikit-image>=0.13.0"] +mask = ["lightgbm>=2.0.11, <4", "opencv-python-headless", "scikit-image>=0.13.0"] mltools = ["shapely"] tdigest = ["tdigest==0.5.2.2"] mltoolsplotting = ["matplotlib"]