diff --git a/core/README.md b/core/README.md index 8eda8be0..cc0380f6 100644 --- a/core/README.md +++ b/core/README.md @@ -1,5 +1,5 @@ # eolearn.core subpackage -The main subpackage which implements basic building blocks (EOPatch, EOTask and EOWorkflow) and commonly used functionalities. +The deprecated way to install `eolearn.core`. See [migration guide](https://github.com/sentinel-hub/eo-learn/issues/733) on how to correctly install the `eo-learn` package. -For more information about the module visit [readthedocs](https://eo-learn.readthedocs.io/en/latest/reference/eolearn.core.html), or see the [module task index](https://eo-learn.readthedocs.io/en/latest/eotasks.html#core). +Installs requirements and a dummy package that is detected by `eo-learn` but otherwise does not change anything. diff --git a/core/deprecated_eolearn_core/__init__.py b/core/deprecated_eolearn_core/__init__.py new file mode 100644 index 00000000..5b601886 --- /dev/null +++ b/core/deprecated_eolearn_core/__init__.py @@ -0,0 +1 @@ +__version__ = "1.5.0" diff --git a/core/setup.py b/core/setup.py index d431fc03..00a8026d 100644 --- a/core/setup.py +++ b/core/setup.py @@ -18,7 +18,7 @@ def parse_requirements(file): def get_version(): - path = os.path.join(os.path.dirname(__file__), "eolearn", "core", "__init__.py") + path = os.path.join(os.path.dirname(__file__), "deprecated_eolearn_core", "__init__.py") with open(path) as version_file: for line in version_file: if line.find("__version__") >= 0: @@ -44,15 +44,12 @@ def get_version(): author="Sinergise EO research team", author_email="eoresearch@sinergise.com", license="MIT", - packages=find_packages(exclude=["eolearn.tests*"]), - package_data={"eolearn": ["core/py.typed"]}, - include_package_data=True, + packages=find_packages(), install_requires=parse_requirements("requirements.txt"), extras_require={ "RAY": parse_requirements("requirements-ray.txt"), "ZARR": parse_requirements("requirements-zarr.txt"), }, - zip_safe=False, classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", diff --git a/coregistration/README.md b/coregistration/README.md index 407a914b..94fdede8 100644 --- a/coregistration/README.md +++ b/coregistration/README.md @@ -1,5 +1,5 @@ # eolearn.coregistration subpackage -A collection of tools and EOTasks for image co-registration +The deprecated way to install `eolearn.coregistration`. See [migration guide](https://github.com/sentinel-hub/eo-learn/issues/733) on how to correctly install the `eo-learn` package. -For more information about the module visit [readthedocs](https://eo-learn.readthedocs.io/en/latest/reference/eolearn.coregistration.html), or see the [module task index](https://eo-learn.readthedocs.io/en/latest/eotasks.html#coregistration). +Installs requirements and a dummy package that is detected by `eo-learn` but otherwise does not change anything. diff --git a/coregistration/deprecated_eolearn_coregistration/__init__.py b/coregistration/deprecated_eolearn_coregistration/__init__.py new file mode 100644 index 00000000..5b601886 --- /dev/null +++ b/coregistration/deprecated_eolearn_coregistration/__init__.py @@ -0,0 +1 @@ +__version__ = "1.5.0" diff --git a/coregistration/requirements.txt b/coregistration/requirements.txt index 0b5b46e2..150d5c82 100644 --- a/coregistration/requirements.txt +++ b/coregistration/requirements.txt @@ -1,3 +1,2 @@ # using headless version of opencv, otherwise gitlab runners fail -eo-learn-core opencv-python-headless diff --git a/coregistration/setup.py b/coregistration/setup.py index fd76eb52..e09b78e5 100644 --- a/coregistration/setup.py +++ b/coregistration/setup.py @@ -18,7 +18,7 @@ def parse_requirements(file): def get_version(): - path = os.path.join(os.path.dirname(__file__), "eolearn", "coregistration", "__init__.py") + path = os.path.join(os.path.dirname(__file__), "deprecated_eolearn_coregistration", "__init__.py") with open(path) as version_file: for line in version_file: if line.find("__version__") >= 0: @@ -45,9 +45,7 @@ def get_version(): author_email="eoresearch@sinergise.com", license="MIT", packages=find_packages(), - include_package_data=True, install_requires=parse_requirements("requirements.txt"), - zip_safe=False, classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", diff --git a/eolearn/__init__.py b/eolearn/__init__.py index 0f4393e5..c3566b29 100644 --- a/eolearn/__init__.py +++ b/eolearn/__init__.py @@ -1,2 +1,16 @@ """Main module of the `eolearn` package.""" __version__ = "1.4.2" + +import importlib.util +import warnings + +SUBPACKAGES = ["core", "coregistration", "features", "geometry", "io", "mask", "ml_tools", "visualization"] +deprecated_installs = [ + subpackage for subpackage in SUBPACKAGES if importlib.util.find_spec(f"deprecated_eolearn_{subpackage}") is not None +] +if deprecated_installs: + warnings.warn( + f"You are currently using an outdated installation of `eo-learn` for submodules {deprecated_installs}. You can" + " find instructions on how to install `eo-learn` correctly at" + " https://github.com/sentinel-hub/eo-learn/issues/733." + ) diff --git a/features/README.md b/features/README.md index e477f5a9..15664d2c 100644 --- a/features/README.md +++ b/features/README.md @@ -1,5 +1,5 @@ # eolearn.features subpackage -A collection of utilities for extracting data properties and feature manipulation. +The deprecated way to install `eolearn.features`. See [migration guide](https://github.com/sentinel-hub/eo-learn/issues/733) on how to correctly install the `eo-learn` package. -For more information about the module visit [readthedocs](https://eo-learn.readthedocs.io/en/latest/reference/eolearn.features.html), or see the [module task index](https://eo-learn.readthedocs.io/en/latest/eotasks.html#features). +Installs requirements and a dummy package that is detected by `eo-learn` but otherwise does not change anything. diff --git a/features/deprecated_eolearn_features/__init__.py b/features/deprecated_eolearn_features/__init__.py new file mode 100644 index 00000000..5b601886 --- /dev/null +++ b/features/deprecated_eolearn_features/__init__.py @@ -0,0 +1 @@ +__version__ = "1.5.0" diff --git a/features/requirements.txt b/features/requirements.txt index 1e4813f6..3ea2d507 100644 --- a/features/requirements.txt +++ b/features/requirements.txt @@ -1,4 +1,3 @@ -eo-learn-core numba>=0.53.0 numpy pillow>=9.1.0 diff --git a/features/setup.py b/features/setup.py index d5902903..d1e869c8 100644 --- a/features/setup.py +++ b/features/setup.py @@ -18,7 +18,7 @@ def parse_requirements(file): def get_version(): - path = os.path.join(os.path.dirname(__file__), "eolearn", "features", "__init__.py") + path = os.path.join(os.path.dirname(__file__), "deprecated_eolearn_features", "__init__.py") with open(path) as version_file: for line in version_file: if line.find("__version__") >= 0: @@ -45,9 +45,7 @@ def get_version(): author_email="eoresearch@sinergise.com", license="MIT", packages=find_packages(), - include_package_data=True, install_requires=parse_requirements("requirements.txt"), - zip_safe=False, classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", diff --git a/geometry/README.md b/geometry/README.md index eed6ec3c..7dbf06e4 100644 --- a/geometry/README.md +++ b/geometry/README.md @@ -1,5 +1,5 @@ # eolearn.geometry subpackage -Geometry subpackage used for geometric transformation and conversion between vector and raster data. +The deprecated way to install `eolearn.geometry`. See [migration guide](https://github.com/sentinel-hub/eo-learn/issues/733) on how to correctly install the `eo-learn` package. -For more information about the module visit [readthedocs](https://eo-learn.readthedocs.io/en/latest/reference/eolearn.geometry.html), or see the [module task index](https://eo-learn.readthedocs.io/en/latest/eotasks.html#geometry). +Installs requirements and a dummy package that is detected by `eo-learn` but otherwise does not change anything. diff --git a/geometry/deprecated_eolearn_geometry/__init__.py b/geometry/deprecated_eolearn_geometry/__init__.py new file mode 100644 index 00000000..5b601886 --- /dev/null +++ b/geometry/deprecated_eolearn_geometry/__init__.py @@ -0,0 +1 @@ +__version__ = "1.5.0" diff --git a/geometry/requirements.txt b/geometry/requirements.txt index 9218ee7f..44d262fa 100644 --- a/geometry/requirements.txt +++ b/geometry/requirements.txt @@ -1,4 +1,3 @@ -eo-learn-core geopandas>=0.8.1 rasterio>=1.2.7, <1.3.8 scikit-image>=0.15.0 diff --git a/geometry/setup.py b/geometry/setup.py index 476057df..5a4ead37 100644 --- a/geometry/setup.py +++ b/geometry/setup.py @@ -18,7 +18,7 @@ def parse_requirements(file): def get_version(): - path = os.path.join(os.path.dirname(__file__), "eolearn", "geometry", "__init__.py") + path = os.path.join(os.path.dirname(__file__), "deprecated_eolearn_geometry", "__init__.py") with open(path) as version_file: for line in version_file: if line.find("__version__") >= 0: @@ -45,9 +45,7 @@ def get_version(): author_email="eoresearch@sinergise.com", license="MIT", packages=find_packages(), - include_package_data=True, install_requires=parse_requirements("requirements.txt"), - zip_safe=False, classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", diff --git a/io/README.md b/io/README.md index 24784741..c989e1bb 100644 --- a/io/README.md +++ b/io/README.md @@ -1,5 +1,5 @@ # eolearn.io subpackage -Input/output subpackage that deals with obtaining data from Sentinel Hub services or saving and loading data locally. +The deprecated way to install `eolearn.io`. See [migration guide](https://github.com/sentinel-hub/eo-learn/issues/733) on how to correctly install the `eo-learn` package. -For more information about the module visit [readthedocs](https://eo-learn.readthedocs.io/en/latest/reference/eolearn.io.html), or see the [module task index](https://eo-learn.readthedocs.io/en/latest/eotasks.html#io). +Installs requirements and a dummy package that is detected by `eo-learn` but otherwise does not change anything. diff --git a/io/deprecated_eolearn_io/__init__.py b/io/deprecated_eolearn_io/__init__.py new file mode 100644 index 00000000..5b601886 --- /dev/null +++ b/io/deprecated_eolearn_io/__init__.py @@ -0,0 +1 @@ +__version__ = "1.5.0" diff --git a/io/requirements.txt b/io/requirements.txt index 6bc455e5..0b16c413 100644 --- a/io/requirements.txt +++ b/io/requirements.txt @@ -1,6 +1,5 @@ affine boto3 -eo-learn-core fiona>=1.8.18 geopandas>=0.8.1 rasterio>=1.2.7, <1.3.8 diff --git a/io/setup.py b/io/setup.py index aa4891ce..6bdea282 100644 --- a/io/setup.py +++ b/io/setup.py @@ -18,7 +18,7 @@ def parse_requirements(file): def get_version(): - path = os.path.join(os.path.dirname(__file__), "eolearn", "io", "__init__.py") + path = os.path.join(os.path.dirname(__file__), "deprecated_eolearn_io", "__init__.py") with open(path) as version_file: for line in version_file: if line.find("__version__") >= 0: @@ -45,10 +45,8 @@ def get_version(): author_email="eoresearch@sinergise.com", license="MIT", packages=find_packages(), - include_package_data=True, install_requires=parse_requirements("requirements.txt"), extras_require={"METEOBLUE": parse_requirements("requirements-meteoblue.txt")}, - zip_safe=False, classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", diff --git a/mask/README.md b/mask/README.md index 8229d08e..bcb6f7ff 100644 --- a/mask/README.md +++ b/mask/README.md @@ -1,5 +1,5 @@ # eolearn.mask subpackage -The subpackage is used for masking of data and calculation of cloud masks. +The deprecated way to install `eolearn.mask`. See [migration guide](https://github.com/sentinel-hub/eo-learn/issues/733) on how to correctly install the `eo-learn` package. -For more information about the module visit [readthedocs](https://eo-learn.readthedocs.io/en/latest/reference/eolearn.mask.html), or see the [module task index](https://eo-learn.readthedocs.io/en/latest/eotasks.html#mask). +Installs requirements and a dummy package that is detected by `eo-learn` but otherwise does not change anything. diff --git a/mask/deprecated_eolearn_mask/__init__.py b/mask/deprecated_eolearn_mask/__init__.py new file mode 100644 index 00000000..5b601886 --- /dev/null +++ b/mask/deprecated_eolearn_mask/__init__.py @@ -0,0 +1 @@ +__version__ = "1.5.0" diff --git a/mask/requirements.txt b/mask/requirements.txt index 2f17dd18..1a3a5467 100644 --- a/mask/requirements.txt +++ b/mask/requirements.txt @@ -1,5 +1,4 @@ # using headless version of opencv, otherwise gitlab runners fail -eo-learn-core lightgbm>=2.0.11, <4 numpy opencv-python-headless diff --git a/mask/setup.py b/mask/setup.py index 5d78748e..8d7e1ce6 100644 --- a/mask/setup.py +++ b/mask/setup.py @@ -18,7 +18,7 @@ def parse_requirements(file): def get_version(): - path = os.path.join(os.path.dirname(__file__), "eolearn", "mask", "__init__.py") + path = os.path.join(os.path.dirname(__file__), "deprecated_eolearn_mask", "__init__.py") with open(path) as version_file: for line in version_file: if line.find("__version__") >= 0: @@ -45,15 +45,7 @@ def get_version(): author_email="eoresearch@sinergise.com", license="MIT", packages=find_packages(), - include_package_data=True, - package_data={ - "eolearn.mask": [ - "models/pixel_s2_cloud_detector_lightGBM_v0.2.txt", - "models/ssim_s2_cloud_detector_lightGBM_v0.2.txt", - ] - }, install_requires=parse_requirements("requirements.txt"), - zip_safe=False, classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", diff --git a/ml_tools/MANIFEST.in b/ml_tools/MANIFEST.in deleted file mode 100644 index 970f8603..00000000 --- a/ml_tools/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -include requirements*.txt -include LICENSE -include README.md -include eolearn/ml_tools/py.typed -exclude eolearn/tests/* diff --git a/ml_tools/README.md b/ml_tools/README.md index e0b5d137..148a28ee 100644 --- a/ml_tools/README.md +++ b/ml_tools/README.md @@ -1,5 +1,5 @@ # eolearn.ml_tools subpackage -Various tools that can be used before or after the machine learning process. +The deprecated way to install `eolearn.ml_tools`. See [migration guide](https://github.com/sentinel-hub/eo-learn/issues/733) on how to correctly install the `eo-learn` package. -For more information about the module visit [readthedocs](https://eo-learn.readthedocs.io/en/latest/reference/eolearn.ml-tools.html), or see the [module task index](https://eo-learn.readthedocs.io/en/latest/eotasks.html#ml-tools). +Installs requirements and a dummy package that is detected by `eo-learn` but otherwise does not change anything. diff --git a/ml_tools/deprecated_eolearn_ml_tools/__init__.py b/ml_tools/deprecated_eolearn_ml_tools/__init__.py new file mode 100644 index 00000000..5b601886 --- /dev/null +++ b/ml_tools/deprecated_eolearn_ml_tools/__init__.py @@ -0,0 +1 @@ +__version__ = "1.5.0" diff --git a/ml_tools/requirements.txt b/ml_tools/requirements.txt index c9775b16..21a9abe7 100644 --- a/ml_tools/requirements.txt +++ b/ml_tools/requirements.txt @@ -1,3 +1,2 @@ -eo-learn-core numpy shapely diff --git a/ml_tools/setup.py b/ml_tools/setup.py index eb910d86..26a21315 100644 --- a/ml_tools/setup.py +++ b/ml_tools/setup.py @@ -18,7 +18,7 @@ def parse_requirements(file): def get_version(): - path = os.path.join(os.path.dirname(__file__), "eolearn", "ml_tools", "__init__.py") + path = os.path.join(os.path.dirname(__file__), "deprecated_eolearn_ml_tools", "__init__.py") with open(path) as version_file: for line in version_file: if line.find("__version__") >= 0: @@ -45,13 +45,11 @@ def get_version(): author_email="eoresearch@sinergise.com", license="MIT", packages=find_packages(), - include_package_data=True, install_requires=parse_requirements("requirements.txt"), extras_require={ "PLOTTING": parse_requirements("requirements-plotting.txt"), "TDIGEST": parse_requirements("requirements-tdigest.txt"), }, - zip_safe=False, classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", diff --git a/visualization/README.md b/visualization/README.md index f8aa261f..3f562974 100644 --- a/visualization/README.md +++ b/visualization/README.md @@ -1,5 +1,5 @@ # eolearn.visualization subpackage -A collection of data visualization utilities. +The deprecated way to install `eolearn.visualization`. See [migration guide](https://github.com/sentinel-hub/eo-learn/issues/733) on how to correctly install the `eo-learn` package. -For more information about the module visit [readthedocs](https://eo-learn.readthedocs.io/en/latest/reference/eolearn.visualization.html). +Installs requirements and a dummy package that is detected by `eo-learn` but otherwise does not change anything. diff --git a/visualization/deprecated_eolearn_visualization/__init__.py b/visualization/deprecated_eolearn_visualization/__init__.py new file mode 100644 index 00000000..5b601886 --- /dev/null +++ b/visualization/deprecated_eolearn_visualization/__init__.py @@ -0,0 +1 @@ +__version__ = "1.5.0" diff --git a/visualization/requirements.txt b/visualization/requirements.txt index 8cfba60e..17cff14c 100644 --- a/visualization/requirements.txt +++ b/visualization/requirements.txt @@ -1,4 +1,3 @@ -eo-learn-core graphviz>=0.10.1 jinja2 matplotlib diff --git a/visualization/setup.py b/visualization/setup.py index bec11d81..8201d00a 100644 --- a/visualization/setup.py +++ b/visualization/setup.py @@ -18,7 +18,7 @@ def parse_requirements(file): def get_version(): - path = os.path.join(os.path.dirname(__file__), "eolearn", "visualization", "__init__.py") + path = os.path.join(os.path.dirname(__file__), "deprecated_eolearn_visualization", "__init__.py") with open(path) as version_file: for line in version_file: if line.find("__version__") >= 0: @@ -46,9 +46,7 @@ def get_version(): license="MIT", packages=find_packages(), package_data={"eolearn": ["visualization/report_templates/report.html"]}, - include_package_data=True, install_requires=parse_requirements("requirements.txt"), - zip_safe=False, classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers",