From 5d24e808abd4c130d6670ce7f9aeaa83300d56d0 Mon Sep 17 00:00:00 2001 From: Rambaud Pierrick <12rambau@users.noreply.github.com> Date: Mon, 5 Feb 2024 07:49:47 +0000 Subject: [PATCH 1/7] chore: drop the warnings file --- .gitignore | 3 +-- warnings.txt | 30 ------------------------------ 2 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 warnings.txt diff --git a/.gitignore b/.gitignore index 332f7f2e..511f0094 100644 --- a/.gitignore +++ b/.gitignore @@ -50,7 +50,6 @@ coverage.xml .hypothesis/ .pytest_cache/ cover/ -warning.txt # Translations *.mo @@ -71,7 +70,7 @@ instance/ # Sphinx documentation docs/_build/ -warning.txt +warnings.txt # PyBuilder .pybuilder/ diff --git a/warnings.txt b/warnings.txt deleted file mode 100644 index ce7da8d7..00000000 --- a/warnings.txt +++ /dev/null @@ -1,30 +0,0 @@ -WARNING: Cannot resolve import of geetools.tools.array in geetools -WARNING: Cannot resolve import of geetools.tools.collection in geetools -WARNING: Cannot resolve import of geetools.tools.date in geetools -WARNING: Cannot resolve import of geetools.tools.dictionary in geetools -WARNING: Cannot resolve import of geetools.tools.element in geetools -WARNING: Cannot resolve import of geetools.tools.feature in geetools -WARNING: Cannot resolve import of geetools.tools.featurecollection in geetools -WARNING: Cannot resolve import of geetools.tools.geometry in geetools -WARNING: Cannot resolve import of geetools.tools.number in geetools -WARNING: Cannot resolve import of geetools.tools.string in geetools -WARNING: Cannot resolve import of geetools.tools.imagecollection in geetools -WARNING: Cannot resolve import of unknown module geetools.utils in geetools.batch.imagecollection -WARNING: Cannot resolve import of unknown module geetools.utils in geetools.batch.image -/home/borntobealive/libs/gee_tools/docs/autoapi/geetools/Image/index.rst:470: ERROR: Unexpected indentation. -/home/borntobealive/libs/gee_tools/docs/autoapi/geetools/Image/index.rst:607: WARNING: Inline strong start-string without end-string. -/home/borntobealive/libs/gee_tools/docs/autoapi/geetools/Image/index.rst:787: ERROR: Unexpected indentation. -/home/borntobealive/libs/gee_tools/docs/autoapi/geetools/Image/index.rst:811: ERROR: Unexpected indentation. -/home/borntobealive/libs/gee_tools/docs/autoapi/geetools/ImageCollection/index.rst:247: ERROR: Unexpected indentation. -/home/borntobealive/libs/gee_tools/docs/autoapi/geetools/ImageCollection/index.rst:394: ERROR: Unexpected indentation. -/home/borntobealive/libs/gee_tools/docs/autoapi/geetools/ImageCollection/index.rst:418: ERROR: Unexpected indentation. -/home/borntobealive/libs/gee_tools/docs/autoapi/geetools/algorithms/index.rst:215: WARNING: Field list ends without a blank line; unexpected unindent. -/home/borntobealive/libs/gee_tools/docs/autoapi/geetools/batch/image/index.rst:88: WARNING: Field list ends without a blank line; unexpected unindent. -/home/borntobealive/libs/gee_tools/docs/autoapi/geetools/batch/image/index.rst:92: WARNING: Definition list ends without a blank line; unexpected unindent. -/home/borntobealive/libs/gee_tools/docs/autoapi/geetools/batch/image/index.rst:114: WARNING: Field list ends without a blank line; unexpected unindent. -/home/borntobealive/libs/gee_tools/docs/autoapi/geetools/bitreader/index.rst:51: ERROR: Unexpected indentation. -/home/borntobealive/libs/gee_tools/docs/autoapi/geetools/bitreader/index.rst:49: WARNING: Inline literal start-string without end-string. -/home/borntobealive/libs/gee_tools/docs/autoapi/geetools/bitreader/index.rst:58: WARNING: Inline literal start-string without end-string. -/home/borntobealive/libs/gee_tools/docs/autoapi/geetools/classification/index.rst:42: WARNING: Field list ends without a blank line; unexpected unindent. -/home/borntobealive/libs/gee_tools/docs/_build/html/.doctrees/nbsphinx/example/template.ipynb: WARNING: document isn't included in any toctree -/home/borntobealive/libs/gee_tools/docs/_build/html/example/template.ipynb: WARNING: document isn't included in any toctree From 39567bef2c0076299504489006abc82990cb0bd6 Mon Sep 17 00:00:00 2001 From: Rambaud Pierrick <12rambau@users.noreply.github.com> Date: Mon, 5 Feb 2024 08:54:54 +0100 Subject: [PATCH 2/7] docs: use absolute path for logo --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 9f85898d..b3b4bad6 100644 --- a/README.rst +++ b/README.rst @@ -40,7 +40,7 @@ geetools Google Earth Engine tools ------------------------- -.. image:: docs/_static/logo.svg +.. image:: https://raw.githubusercontent.com/gee-community/geetools/readme/docs/_static/logo.svg :width: 20% :align: right From 5db64ee90a554c135914cbccd6548fdd4099dcfd Mon Sep 17 00:00:00 2001 From: Rambaud Pierrick <12rambau@users.noreply.github.com> Date: Mon, 5 Feb 2024 08:05:17 +0000 Subject: [PATCH 3/7] fix: correct import statement in batch --- geetools/batch/image.py | 2 +- geetools/batch/imagecollection.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/geetools/batch/image.py b/geetools/batch/image.py index 74bb39ae..f416fa4a 100644 --- a/geetools/batch/image.py +++ b/geetools/batch/image.py @@ -4,7 +4,7 @@ import ee from .. import tools -from ..utils import makeName +from .._deprecated_utils import makeName from . import utils diff --git a/geetools/batch/imagecollection.py b/geetools/batch/imagecollection.py index ad99738e..5d8e4911 100644 --- a/geetools/batch/imagecollection.py +++ b/geetools/batch/imagecollection.py @@ -4,7 +4,7 @@ import ee from .. import tools -from ..utils import makeName +from .._deprecated_utils import makeName from . import utils From 80dbc459a08a7165ba389e5b9b72c487c05d6f06 Mon Sep 17 00:00:00 2001 From: Rambaud Pierrick <12rambau@users.noreply.github.com> Date: Mon, 5 Feb 2024 09:12:58 +0000 Subject: [PATCH 4/7] test: use num_regression for Image tests --- tests/test_Image.py | 161 +++++++------ tests/test_Image/test_add_date.csv | 2 + .../test_default_spectral_indices.csv | 2 + .../test_default_spectral_indices.yml | 217 ------------------ tests/test_Image/test_deprecated_compute.csv | 2 + tests/test_Image/test_deprecated_compute.yml | 24 -- .../test_deprecated_doy_to_date.csv | 2 + .../test_deprecated_doy_to_date.yml | 1 - tests/test_Image/test_deprecated_empty.csv | 2 + tests/test_Image/test_deprecated_empty.yml | 1 - .../test_Image/test_deprecated_empty_copy.csv | 2 + .../test_Image/test_deprecated_empty_copy.yml | 23 -- tests/test_Image/test_deprecated_evi.csv | 2 + tests/test_Image/test_deprecated_evi.yml | 24 -- .../test_Image/test_deprecated_get_value.csv | 2 + .../test_Image/test_deprecated_get_value.yml | 23 -- .../test_deprecated_linear_function.csv | 2 + .../test_deprecated_linear_function.yml | 1 - .../test_deprecated_make_date_band.csv | 2 + .../test_deprecated_make_date_band.yml | 24 -- tests/test_Image/test_deprecated_nbr.csv | 2 + tests/test_Image/test_deprecated_nbr.yml | 24 -- tests/test_Image/test_deprecated_nbr2.csv | 2 + tests/test_Image/test_deprecated_nbr2.yml | 24 -- tests/test_Image/test_deprecated_ndfi.csv | 2 + tests/test_Image/test_deprecated_ndfi.yml | 23 -- tests/test_Image/test_deprecated_ndvi.csv | 2 + tests/test_Image/test_deprecated_ndvi.yml | 24 -- .../test_deprecated_parametrize.csv | 2 + .../test_deprecated_parametrize.yml | 2 - .../test_Image/test_deprecated_sum_bands.csv | 2 + .../test_Image/test_deprecated_sum_bands.yml | 1 - .../test_deprecated_tasseled_cap.csv | 2 + .../test_deprecated_tasseled_cap.yml | 8 - tests/test_Image/test_doy_to_date.csv | 2 + tests/test_Image/test_doy_to_date.yml | 1 - .../test_Image/test_doy_to_date_with_band.csv | 2 + .../test_Image/test_doy_to_date_with_band.yml | 1 - .../test_doy_to_date_with_format.csv | 2 + .../test_doy_to_date_with_format.yml | 1 - tests/test_Image/test_full.csv | 2 + tests/test_Image/test_full.yml | 1 - tests/test_Image/test_full_like.csv | 2 + tests/test_Image/test_full_like.yml | 23 -- tests/test_Image/test_full_like_with_mask.csv | 2 + tests/test_Image/test_full_like_with_mask.yml | 23 -- tests/test_Image/test_full_with_lists.csv | 2 + tests/test_Image/test_full_with_lists.yml | 3 - tests/test_Image/test_full_with_name.csv | 2 + tests/test_Image/test_full_with_name.yml | 1 - tests/test_Image/test_full_with_value.csv | 2 + tests/test_Image/test_full_with_value.yml | 1 - tests/test_Image/test_get_values.csv | 2 + tests/test_Image/test_get_values.yml | 23 -- .../test_Image/test_get_values_with_scale.csv | 2 + .../test_Image/test_get_values_with_scale.yml | 23 -- tests/test_Image/test_histogram_match.csv | 2 + tests/test_Image/test_histogram_match.yml | 3 - tests/test_Image/test_interpolate_bands.csv | 2 + tests/test_Image/test_interpolate_bands.yml | 2 - tests/test_Image/test_mask_S2_clouds.csv | 2 + tests/test_Image/test_mask_S2_clouds.yml | 26 --- tests/test_Image/test_negative_clip.csv | 2 + tests/test_Image/test_negative_clip.yml | 23 -- tests/test_Image/test_pan_sharpen.csv | 2 + tests/test_Image/test_pan_sharpen.yml | 6 - tests/test_Image/test_preprocess.csv | 2 + tests/test_Image/test_preprocess.yml | 23 -- tests/test_Image/test_reduce_bands.csv | 2 + tests/test_Image/test_reduce_bands.yml | 1 - .../test_reduce_bands_with_bands.csv | 2 + .../test_reduce_bands_with_bands.yml | 1 - .../test_reduce_bands_with_name.csv | 2 + .../test_reduce_bands_with_name.yml | 1 - tests/test_Image/test_scale_and_offset.csv | 2 + tests/test_Image/test_scale_and_offset.yml | 23 -- tests/test_Image/test_tasseled_cap.csv | 2 + tests/test_Image/test_tasseled_cap.yml | 9 - 78 files changed, 158 insertions(+), 744 deletions(-) create mode 100644 tests/test_Image/test_add_date.csv create mode 100644 tests/test_Image/test_default_spectral_indices.csv delete mode 100644 tests/test_Image/test_default_spectral_indices.yml create mode 100644 tests/test_Image/test_deprecated_compute.csv delete mode 100644 tests/test_Image/test_deprecated_compute.yml create mode 100644 tests/test_Image/test_deprecated_doy_to_date.csv delete mode 100644 tests/test_Image/test_deprecated_doy_to_date.yml create mode 100644 tests/test_Image/test_deprecated_empty.csv delete mode 100644 tests/test_Image/test_deprecated_empty.yml create mode 100644 tests/test_Image/test_deprecated_empty_copy.csv delete mode 100644 tests/test_Image/test_deprecated_empty_copy.yml create mode 100644 tests/test_Image/test_deprecated_evi.csv delete mode 100644 tests/test_Image/test_deprecated_evi.yml create mode 100644 tests/test_Image/test_deprecated_get_value.csv delete mode 100644 tests/test_Image/test_deprecated_get_value.yml create mode 100644 tests/test_Image/test_deprecated_linear_function.csv delete mode 100644 tests/test_Image/test_deprecated_linear_function.yml create mode 100644 tests/test_Image/test_deprecated_make_date_band.csv delete mode 100644 tests/test_Image/test_deprecated_make_date_band.yml create mode 100644 tests/test_Image/test_deprecated_nbr.csv delete mode 100644 tests/test_Image/test_deprecated_nbr.yml create mode 100644 tests/test_Image/test_deprecated_nbr2.csv delete mode 100644 tests/test_Image/test_deprecated_nbr2.yml create mode 100644 tests/test_Image/test_deprecated_ndfi.csv delete mode 100644 tests/test_Image/test_deprecated_ndfi.yml create mode 100644 tests/test_Image/test_deprecated_ndvi.csv delete mode 100644 tests/test_Image/test_deprecated_ndvi.yml create mode 100644 tests/test_Image/test_deprecated_parametrize.csv delete mode 100644 tests/test_Image/test_deprecated_parametrize.yml create mode 100644 tests/test_Image/test_deprecated_sum_bands.csv delete mode 100644 tests/test_Image/test_deprecated_sum_bands.yml create mode 100644 tests/test_Image/test_deprecated_tasseled_cap.csv delete mode 100644 tests/test_Image/test_deprecated_tasseled_cap.yml create mode 100644 tests/test_Image/test_doy_to_date.csv delete mode 100644 tests/test_Image/test_doy_to_date.yml create mode 100644 tests/test_Image/test_doy_to_date_with_band.csv delete mode 100644 tests/test_Image/test_doy_to_date_with_band.yml create mode 100644 tests/test_Image/test_doy_to_date_with_format.csv delete mode 100644 tests/test_Image/test_doy_to_date_with_format.yml create mode 100644 tests/test_Image/test_full.csv delete mode 100644 tests/test_Image/test_full.yml create mode 100644 tests/test_Image/test_full_like.csv delete mode 100644 tests/test_Image/test_full_like.yml create mode 100644 tests/test_Image/test_full_like_with_mask.csv delete mode 100644 tests/test_Image/test_full_like_with_mask.yml create mode 100644 tests/test_Image/test_full_with_lists.csv delete mode 100644 tests/test_Image/test_full_with_lists.yml create mode 100644 tests/test_Image/test_full_with_name.csv delete mode 100644 tests/test_Image/test_full_with_name.yml create mode 100644 tests/test_Image/test_full_with_value.csv delete mode 100644 tests/test_Image/test_full_with_value.yml create mode 100644 tests/test_Image/test_get_values.csv delete mode 100644 tests/test_Image/test_get_values.yml create mode 100644 tests/test_Image/test_get_values_with_scale.csv delete mode 100644 tests/test_Image/test_get_values_with_scale.yml create mode 100644 tests/test_Image/test_histogram_match.csv delete mode 100644 tests/test_Image/test_histogram_match.yml create mode 100644 tests/test_Image/test_interpolate_bands.csv delete mode 100644 tests/test_Image/test_interpolate_bands.yml create mode 100644 tests/test_Image/test_mask_S2_clouds.csv delete mode 100644 tests/test_Image/test_mask_S2_clouds.yml create mode 100644 tests/test_Image/test_negative_clip.csv delete mode 100644 tests/test_Image/test_negative_clip.yml create mode 100644 tests/test_Image/test_pan_sharpen.csv delete mode 100644 tests/test_Image/test_pan_sharpen.yml create mode 100644 tests/test_Image/test_preprocess.csv delete mode 100644 tests/test_Image/test_preprocess.yml create mode 100644 tests/test_Image/test_reduce_bands.csv delete mode 100644 tests/test_Image/test_reduce_bands.yml create mode 100644 tests/test_Image/test_reduce_bands_with_bands.csv delete mode 100644 tests/test_Image/test_reduce_bands_with_bands.yml create mode 100644 tests/test_Image/test_reduce_bands_with_name.csv delete mode 100644 tests/test_Image/test_reduce_bands_with_name.yml create mode 100644 tests/test_Image/test_scale_and_offset.csv delete mode 100644 tests/test_Image/test_scale_and_offset.yml create mode 100644 tests/test_Image/test_tasseled_cap.csv delete mode 100644 tests/test_Image/test_tasseled_cap.yml diff --git a/tests/test_Image.py b/tests/test_Image.py index d7198617..ecf63cfc 100644 --- a/tests/test_Image.py +++ b/tests/test_Image.py @@ -14,16 +14,16 @@ class TestAddDate: """Test the ``addDate`` method.""" - def test_add_date(self, s2_sr_vatican_2020, vatican_buffer, data_regression): + def test_add_date(self, s2_sr_vatican_2020, vatican_buffer, num_regression): image = s2_sr_vatican_2020.geetools.addDate() values = image.reduceRegion(ee.Reducer.first(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) - def test_deprecated_make_date_band(self, s2_sr_vatican_2020, vatican_buffer, data_regression): + def test_deprecated_make_date_band(self, s2_sr_vatican_2020, vatican_buffer, num_regression): with pytest.deprecated_call(): image = geetools.tools.date.makeDateBand(s2_sr_vatican_2020) values = image.reduceRegion(ee.Reducer.first(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) class TestAddSuffix: @@ -63,18 +63,18 @@ def test_deprecated_add_prefix(self, s2_sr_vatican_2020, data_regression): class TestGetValues: """Test the ``getValues`` method.""" - def test_get_values(self, s2_sr_vatican_2020, vatican_buffer, data_regression): + def test_get_values(self, s2_sr_vatican_2020, vatican_buffer, num_regression): values = s2_sr_vatican_2020.geetools.getValues(vatican_buffer.centroid()) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) - def test_get_values_with_scale(self, s2_sr_vatican_2020, vatican_buffer, data_regression): + def test_get_values_with_scale(self, s2_sr_vatican_2020, vatican_buffer, num_regression): values = s2_sr_vatican_2020.geetools.getValues(vatican_buffer.centroid(), scale=100) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) - def test_deprecated_get_value(self, s2_sr_vatican_2020, vatican_buffer, data_regression): + def test_deprecated_get_value(self, s2_sr_vatican_2020, vatican_buffer, num_regression): with pytest.deprecated_call(): values = geetools.tools.image.getValue(s2_sr_vatican_2020, vatican_buffer.centroid()) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) class TestMinScale: @@ -117,9 +117,8 @@ def test_rename(self, s2_sr_vatican_2020, data_regression): def test_deprecated_rename_dict(self, s2_sr_vatican_2020, data_regression): with pytest.deprecated_call(): - image = geetools.tools.image.renameDict( - s2_sr_vatican_2020, {"B1": "newB1", "B2": "newB2"} - ) + replace = {"B1": "newB1", "B2": "newB2"} + image = geetools.tools.image.renameDict(s2_sr_vatican_2020, replace) data_regression.check(image.bandNames().getInfo()) @@ -200,92 +199,92 @@ def test_buffer_mask(self): class TestFull: """Test the ``full`` method.""" - def test_full(self, vatican_buffer, data_regression): + def test_full(self, vatican_buffer, num_regression): image = ee.Image.geetools.full() values = image.reduceRegion(ee.Reducer.first(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) - def test_full_with_value(self, vatican_buffer, data_regression): + def test_full_with_value(self, vatican_buffer, num_regression): image = ee.Image.geetools.full([1]) values = image.reduceRegion(ee.Reducer.first(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) - def test_full_with_name(self, vatican_buffer, data_regression): + def test_full_with_name(self, vatican_buffer, num_regression): image = ee.Image.geetools.full([1], ["toto"]) values = image.reduceRegion(ee.Reducer.first(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) - def test_full_with_lists(self, vatican_buffer, data_regression): + def test_full_with_lists(self, vatican_buffer, num_regression): image = ee.Image.geetools.full([1, 2, 3], ["toto", "titi", "tata"]) values = image.reduceRegion(ee.Reducer.first(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) - def test_deprecated_empty(self, vatican_buffer, data_regression): + def test_deprecated_empty(self, vatican_buffer, num_regression): with pytest.deprecated_call(): image = geetools.tools.image.empty() values = image.reduceRegion(ee.Reducer.first(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) class TestFullLike: """Test the ``fullLike`` method.""" - def test_full_like(self, vatican_buffer, s2_sr_vatican_2020, data_regression): + def test_full_like(self, vatican_buffer, s2_sr_vatican_2020, num_regression): image = s2_sr_vatican_2020.set({"props": "toto"}) image = image.geetools.fullLike(0) values = image.reduceRegion(ee.Reducer.first(), vatican_buffer, 10) assert "props" not in image.propertyNames().getInfo() - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) def test_full_like_with_properties(self, s2_sr_vatican_2020): image = s2_sr_vatican_2020.set({"props": "toto"}) image = image.geetools.fullLike(0, copyProperties=1) assert "props" in image.propertyNames().getInfo() - def test_full_like_with_mask(self, s2_sr_vatican_2020, data_regression): + def test_full_like_with_mask(self, s2_sr_vatican_2020, num_regression): image = s2_sr_vatican_2020.geetools.fullLike(0, keepMask=1) values = image.geetools.getValues(ee.Geometry.Point(0, 0)) - data_regression.check(values.getInfo()) + num_regression.check({k: np.nan if v is None else v for k, v in values.getInfo().items()}) - def test_deprecated_empty_copy(self, vatican_buffer, s2_sr_vatican_2020, data_regression): + def test_deprecated_empty_copy(self, vatican_buffer, s2_sr_vatican_2020, num_regression): with pytest.deprecated_call(): image = geetools.tools.image.emptyCopy(s2_sr_vatican_2020) values = image.reduceRegion(ee.Reducer.first(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) class TestReduceBands: """Test the ``reduceBands`` method.""" - def test_reduce_bands(self, s2_sr_vatican_2020, vatican_buffer, data_regression): + def test_reduce_bands(self, s2_sr_vatican_2020, vatican_buffer, num_regression): image = s2_sr_vatican_2020.geetools.reduceBands("sum") values = image.select("sum").reduceRegion(ee.Reducer.mean(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) - def test_reduce_bands_with_bands(self, s2_sr_vatican_2020, vatican_buffer, data_regression): + def test_reduce_bands_with_bands(self, s2_sr_vatican_2020, vatican_buffer, num_regression): image = s2_sr_vatican_2020.geetools.reduceBands("sum", ["B1", "B2"]) values = image.select("sum").reduceRegion(ee.Reducer.mean(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) - def test_reduce_bands_with_name(self, s2_sr_vatican_2020, vatican_buffer, data_regression): + def test_reduce_bands_with_name(self, s2_sr_vatican_2020, vatican_buffer, num_regression): image = s2_sr_vatican_2020.geetools.reduceBands("sum", name="toto") values = image.select("toto").reduceRegion(ee.Reducer.mean(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) - def test_deprecated_sum_bands(self, s2_sr_vatican_2020, vatican_buffer, data_regression): + def test_deprecated_sum_bands(self, s2_sr_vatican_2020, vatican_buffer, num_regression): with pytest.deprecated_call(): image = geetools.tools.image.sumBands(s2_sr_vatican_2020, "sum", ["B1", "B2"]) values = image.select("sum").reduceRegion(ee.Reducer.mean(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) class TestNegativeClip: """Test the ``negativeClip`` method.""" - def test_negative_clip(self, s2_sr_vatican_2020, vatican_buffer, data_regression): + def test_negative_clip(self, s2_sr_vatican_2020, vatican_buffer, num_regression): image = s2_sr_vatican_2020.geetools.negativeClip(vatican_buffer) values = image.reduceRegion(ee.Reducer.mean(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check({k: np.nan if v is None else v for k, v in values.getInfo().items()}) class testFormat: @@ -346,26 +345,26 @@ def test_deprecated_gauss_function(self, s2_sr_vatican_2020, vatican_buffer, num class TestDoyToDate: """Test the ``doyToDate`` method.""" - def test_doy_to_date(self, doy_image, vatican_buffer, data_regression): + def test_doy_to_date(self, doy_image, vatican_buffer, num_regression): image = doy_image.geetools.doyToDate(2023) values = image.reduceRegion(ee.Reducer.min(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) - def test_doy_to_date_with_format(self, doy_image, vatican_buffer, data_regression): + def test_doy_to_date_with_format(self, doy_image, vatican_buffer, num_regression): image = doy_image.geetools.doyToDate(2023, dateFormat="yyyy.DDD") values = image.reduceRegion(ee.Reducer.min(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) - def test_doy_to_date_with_band(self, doy_image, vatican_buffer, data_regression): + def test_doy_to_date_with_band(self, doy_image, vatican_buffer, num_regression): image = doy_image.geetools.doyToDate(2023, band="doy2") values = image.reduceRegion(ee.Reducer.min(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) - def test_deprecated_doy_to_date(self, doy_image, vatican_buffer, data_regression): + def test_deprecated_doy_to_date(self, doy_image, vatican_buffer, num_regression): with pytest.deprecated_call(): image = geetools.tools.image.doyToDate(doy_image, year=2023) values = image.reduceRegion(ee.Reducer.min(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) class TestRepeat: @@ -390,11 +389,11 @@ def image_instance(self): class TestmatchHistogram: """Test the ``histogramMatch`` method.""" - def test_histogram_match(self, image_source, image_target, vatican_buffer, data_regression): + def test_histogram_match(self, image_source, image_target, vatican_buffer, num_regression): bands = {"R": "R", "G": "G", "B": "B"} image = image_source.geetools.matchHistogram(image_target, bands) values = image.reduceRegion(ee.Reducer.mean(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) @pytest.fixture def dates(self): @@ -449,25 +448,25 @@ def image_instance(self): class TestInterpolateBands: """Test the ``interpolateBands`` method.""" - def test_interpolate_bands(self, image_instance, vatican_buffer, data_regression): + def test_interpolate_bands(self, image_instance, vatican_buffer, num_regression): image = image_instance.geetools.interpolateBands([0, 3000], [0, 30]) values = image.reduceRegion(ee.Reducer.first(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) - def test_deprecated_parametrize(self, image_instance, vatican_buffer, data_regression): + def test_deprecated_parametrize(self, image_instance, vatican_buffer, num_regression): with pytest.deprecated_call(): image = geetools.tools.image.parametrize(image_instance, [0, 3000], [0, 30]) values = image.reduceRegion(ee.Reducer.first(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) - def test_deprecated_linear_function(self, image_instance, vatican_buffer, data_regression): + def test_deprecated_linear_function(self, image_instance, vatican_buffer, num_regression): with pytest.deprecated_call(): band = image_instance.bandNames().get(0) image = geetools.tools.image.linearFunction( image_instance, band, 0, 3000, output_min=0, output_max=30 ) values = image.reduceRegion(ee.Reducer.first(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) @pytest.fixture def image_instance(self, vatican_buffer): @@ -534,55 +533,55 @@ def test_indices(self): class TestSpectralIndices: """Test the ``spectralIndices`` method.""" - def test_default_spectral_indices(self, s2_sr_vatican_2020, vatican_buffer, data_regression): + def test_default_spectral_indices(self, s2_sr_vatican_2020, vatican_buffer, num_regression): image = s2_sr_vatican_2020.geetools.spectralIndices("all") values = image.reduceRegion(ee.Reducer.mean(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check({k: np.nan if v is None else v for k, v in values.getInfo().items()}) - def test_deprecated_compute(self, s2_sr_vatican_2020, vatican_buffer, data_regression): + def test_deprecated_compute(self, s2_sr_vatican_2020, vatican_buffer, num_regression): with pytest.deprecated_call(): image = geetools.indices.compute(s2_sr_vatican_2020, "NDVI", None) values = image.reduceRegion(ee.Reducer.mean(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) - def test_deprecated_ndvi(self, s2_sr_vatican_2020, vatican_buffer, data_regression): + def test_deprecated_ndvi(self, s2_sr_vatican_2020, vatican_buffer, num_regression): with pytest.deprecated_call(): image = geetools.indices.ndvi(s2_sr_vatican_2020, None, None) values = image.reduceRegion(ee.Reducer.mean(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) - def test_deprecated_evi(self, s2_sr_vatican_2020, vatican_buffer, data_regression): + def test_deprecated_evi(self, s2_sr_vatican_2020, vatican_buffer, num_regression): with pytest.deprecated_call(): image = geetools.indices.evi(s2_sr_vatican_2020, None, None, None) values = image.reduceRegion(ee.Reducer.mean(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) - def test_deprecated_nbr2(self, s2_sr_vatican_2020, vatican_buffer, data_regression): + def test_deprecated_nbr2(self, s2_sr_vatican_2020, vatican_buffer, num_regression): with pytest.deprecated_call(): image = geetools.indices.nbr2(s2_sr_vatican_2020, None, None) values = image.reduceRegion(ee.Reducer.mean(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) - def test_deprecated_nbr(self, s2_sr_vatican_2020, vatican_buffer, data_regression): + def test_deprecated_nbr(self, s2_sr_vatican_2020, vatican_buffer, num_regression): with pytest.deprecated_call(): image = geetools.indices.nbr(s2_sr_vatican_2020, None, None) values = image.reduceRegion(ee.Reducer.mean(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) - def test_deprecated_ndfi(self, s2_sr_vatican_2020, vatican_buffer, data_regression): + def test_deprecated_ndfi(self, s2_sr_vatican_2020, vatican_buffer, num_regression): with pytest.deprecated_call(): image = geetools.indices.ndfi(s2_sr_vatican_2020, None, None, None, None, None, None) values = image.reduceRegion(ee.Reducer.mean(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) class TestMaskClouds: """Test the ``maskClouds`` method.""" - def test_mask_S2_clouds(self, s2_sr_vatican_2020, vatican_buffer, data_regression): + def test_mask_S2_clouds(self, s2_sr_vatican_2020, vatican_buffer, num_regression): image = s2_sr_vatican_2020.geetools.maskClouds() values = image.reduceRegion(ee.Reducer.mean(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) class TestGetscaleParams: @@ -604,19 +603,19 @@ def get_offset_params(self, s2_sr_vatican_2020, data_regression): class TestScaleAndOffset: """Test the ``scaleAndOffset`` method.""" - def test_scale_and_offset(self, vatican_buffer, s2_sr_vatican_2020, data_regression): + def test_scale_and_offset(self, vatican_buffer, s2_sr_vatican_2020, num_regression): image = s2_sr_vatican_2020.geetools.scaleAndOffset() values = image.reduceRegion(ee.Reducer.mean(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) class TestPreprocess: """Test the ``preprocess`` method.""" - def test_preprocess(self, vatican_buffer, s2_sr_vatican_2020, data_regression): + def test_preprocess(self, vatican_buffer, s2_sr_vatican_2020, num_regression): image = s2_sr_vatican_2020.geetools.preprocess() values = image.reduceRegion(ee.Reducer.mean(), vatican_buffer, 10) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) class TestGetSTAC: @@ -647,28 +646,28 @@ def get_citation(self, s2_sr_vatican_2020, data_regression): class TestPanSharpen: """Test the panSharpen method.""" - def test_pan_sharpen(self, data_regression): + def test_pan_sharpen(self, num_regression): source = ee.Image("LANDSAT/LC08/C01/T1_TOA/LC08_047027_20160819") sharp = source.geetools.panSharpen(method="HPFA", qa=["MSE", "RMSE"], maxPixels=1e13) centroid = sharp.geometry().centroid().buffer(100) values = sharp.reduceRegion(ee.Reducer.mean(), centroid, 1) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) class TestTasseledCap: """Test the tasseledCap method.""" - def test_tasseled_cap(self, data_regression): + def test_tasseled_cap(self, num_regression): img = ee.Image("LANDSAT/LT05/C01/T1/LT05_044034_20081011") img = img.geetools.tasseledCap() centroid = img.geometry().centroid().buffer(100) values = img.reduceRegion(ee.Reducer.mean(), centroid, 1) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) - def test_deprecated_tasseled_cap(self, data_regression): + def test_deprecated_tasseled_cap(self, num_regression): img = ee.Image("LANDSAT/LT05/C01/T1/LT05_044034_20081011") with pytest.deprecated_call(): geetools.indices.tasseled_cap_s2(img) centroid = img.geometry().centroid().buffer(100) values = img.reduceRegion(ee.Reducer.mean(), centroid, 1) - data_regression.check(values.getInfo()) + num_regression.check(values.getInfo()) diff --git a/tests/test_Image/test_add_date.csv b/tests/test_Image/test_add_date.csv new file mode 100644 index 00000000..bb0737e1 --- /dev/null +++ b/tests/test_Image/test_add_date.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP,date +0,72,214,1175,958,188,366,285,910,1232,1328,1216,1431,2104,2,0,0,0,0,5,21,38,29,588,1577873347042 diff --git a/tests/test_Image/test_default_spectral_indices.csv b/tests/test_Image/test_default_spectral_indices.csv new file mode 100644 index 00000000..15215d11 --- /dev/null +++ b/tests/test_Image/test_default_spectral_indices.csv @@ -0,0 +1,2 @@ +,AFRI1600,AFRI2100,ANDWI,AOT,ARI,ARI2,ARVI,ATSAVI,AVI,AWEInsh,AWEIsh,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,BAI,BAIM,BAIS2,BCC,BI,BITM,BIXS,BLFEI,BNDVI,BRBA,BWDRVI,BaI,CIG,CIRE,CSI,CVI,DBSI,DSI,DSWI1,DSWI2,DSWI3,DSWI4,DSWI5,DVI,DVIplus,EMBI,EVI,EVI2,ExG,ExGR,ExR,FCVI,GARI,GBNDVI,GCC,GDVI,GEMI,GLI,GM1,GM2,GNDVI,GOSAVI,GRNDVI,GRVI,GSAVI,GVMI,IAVI,IBI,IKAW,IPVI,IRECI,LSWI,MBI,MBWI,MCARI,MCARI1,MCARI2,MCARI705,MCARIOSAVI,MCARIOSAVI705,MGRVI,MIRBI,MLSWI26,MLSWI27,MNDVI,MNDWI,MNLI,MRBVI,MSAVI,MSI,MSK_CLDPRB,MSK_SNWPRB,MSR,MSR705,MTCI,MTVI1,MTVI2,MuWIR,NBAI,NBR,NBR2,NBRSWIR,NBRplus,NBSIMS,ND705,NDBI,NDCI,NDDI,NDGI,NDGlaI,NDII,NDMI,NDPI,NDPonI,NDREI,NDSI,NDSII,NDSInw,NDSWIR,NDSaII,NDSoI,NDTI,NDVI,NDVI705,NDVIMNDWI,NDWI,NDWIns,NDYI,NGRDI,NHFD,NIRv,NIRvH2,NLI,NMDI,NRFIg,NRFIr,NSDS,NSDSI1,NSDSI2,NSDSI3,NWI,NormG,NormNIR,NormR,OCVI,OSAVI,PISI,PSRI,QA10,QA20,QA60,RCC,RDVI,REDSI,RENDVI,RGBVI,RGRI,RI,RI4XS,RVI,S2REP,S2WI,S3,SARVI,SAVI,SAVI2,SCL,SEVI,SI,SIPI,SR,SR2,SR3,SR555,SR705,SWI,SWM,SeLI,TCARI,TCARIOSAVI,TCARIOSAVI705,TCI,TCI_B,TCI_G,TCI_R,TDVI,TGI,TRRVI,TSAVI,TTVI,TVI,TriVI,UI,VARI,VARI700,VI700,VIBI,VIG,VgNIRBI,VrNIRBI,WDRVI,WDVI,WI1,WI2,WI2015,WRI,WVP,kEVI,kIPVI,kNDVI,kRVI,kVARI,mND705,mSR705 +0,0.26943225086207778,0.48211149533716424,-0.44389444723930988,72,0.0010534007091380221,0.97105865090008925,0.51631639249902905,0.47677820318485459,78.812200977909228,-373.92546949836117,-2078.5023128308535,238.7171666246534,948.66361230148675,750.75646584320634,320.95785228132081,415.14734055961685,426.16661204940726,604.81486009578975,1007.6004411393997,1140.2466599445429,1217.7626543987888,1200.1272498109399,1389.4672800604985,3.5072204488225788e-06,920027.86398743314,37816.312262027102,0.30050958287127716,-0.059671588660927657,394.78713416466258,424.45881740635986,-0.30442345579874608,0.51631639249902905,0.4374344584576691,-0.43354595734335938,157.06756995210478,2.3112340008171439,1.340175349917053,2.1423045392563389,2.8456483851213057,-0.085148307135710144,1.0550827004559313,1.4438219526123757,2.803895489728379,3.1946387781183709,1.1761933676803378,1.3395970706837557,791.59604234938251,226.9885645745438,0.050994638805562605,1.743941661396929,0.95449692294748911,83.170216788505115,-55.699038316107867,138.86925510461299,830.33871943534223,0.9227079054818792,0.20600554301211593,0.36852642770765742,0.68304872491689739,-1153524.616189895,0.071366663952587894,3.1103712707487983,1.9151204983440946,0.46018717250073915,0.46011482665645193,0.18443184866239024,3.311234000817143,0.91947128574842973,0.21674045226910363,0.46618158773236168,-4.0146283327433583,0.048217298541348423,0.73842942877221029,1562.5776246662394,0.08700255276881895,0.15972637527331213,-2513.054663473657,488.59204239957592,1122.708237459037,0.5383215652526695,673.81421691447156,1191.1334022220044,1560.9454628264116,0.10019189215476869,-1787.3387421225084,-12.553569627755612,2.2319016692118128,0.21669113209337282,-0.39171055040871072,1.996920802177119,0.094000872562286883,0.5980686010466133,1.0550827004559313,0.27464078648853035,0,1.2115530237469703,0.49145126435452902,2.5024158586620504,1122.708237459037,0.5383215652526695,-0.63302925944805588,-0.15202191257403253,0.21669113209337282,0.15202191257403253,-0.15202481967778603,-0.46775095030721564,-210.38869893118772,0.26721022223910146,-0.08700255276881895,0.23050579165941762,11.166054271415947,0.26895663618591947,0.054304345082829178,0.08700255276881895,0.08700255276881895,0.11280309598025796,0.39171055040871072,0.29906681947544567,-0.39171055040871072,-0.46018717250073915,0.086963263215844078,0.08700255276881895,-0.4310297927862578,0.25687119280141807,-0.054304345082829178,0.47685885754442053,0.26721022223910146,0.86856940795313142,-0.46018717250073915,0.19689705512459352,0.10234423018688689,0.054304345082829178,0.33447070648365473,647.28649664437035,791.59604234938251,0.99846494308683265,0.68574767948891757,-0.25687119280141807,-0.3077922745505009,0.15202191257403253,0.25116167684017537,0.39093142793373709,0.15202191257403253,-0.78428776262929323,0.20744172480598427,0.59221592433119463,0.20034235086282057,2.8041847416762065,0.47677820318485459,-435.38320970884826,0.066727121890085062,0,0,0,0.33096398942106492,18.335453993885906,11.783690961068865,0.26721022223910146,0.14986164803806423,0.93782349146649691,-0.054304345082829178,3.1892940722254359e-05,3.8879543563689642,707.64822698393618,-0.082397962385902621,-0.1949281523878009,1.0316911949414875,0.9527110690885463,4.2488230275318033,3.3245021426770851,4.2519288508484445,,1.443614715202526,4.2488230275318033,3.311234000817143,0.011152876669053419,3.1103712707487983,1.9151204983440946,0.0041717085788021092,0.37102569534915125,0.3342916256221885,202.38718961742191,99.368588729384925,1255.7531218934221,244.00374067908237,33.158558104360964,42.684144189563895,43.699306780942756,0.89710233929316918,5265.6947945550783,0.27769583934993303,0.47685885754442053,4151.0622888832868,0.97864795088723777,47054.991681371306,-0.21669113209337282,0.1400077508172643,0.36283663021763068,0.23050579165941762,-472934.14218727651,0.054304345082829178,-0.46018717250073915,-0.47685885754442053,-0.46311721105114095,791.59604234938251,-0.25687119280141807,-0.35081001693711528,-108966.54196450702,0.39238655381190113,681.94626922107386,0.75469156437462803,0.63669781892061528,0.27339563784123116,2.04969719717336,0.051584561293778336,1.2758450173631892,0.52430481360148851 diff --git a/tests/test_Image/test_default_spectral_indices.yml b/tests/test_Image/test_default_spectral_indices.yml deleted file mode 100644 index f6e27a59..00000000 --- a/tests/test_Image/test_default_spectral_indices.yml +++ /dev/null @@ -1,217 +0,0 @@ -AFRI1600: 0.2694322508620778 -AFRI2100: 0.48211149533716424 -ANDWI: -0.4438944472393099 -AOT: 72 -ARI: 0.001053400709138022 -ARI2: 0.9710586509000892 -ARVI: 0.516316392499029 -ATSAVI: 0.4767782031848546 -AVI: 78.81220097790923 -AWEInsh: -373.92546949836117 -AWEIsh: -2078.5023128308535 -B1: 238.7171666246534 -B11: 948.6636123014868 -B12: 750.7564658432063 -B2: 320.9578522813208 -B3: 415.14734055961685 -B4: 426.16661204940726 -B5: 604.8148600957898 -B6: 1007.6004411393997 -B7: 1140.246659944543 -B8: 1217.7626543987888 -B8A: 1200.12724981094 -B9: 1389.4672800604985 -BAI: 3.507220448822579e-06 -BAIM: 920027.8639874331 -BAIS2: 37816.3122620271 -BCC: 0.30050958287127716 -BI: -0.05967158866092766 -BITM: 394.7871341646626 -BIXS: 424.45881740635986 -BLFEI: -0.3044234557987461 -BNDVI: 0.516316392499029 -BRBA: 0.4374344584576691 -BWDRVI: -0.4335459573433594 -BaI: 157.06756995210478 -CIG: 2.311234000817144 -CIRE: 1.340175349917053 -CSI: 2.142304539256339 -CVI: 2.8456483851213057 -DBSI: -0.08514830713571014 -DSI: 1.0550827004559313 -DSWI1: 1.4438219526123757 -DSWI2: 2.803895489728379 -DSWI3: 3.194638778118371 -DSWI4: 1.1761933676803378 -DSWI5: 1.3395970706837557 -DVI: 791.5960423493825 -DVIplus: 226.9885645745438 -EMBI: 0.050994638805562605 -EVI: 1.743941661396929 -EVI2: 0.9544969229474891 -ExG: 83.17021678850512 -ExGR: -55.69903831610787 -ExR: 138.869255104613 -FCVI: 830.3387194353422 -GARI: 0.9227079054818792 -GBNDVI: 0.20600554301211593 -GCC: 0.3685264277076574 -GDVI: 0.6830487249168974 -GEMI: -1153524.616189895 -GLI: 0.0713666639525879 -GM1: 3.1103712707487983 -GM2: 1.9151204983440946 -GNDVI: 0.46018717250073915 -GOSAVI: 0.4601148266564519 -GRNDVI: 0.18443184866239024 -GRVI: 3.311234000817143 -GSAVI: 0.9194712857484297 -GVMI: 0.21674045226910363 -IAVI: 0.4661815877323617 -IBI: -4.014628332743358 -IKAW: 0.04821729854134842 -IPVI: 0.7384294287722103 -IRECI: 1562.5776246662394 -LSWI: 0.08700255276881895 -MBI: 0.15972637527331213 -MBWI: -2513.054663473657 -MCARI: 488.5920423995759 -MCARI1: 1122.708237459037 -MCARI2: 0.5383215652526695 -MCARI705: 673.8142169144716 -MCARIOSAVI: 1191.1334022220044 -MCARIOSAVI705: 1560.9454628264116 -MGRVI: 0.10019189215476869 -MIRBI: -1787.3387421225084 -MLSWI26: -12.553569627755612 -MLSWI27: 2.2319016692118128 -MNDVI: 0.21669113209337282 -MNDWI: -0.3917105504087107 -MNLI: 1.996920802177119 -MRBVI: 0.09400087256228688 -MSAVI: 0.5980686010466133 -MSI: 1.0550827004559313 -MSK_CLDPRB: 0.27464078648853035 -MSK_SNWPRB: 0 -MSR: 1.2115530237469703 -MSR705: 0.491451264354529 -MTCI: 2.5024158586620504 -MTVI1: 1122.708237459037 -MTVI2: 0.5383215652526695 -MuWIR: -0.6330292594480559 -NBAI: -0.15202191257403253 -NBR: 0.21669113209337282 -NBR2: 0.15202191257403253 -NBRSWIR: -0.15202481967778603 -NBRplus: -0.46775095030721564 -NBSIMS: -210.38869893118772 -ND705: 0.26721022223910146 -NDBI: -0.08700255276881895 -NDCI: 0.23050579165941762 -NDDI: 11.166054271415947 -NDGI: 0.2689566361859195 -NDGlaI: 0.05430434508282918 -NDII: 0.08700255276881895 -NDMI: 0.08700255276881895 -NDPI: 0.11280309598025796 -NDPonI: 0.3917105504087107 -NDREI: 0.29906681947544567 -NDSI: -0.3917105504087107 -NDSII: -0.46018717250073915 -NDSInw: 0.08696326321584408 -NDSWIR: 0.08700255276881895 -NDSaII: -0.4310297927862578 -NDSoI: 0.25687119280141807 -NDTI: -0.05430434508282918 -NDVI: 0.47685885754442053 -NDVI705: 0.26721022223910146 -NDVIMNDWI: 0.8685694079531314 -NDWI: -0.46018717250073915 -NDWIns: 0.19689705512459352 -NDYI: 0.10234423018688689 -NGRDI: 0.05430434508282918 -NHFD: 0.33447070648365473 -NIRv: 647.2864966443703 -NIRvH2: 791.5960423493825 -NLI: 0.9984649430868326 -NMDI: 0.6857476794889176 -NRFIg: -0.25687119280141807 -NRFIr: -0.3077922745505009 -NSDS: 0.15202191257403253 -NSDSI1: 0.2511616768401754 -NSDSI2: 0.3909314279337371 -NSDSI3: 0.15202191257403253 -NWI: -0.7842877626292932 -NormG: 0.20744172480598427 -NormNIR: 0.5922159243311946 -NormR: 0.20034235086282057 -OCVI: 2.8041847416762065 -OSAVI: 0.4767782031848546 -PISI: -435.38320970884826 -PSRI: 0.06672712189008506 -QA10: 0 -QA20: 0 -QA60: 0 -RCC: 0.3309639894210649 -RDVI: 18.335453993885906 -REDSI: 11.783690961068865 -RENDVI: 0.26721022223910146 -RGBVI: 0.14986164803806423 -RGRI: 0.9378234914664969 -RI: -0.05430434508282918 -RI4XS: 3.189294072225436e-05 -RVI: 3.8879543563689642 -S2REP: 707.6482269839362 -S2WI: -0.08239796238590262 -S3: -0.1949281523878009 -SARVI: 1.0316911949414875 -SAVI: 0.9527110690885463 -SAVI2: 4.248823027531803 -SCL: 3.324502142677085 -SEVI: 4.2519288508484445 -SI: null -SIPI: 1.443614715202526 -SR: 4.248823027531803 -SR2: 3.311234000817143 -SR3: 0.01115287666905342 -SR555: 3.1103712707487983 -SR705: 1.9151204983440946 -SWI: 0.004171708578802109 -SWM: 0.37102569534915125 -SeLI: 0.3342916256221885 -TCARI: 202.3871896174219 -TCARIOSAVI: 99.36858872938492 -TCARIOSAVI705: 1255.753121893422 -TCI: 244.00374067908237 -TCI_B: 33.158558104360964 -TCI_G: 42.684144189563895 -TCI_R: 43.699306780942756 -TDVI: 0.8971023392931692 -TGI: 5265.694794555078 -TRRVI: 0.277695839349933 -TSAVI: 0.47685885754442053 -TTVI: 4151.062288883287 -TVI: 0.9786479508872378 -TriVI: 47054.991681371306 -UI: -0.21669113209337282 -VARI: 0.1400077508172643 -VARI700: 0.3628366302176307 -VI700: 0.23050579165941762 -VIBI: -472934.1421872765 -VIG: 0.05430434508282918 -VgNIRBI: -0.46018717250073915 -VrNIRBI: -0.47685885754442053 -WDRVI: -0.46311721105114095 -WDVI: 791.5960423493825 -WI1: -0.25687119280141807 -WI2: -0.3508100169371153 -WI2015: -108966.54196450702 -WRI: 0.39238655381190113 -WVP: 681.9462692210739 -kEVI: 0.754691564374628 -kIPVI: 0.6366978189206153 -kNDVI: 0.27339563784123116 -kRVI: 2.04969719717336 -kVARI: 0.051584561293778336 -mND705: 1.2758450173631892 -mSR705: 0.5243048136014885 diff --git a/tests/test_Image/test_deprecated_compute.csv b/tests/test_Image/test_deprecated_compute.csv new file mode 100644 index 00000000..346f1596 --- /dev/null +++ b/tests/test_Image/test_deprecated_compute.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,NDVI,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,72,238.7171666246534,948.66361230148675,750.75646584320634,320.95785228132081,415.14734055961685,426.16661204940726,604.81486009578975,1007.6004411393997,1140.2466599445429,1217.7626543987888,1200.1272498109399,1389.4672800604985,0.27464078648853035,0,0.47685885754442053,0,0,0,3.3245021426770851,33.158558104360964,42.684144189563895,43.699306780942756,681.94626922107386 diff --git a/tests/test_Image/test_deprecated_compute.yml b/tests/test_Image/test_deprecated_compute.yml deleted file mode 100644 index d780806c..00000000 --- a/tests/test_Image/test_deprecated_compute.yml +++ /dev/null @@ -1,24 +0,0 @@ -AOT: 72 -B1: 238.7171666246534 -B11: 948.6636123014868 -B12: 750.7564658432063 -B2: 320.9578522813208 -B3: 415.14734055961685 -B4: 426.16661204940726 -B5: 604.8148600957898 -B6: 1007.6004411393997 -B7: 1140.246659944543 -B8: 1217.7626543987888 -B8A: 1200.12724981094 -B9: 1389.4672800604985 -MSK_CLDPRB: 0.27464078648853035 -MSK_SNWPRB: 0 -NDVI: 0.47685885754442053 -QA10: 0 -QA20: 0 -QA60: 0 -SCL: 3.324502142677085 -TCI_B: 33.158558104360964 -TCI_G: 42.684144189563895 -TCI_R: 43.699306780942756 -WVP: 681.9462692210739 diff --git a/tests/test_Image/test_deprecated_doy_to_date.csv b/tests/test_Image/test_deprecated_doy_to_date.csv new file mode 100644 index 00000000..a14db8df --- /dev/null +++ b/tests/test_Image/test_deprecated_doy_to_date.csv @@ -0,0 +1,2 @@ +,doy1 +0,20230101 diff --git a/tests/test_Image/test_deprecated_doy_to_date.yml b/tests/test_Image/test_deprecated_doy_to_date.yml deleted file mode 100644 index 5cbf80d3..00000000 --- a/tests/test_Image/test_deprecated_doy_to_date.yml +++ /dev/null @@ -1 +0,0 @@ -doy1: 20230101 diff --git a/tests/test_Image/test_deprecated_empty.csv b/tests/test_Image/test_deprecated_empty.csv new file mode 100644 index 00000000..69e59a7f --- /dev/null +++ b/tests/test_Image/test_deprecated_empty.csv @@ -0,0 +1,2 @@ +,constant +0,0 diff --git a/tests/test_Image/test_deprecated_empty.yml b/tests/test_Image/test_deprecated_empty.yml deleted file mode 100644 index 8dff3675..00000000 --- a/tests/test_Image/test_deprecated_empty.yml +++ /dev/null @@ -1 +0,0 @@ -constant: 0 diff --git a/tests/test_Image/test_deprecated_empty_copy.csv b/tests/test_Image/test_deprecated_empty_copy.csv new file mode 100644 index 00000000..e8300b45 --- /dev/null +++ b/tests/test_Image/test_deprecated_empty_copy.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 diff --git a/tests/test_Image/test_deprecated_empty_copy.yml b/tests/test_Image/test_deprecated_empty_copy.yml deleted file mode 100644 index 6aa781cc..00000000 --- a/tests/test_Image/test_deprecated_empty_copy.yml +++ /dev/null @@ -1,23 +0,0 @@ -AOT: 0 -B1: 0 -B11: 0 -B12: 0 -B2: 0 -B3: 0 -B4: 0 -B5: 0 -B6: 0 -B7: 0 -B8: 0 -B8A: 0 -B9: 0 -MSK_CLDPRB: 0 -MSK_SNWPRB: 0 -QA10: 0 -QA20: 0 -QA60: 0 -SCL: 0 -TCI_B: 0 -TCI_G: 0 -TCI_R: 0 -WVP: 0 diff --git a/tests/test_Image/test_deprecated_evi.csv b/tests/test_Image/test_deprecated_evi.csv new file mode 100644 index 00000000..79756c9e --- /dev/null +++ b/tests/test_Image/test_deprecated_evi.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,EVI,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,72,238.7171666246534,948.66361230148675,750.75646584320634,320.95785228132081,415.14734055961685,426.16661204940726,604.81486009578975,1007.6004411393997,1140.2466599445429,1217.7626543987888,1200.1272498109399,1389.4672800604985,1.743941661396929,0.27464078648853035,0,0,0,0,3.3245021426770851,33.158558104360964,42.684144189563895,43.699306780942756,681.94626922107386 diff --git a/tests/test_Image/test_deprecated_evi.yml b/tests/test_Image/test_deprecated_evi.yml deleted file mode 100644 index 4aa90e60..00000000 --- a/tests/test_Image/test_deprecated_evi.yml +++ /dev/null @@ -1,24 +0,0 @@ -AOT: 72 -B1: 238.7171666246534 -B11: 948.6636123014868 -B12: 750.7564658432063 -B2: 320.9578522813208 -B3: 415.14734055961685 -B4: 426.16661204940726 -B5: 604.8148600957898 -B6: 1007.6004411393997 -B7: 1140.246659944543 -B8: 1217.7626543987888 -B8A: 1200.12724981094 -B9: 1389.4672800604985 -EVI: 1.743941661396929 -MSK_CLDPRB: 0.27464078648853035 -MSK_SNWPRB: 0 -QA10: 0 -QA20: 0 -QA60: 0 -SCL: 3.324502142677085 -TCI_B: 33.158558104360964 -TCI_G: 42.684144189563895 -TCI_R: 43.699306780942756 -WVP: 681.9462692210739 diff --git a/tests/test_Image/test_deprecated_get_value.csv b/tests/test_Image/test_deprecated_get_value.csv new file mode 100644 index 00000000..add48087 --- /dev/null +++ b/tests/test_Image/test_deprecated_get_value.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,72,159,1341,1105,487,641,714,861,1356,1538,1622,1617,1298,0,0,0,0,0,4,50,66,73,789 diff --git a/tests/test_Image/test_deprecated_get_value.yml b/tests/test_Image/test_deprecated_get_value.yml deleted file mode 100644 index c825a363..00000000 --- a/tests/test_Image/test_deprecated_get_value.yml +++ /dev/null @@ -1,23 +0,0 @@ -AOT: 72 -B1: 159 -B11: 1341 -B12: 1105 -B2: 487 -B3: 641 -B4: 714 -B5: 861 -B6: 1356 -B7: 1538 -B8: 1622 -B8A: 1617 -B9: 1298 -MSK_CLDPRB: 0 -MSK_SNWPRB: 0 -QA10: 0 -QA20: 0 -QA60: 0 -SCL: 4 -TCI_B: 50 -TCI_G: 66 -TCI_R: 73 -WVP: 789 diff --git a/tests/test_Image/test_deprecated_linear_function.csv b/tests/test_Image/test_deprecated_linear_function.csv new file mode 100644 index 00000000..cee4353d --- /dev/null +++ b/tests/test_Image/test_deprecated_linear_function.csv @@ -0,0 +1,2 @@ +,B4 +0,5.8399999999999999 diff --git a/tests/test_Image/test_deprecated_linear_function.yml b/tests/test_Image/test_deprecated_linear_function.yml deleted file mode 100644 index cda47b1b..00000000 --- a/tests/test_Image/test_deprecated_linear_function.yml +++ /dev/null @@ -1 +0,0 @@ -B4: 5.84 diff --git a/tests/test_Image/test_deprecated_make_date_band.csv b/tests/test_Image/test_deprecated_make_date_band.csv new file mode 100644 index 00000000..bb0737e1 --- /dev/null +++ b/tests/test_Image/test_deprecated_make_date_band.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP,date +0,72,214,1175,958,188,366,285,910,1232,1328,1216,1431,2104,2,0,0,0,0,5,21,38,29,588,1577873347042 diff --git a/tests/test_Image/test_deprecated_make_date_band.yml b/tests/test_Image/test_deprecated_make_date_band.yml deleted file mode 100644 index 1cfa6536..00000000 --- a/tests/test_Image/test_deprecated_make_date_band.yml +++ /dev/null @@ -1,24 +0,0 @@ -AOT: 72 -B1: 214 -B11: 1175 -B12: 958 -B2: 188 -B3: 366 -B4: 285 -B5: 910 -B6: 1232 -B7: 1328 -B8: 1216 -B8A: 1431 -B9: 2104 -MSK_CLDPRB: 2 -MSK_SNWPRB: 0 -QA10: 0 -QA20: 0 -QA60: 0 -SCL: 5 -TCI_B: 21 -TCI_G: 38 -TCI_R: 29 -WVP: 588 -date: 1577873347042 diff --git a/tests/test_Image/test_deprecated_nbr.csv b/tests/test_Image/test_deprecated_nbr.csv new file mode 100644 index 00000000..11e59518 --- /dev/null +++ b/tests/test_Image/test_deprecated_nbr.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,NBR,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,72,238.7171666246534,948.66361230148675,750.75646584320634,320.95785228132081,415.14734055961685,426.16661204940726,604.81486009578975,1007.6004411393997,1140.2466599445429,1217.7626543987888,1200.1272498109399,1389.4672800604985,0.27464078648853035,0,0.21669113209337282,0,0,0,3.3245021426770851,33.158558104360964,42.684144189563895,43.699306780942756,681.94626922107386 diff --git a/tests/test_Image/test_deprecated_nbr.yml b/tests/test_Image/test_deprecated_nbr.yml deleted file mode 100644 index 4e63195e..00000000 --- a/tests/test_Image/test_deprecated_nbr.yml +++ /dev/null @@ -1,24 +0,0 @@ -AOT: 72 -B1: 238.7171666246534 -B11: 948.6636123014868 -B12: 750.7564658432063 -B2: 320.9578522813208 -B3: 415.14734055961685 -B4: 426.16661204940726 -B5: 604.8148600957898 -B6: 1007.6004411393997 -B7: 1140.246659944543 -B8: 1217.7626543987888 -B8A: 1200.12724981094 -B9: 1389.4672800604985 -MSK_CLDPRB: 0.27464078648853035 -MSK_SNWPRB: 0 -NBR: 0.21669113209337282 -QA10: 0 -QA20: 0 -QA60: 0 -SCL: 3.324502142677085 -TCI_B: 33.158558104360964 -TCI_G: 42.684144189563895 -TCI_R: 43.699306780942756 -WVP: 681.9462692210739 diff --git a/tests/test_Image/test_deprecated_nbr2.csv b/tests/test_Image/test_deprecated_nbr2.csv new file mode 100644 index 00000000..0e6fb3fa --- /dev/null +++ b/tests/test_Image/test_deprecated_nbr2.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,NBR2,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,72,238.7171666246534,948.66361230148675,750.75646584320634,320.95785228132081,415.14734055961685,426.16661204940726,604.81486009578975,1007.6004411393997,1140.2466599445429,1217.7626543987888,1200.1272498109399,1389.4672800604985,0.27464078648853035,0,0.15202191257403253,0,0,0,3.3245021426770851,33.158558104360964,42.684144189563895,43.699306780942756,681.94626922107386 diff --git a/tests/test_Image/test_deprecated_nbr2.yml b/tests/test_Image/test_deprecated_nbr2.yml deleted file mode 100644 index 004769d6..00000000 --- a/tests/test_Image/test_deprecated_nbr2.yml +++ /dev/null @@ -1,24 +0,0 @@ -AOT: 72 -B1: 238.7171666246534 -B11: 948.6636123014868 -B12: 750.7564658432063 -B2: 320.9578522813208 -B3: 415.14734055961685 -B4: 426.16661204940726 -B5: 604.8148600957898 -B6: 1007.6004411393997 -B7: 1140.246659944543 -B8: 1217.7626543987888 -B8A: 1200.12724981094 -B9: 1389.4672800604985 -MSK_CLDPRB: 0.27464078648853035 -MSK_SNWPRB: 0 -NBR2: 0.15202191257403253 -QA10: 0 -QA20: 0 -QA60: 0 -SCL: 3.324502142677085 -TCI_B: 33.158558104360964 -TCI_G: 42.684144189563895 -TCI_R: 43.699306780942756 -WVP: 681.9462692210739 diff --git a/tests/test_Image/test_deprecated_ndfi.csv b/tests/test_Image/test_deprecated_ndfi.csv new file mode 100644 index 00000000..363785b9 --- /dev/null +++ b/tests/test_Image/test_deprecated_ndfi.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,72,238.7171666246534,948.66361230148675,750.75646584320634,320.95785228132081,415.14734055961685,426.16661204940726,604.81486009578975,1007.6004411393997,1140.2466599445429,1217.7626543987888,1200.1272498109399,1389.4672800604985,0.27464078648853035,0,0,0,0,3.3245021426770851,33.158558104360964,42.684144189563895,43.699306780942756,681.94626922107386 diff --git a/tests/test_Image/test_deprecated_ndfi.yml b/tests/test_Image/test_deprecated_ndfi.yml deleted file mode 100644 index 501c5fd9..00000000 --- a/tests/test_Image/test_deprecated_ndfi.yml +++ /dev/null @@ -1,23 +0,0 @@ -AOT: 72 -B1: 238.7171666246534 -B11: 948.6636123014868 -B12: 750.7564658432063 -B2: 320.9578522813208 -B3: 415.14734055961685 -B4: 426.16661204940726 -B5: 604.8148600957898 -B6: 1007.6004411393997 -B7: 1140.246659944543 -B8: 1217.7626543987888 -B8A: 1200.12724981094 -B9: 1389.4672800604985 -MSK_CLDPRB: 0.27464078648853035 -MSK_SNWPRB: 0 -QA10: 0 -QA20: 0 -QA60: 0 -SCL: 3.324502142677085 -TCI_B: 33.158558104360964 -TCI_G: 42.684144189563895 -TCI_R: 43.699306780942756 -WVP: 681.9462692210739 diff --git a/tests/test_Image/test_deprecated_ndvi.csv b/tests/test_Image/test_deprecated_ndvi.csv new file mode 100644 index 00000000..346f1596 --- /dev/null +++ b/tests/test_Image/test_deprecated_ndvi.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,NDVI,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,72,238.7171666246534,948.66361230148675,750.75646584320634,320.95785228132081,415.14734055961685,426.16661204940726,604.81486009578975,1007.6004411393997,1140.2466599445429,1217.7626543987888,1200.1272498109399,1389.4672800604985,0.27464078648853035,0,0.47685885754442053,0,0,0,3.3245021426770851,33.158558104360964,42.684144189563895,43.699306780942756,681.94626922107386 diff --git a/tests/test_Image/test_deprecated_ndvi.yml b/tests/test_Image/test_deprecated_ndvi.yml deleted file mode 100644 index d780806c..00000000 --- a/tests/test_Image/test_deprecated_ndvi.yml +++ /dev/null @@ -1,24 +0,0 @@ -AOT: 72 -B1: 238.7171666246534 -B11: 948.6636123014868 -B12: 750.7564658432063 -B2: 320.9578522813208 -B3: 415.14734055961685 -B4: 426.16661204940726 -B5: 604.8148600957898 -B6: 1007.6004411393997 -B7: 1140.246659944543 -B8: 1217.7626543987888 -B8A: 1200.12724981094 -B9: 1389.4672800604985 -MSK_CLDPRB: 0.27464078648853035 -MSK_SNWPRB: 0 -NDVI: 0.47685885754442053 -QA10: 0 -QA20: 0 -QA60: 0 -SCL: 3.324502142677085 -TCI_B: 33.158558104360964 -TCI_G: 42.684144189563895 -TCI_R: 43.699306780942756 -WVP: 681.9462692210739 diff --git a/tests/test_Image/test_deprecated_parametrize.csv b/tests/test_Image/test_deprecated_parametrize.csv new file mode 100644 index 00000000..24364761 --- /dev/null +++ b/tests/test_Image/test_deprecated_parametrize.csv @@ -0,0 +1,2 @@ +,B2,B4 +0,4.5200000000000005,5.8399999999999999 diff --git a/tests/test_Image/test_deprecated_parametrize.yml b/tests/test_Image/test_deprecated_parametrize.yml deleted file mode 100644 index cf8a739c..00000000 --- a/tests/test_Image/test_deprecated_parametrize.yml +++ /dev/null @@ -1,2 +0,0 @@ -B2: 4.5200000000000005 -B4: 5.84 diff --git a/tests/test_Image/test_deprecated_sum_bands.csv b/tests/test_Image/test_deprecated_sum_bands.csv new file mode 100644 index 00000000..2789621d --- /dev/null +++ b/tests/test_Image/test_deprecated_sum_bands.csv @@ -0,0 +1,2 @@ +,sum +0,559.67501890597396 diff --git a/tests/test_Image/test_deprecated_sum_bands.yml b/tests/test_Image/test_deprecated_sum_bands.yml deleted file mode 100644 index 1b3784f2..00000000 --- a/tests/test_Image/test_deprecated_sum_bands.yml +++ /dev/null @@ -1 +0,0 @@ -sum: 559.675018905974 diff --git a/tests/test_Image/test_deprecated_tasseled_cap.csv b/tests/test_Image/test_deprecated_tasseled_cap.csv new file mode 100644 index 00000000..cf5e6196 --- /dev/null +++ b/tests/test_Image/test_deprecated_tasseled_cap.csv @@ -0,0 +1,2 @@ +,B1,B2,B3,B4,B5,B6,B7,BQA +0,80.646786099516518,36.996091045013017,39.201923038041691,41.476289750435498,60.247799617469894,134.14712134415299,37.873670520610993,672 diff --git a/tests/test_Image/test_deprecated_tasseled_cap.yml b/tests/test_Image/test_deprecated_tasseled_cap.yml deleted file mode 100644 index 0ec9ae40..00000000 --- a/tests/test_Image/test_deprecated_tasseled_cap.yml +++ /dev/null @@ -1,8 +0,0 @@ -B1: 80.64678609951652 -B2: 36.99609104501302 -B3: 39.20192303804169 -B4: 41.4762897504355 -B5: 60.247799617469894 -B6: 134.147121344153 -B7: 37.87367052061099 -BQA: 672 diff --git a/tests/test_Image/test_doy_to_date.csv b/tests/test_Image/test_doy_to_date.csv new file mode 100644 index 00000000..a14db8df --- /dev/null +++ b/tests/test_Image/test_doy_to_date.csv @@ -0,0 +1,2 @@ +,doy1 +0,20230101 diff --git a/tests/test_Image/test_doy_to_date.yml b/tests/test_Image/test_doy_to_date.yml deleted file mode 100644 index 5cbf80d3..00000000 --- a/tests/test_Image/test_doy_to_date.yml +++ /dev/null @@ -1 +0,0 @@ -doy1: 20230101 diff --git a/tests/test_Image/test_doy_to_date_with_band.csv b/tests/test_Image/test_doy_to_date_with_band.csv new file mode 100644 index 00000000..bd3ec55f --- /dev/null +++ b/tests/test_Image/test_doy_to_date_with_band.csv @@ -0,0 +1,2 @@ +,doy2 +0,20230101 diff --git a/tests/test_Image/test_doy_to_date_with_band.yml b/tests/test_Image/test_doy_to_date_with_band.yml deleted file mode 100644 index 5c88a867..00000000 --- a/tests/test_Image/test_doy_to_date_with_band.yml +++ /dev/null @@ -1 +0,0 @@ -doy2: 20230101 diff --git a/tests/test_Image/test_doy_to_date_with_format.csv b/tests/test_Image/test_doy_to_date_with_format.csv new file mode 100644 index 00000000..150d4f03 --- /dev/null +++ b/tests/test_Image/test_doy_to_date_with_format.csv @@ -0,0 +1,2 @@ +,doy1 +0,2023.001 diff --git a/tests/test_Image/test_doy_to_date_with_format.yml b/tests/test_Image/test_doy_to_date_with_format.yml deleted file mode 100644 index 5fe3a064..00000000 --- a/tests/test_Image/test_doy_to_date_with_format.yml +++ /dev/null @@ -1 +0,0 @@ -doy1: 2023.001 diff --git a/tests/test_Image/test_full.csv b/tests/test_Image/test_full.csv new file mode 100644 index 00000000..69e59a7f --- /dev/null +++ b/tests/test_Image/test_full.csv @@ -0,0 +1,2 @@ +,constant +0,0 diff --git a/tests/test_Image/test_full.yml b/tests/test_Image/test_full.yml deleted file mode 100644 index 8dff3675..00000000 --- a/tests/test_Image/test_full.yml +++ /dev/null @@ -1 +0,0 @@ -constant: 0 diff --git a/tests/test_Image/test_full_like.csv b/tests/test_Image/test_full_like.csv new file mode 100644 index 00000000..e8300b45 --- /dev/null +++ b/tests/test_Image/test_full_like.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 diff --git a/tests/test_Image/test_full_like.yml b/tests/test_Image/test_full_like.yml deleted file mode 100644 index 6aa781cc..00000000 --- a/tests/test_Image/test_full_like.yml +++ /dev/null @@ -1,23 +0,0 @@ -AOT: 0 -B1: 0 -B11: 0 -B12: 0 -B2: 0 -B3: 0 -B4: 0 -B5: 0 -B6: 0 -B7: 0 -B8: 0 -B8A: 0 -B9: 0 -MSK_CLDPRB: 0 -MSK_SNWPRB: 0 -QA10: 0 -QA20: 0 -QA60: 0 -SCL: 0 -TCI_B: 0 -TCI_G: 0 -TCI_R: 0 -WVP: 0 diff --git a/tests/test_Image/test_full_like_with_mask.csv b/tests/test_Image/test_full_like_with_mask.csv new file mode 100644 index 00000000..27b115a9 --- /dev/null +++ b/tests/test_Image/test_full_like_with_mask.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,,,,,,,,,,,,,,,,,,,,,,, diff --git a/tests/test_Image/test_full_like_with_mask.yml b/tests/test_Image/test_full_like_with_mask.yml deleted file mode 100644 index 06608d47..00000000 --- a/tests/test_Image/test_full_like_with_mask.yml +++ /dev/null @@ -1,23 +0,0 @@ -AOT: null -B1: null -B11: null -B12: null -B2: null -B3: null -B4: null -B5: null -B6: null -B7: null -B8: null -B8A: null -B9: null -MSK_CLDPRB: null -MSK_SNWPRB: null -QA10: null -QA20: null -QA60: null -SCL: null -TCI_B: null -TCI_G: null -TCI_R: null -WVP: null diff --git a/tests/test_Image/test_full_with_lists.csv b/tests/test_Image/test_full_with_lists.csv new file mode 100644 index 00000000..db6d556e --- /dev/null +++ b/tests/test_Image/test_full_with_lists.csv @@ -0,0 +1,2 @@ +,tata,titi,toto +0,3,2,1 diff --git a/tests/test_Image/test_full_with_lists.yml b/tests/test_Image/test_full_with_lists.yml deleted file mode 100644 index 2e71d970..00000000 --- a/tests/test_Image/test_full_with_lists.yml +++ /dev/null @@ -1,3 +0,0 @@ -tata: 3 -titi: 2 -toto: 1 diff --git a/tests/test_Image/test_full_with_name.csv b/tests/test_Image/test_full_with_name.csv new file mode 100644 index 00000000..f39e2049 --- /dev/null +++ b/tests/test_Image/test_full_with_name.csv @@ -0,0 +1,2 @@ +,toto +0,1 diff --git a/tests/test_Image/test_full_with_name.yml b/tests/test_Image/test_full_with_name.yml deleted file mode 100644 index bdbd85f4..00000000 --- a/tests/test_Image/test_full_with_name.yml +++ /dev/null @@ -1 +0,0 @@ -toto: 1 diff --git a/tests/test_Image/test_full_with_value.csv b/tests/test_Image/test_full_with_value.csv new file mode 100644 index 00000000..03fb3c1f --- /dev/null +++ b/tests/test_Image/test_full_with_value.csv @@ -0,0 +1,2 @@ +,constant +0,1 diff --git a/tests/test_Image/test_full_with_value.yml b/tests/test_Image/test_full_with_value.yml deleted file mode 100644 index 461ce28f..00000000 --- a/tests/test_Image/test_full_with_value.yml +++ /dev/null @@ -1 +0,0 @@ -constant: 1 diff --git a/tests/test_Image/test_get_values.csv b/tests/test_Image/test_get_values.csv new file mode 100644 index 00000000..add48087 --- /dev/null +++ b/tests/test_Image/test_get_values.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,72,159,1341,1105,487,641,714,861,1356,1538,1622,1617,1298,0,0,0,0,0,4,50,66,73,789 diff --git a/tests/test_Image/test_get_values.yml b/tests/test_Image/test_get_values.yml deleted file mode 100644 index c825a363..00000000 --- a/tests/test_Image/test_get_values.yml +++ /dev/null @@ -1,23 +0,0 @@ -AOT: 72 -B1: 159 -B11: 1341 -B12: 1105 -B2: 487 -B3: 641 -B4: 714 -B5: 861 -B6: 1356 -B7: 1538 -B8: 1622 -B8A: 1617 -B9: 1298 -MSK_CLDPRB: 0 -MSK_SNWPRB: 0 -QA10: 0 -QA20: 0 -QA60: 0 -SCL: 4 -TCI_B: 50 -TCI_G: 66 -TCI_R: 73 -WVP: 789 diff --git a/tests/test_Image/test_get_values_with_scale.csv b/tests/test_Image/test_get_values_with_scale.csv new file mode 100644 index 00000000..fcef32a6 --- /dev/null +++ b/tests/test_Image/test_get_values_with_scale.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,72,117,553,332,161,247,175,384,952,1071,1168,1145,1523,0,0,0,0,0,4,18,26,19,693 diff --git a/tests/test_Image/test_get_values_with_scale.yml b/tests/test_Image/test_get_values_with_scale.yml deleted file mode 100644 index 2df2ea81..00000000 --- a/tests/test_Image/test_get_values_with_scale.yml +++ /dev/null @@ -1,23 +0,0 @@ -AOT: 72 -B1: 117 -B11: 553 -B12: 332 -B2: 161 -B3: 247 -B4: 175 -B5: 384 -B6: 952 -B7: 1071 -B8: 1168 -B8A: 1145 -B9: 1523 -MSK_CLDPRB: 0 -MSK_SNWPRB: 0 -QA10: 0 -QA20: 0 -QA60: 0 -SCL: 4 -TCI_B: 18 -TCI_G: 26 -TCI_R: 19 -WVP: 693 diff --git a/tests/test_Image/test_histogram_match.csv b/tests/test_Image/test_histogram_match.csv new file mode 100644 index 00000000..81755659 --- /dev/null +++ b/tests/test_Image/test_histogram_match.csv @@ -0,0 +1,2 @@ +,B,G,R +0,7500.2627678346307,8388.3192336778411,8269.7086967481646 diff --git a/tests/test_Image/test_histogram_match.yml b/tests/test_Image/test_histogram_match.yml deleted file mode 100644 index 858cff67..00000000 --- a/tests/test_Image/test_histogram_match.yml +++ /dev/null @@ -1,3 +0,0 @@ -B: 7500.262767834631 -G: 8388.319233677841 -R: 8269.708696748165 diff --git a/tests/test_Image/test_interpolate_bands.csv b/tests/test_Image/test_interpolate_bands.csv new file mode 100644 index 00000000..24364761 --- /dev/null +++ b/tests/test_Image/test_interpolate_bands.csv @@ -0,0 +1,2 @@ +,B2,B4 +0,4.5200000000000005,5.8399999999999999 diff --git a/tests/test_Image/test_interpolate_bands.yml b/tests/test_Image/test_interpolate_bands.yml deleted file mode 100644 index cf8a739c..00000000 --- a/tests/test_Image/test_interpolate_bands.yml +++ /dev/null @@ -1,2 +0,0 @@ -B2: 4.5200000000000005 -B4: 5.84 diff --git a/tests/test_Image/test_mask_S2_clouds.csv b/tests/test_Image/test_mask_S2_clouds.csv new file mode 100644 index 00000000..2293e10e --- /dev/null +++ b/tests/test_Image/test_mask_S2_clouds.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,CLOUD_MASK,CLOUD_SHADOW_MASK,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,SHADOW_MASK,TCI_B,TCI_G,TCI_R,WVP +0,72,238.7171666246534,948.66361230148675,750.75646584320634,320.95785228132081,415.14734055961685,426.16661204940726,604.81486009578975,1007.6004411393997,1140.2466599445429,1217.7626543987888,1200.1272498109399,1389.4672800604985,0.016070078144693717,0,0.27464078648853035,0,0,0,0,3.3245021426770851,0.11822535921351142,33.158558104360964,42.684144189563895,43.699306780942756,681.94626922107386 diff --git a/tests/test_Image/test_mask_S2_clouds.yml b/tests/test_Image/test_mask_S2_clouds.yml deleted file mode 100644 index 14d41cf8..00000000 --- a/tests/test_Image/test_mask_S2_clouds.yml +++ /dev/null @@ -1,26 +0,0 @@ -AOT: 72 -B1: 238.7171666246534 -B11: 948.6636123014868 -B12: 750.7564658432063 -B2: 320.9578522813208 -B3: 415.14734055961685 -B4: 426.16661204940726 -B5: 604.8148600957898 -B6: 1007.6004411393997 -B7: 1140.246659944543 -B8: 1217.7626543987888 -B8A: 1200.12724981094 -B9: 1389.4672800604985 -CLOUD_MASK: 0.016070078144693717 -CLOUD_SHADOW_MASK: 0 -MSK_CLDPRB: 0.27464078648853035 -MSK_SNWPRB: 0 -QA10: 0 -QA20: 0 -QA60: 0 -SCL: 3.324502142677085 -SHADOW_MASK: 0.11822535921351142 -TCI_B: 33.158558104360964 -TCI_G: 42.684144189563895 -TCI_R: 43.699306780942756 -WVP: 681.9462692210739 diff --git a/tests/test_Image/test_negative_clip.csv b/tests/test_Image/test_negative_clip.csv new file mode 100644 index 00000000..27b115a9 --- /dev/null +++ b/tests/test_Image/test_negative_clip.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,,,,,,,,,,,,,,,,,,,,,,, diff --git a/tests/test_Image/test_negative_clip.yml b/tests/test_Image/test_negative_clip.yml deleted file mode 100644 index 06608d47..00000000 --- a/tests/test_Image/test_negative_clip.yml +++ /dev/null @@ -1,23 +0,0 @@ -AOT: null -B1: null -B11: null -B12: null -B2: null -B3: null -B4: null -B5: null -B6: null -B7: null -B8: null -B8A: null -B9: null -MSK_CLDPRB: null -MSK_SNWPRB: null -QA10: null -QA20: null -QA60: null -SCL: null -TCI_B: null -TCI_G: null -TCI_R: null -WVP: null diff --git a/tests/test_Image/test_pan_sharpen.csv b/tests/test_Image/test_pan_sharpen.csv new file mode 100644 index 00000000..1bd07545 --- /dev/null +++ b/tests/test_Image/test_pan_sharpen.csv @@ -0,0 +1,2 @@ +,B2,B3,B4,B5,B6,B7 +0,0.074917420895752956,0.062279983815516041,0.035777563662935274,0.27570176610947872,0.085119200009892163,0.030933266714784642 diff --git a/tests/test_Image/test_pan_sharpen.yml b/tests/test_Image/test_pan_sharpen.yml deleted file mode 100644 index 9fd4ee33..00000000 --- a/tests/test_Image/test_pan_sharpen.yml +++ /dev/null @@ -1,6 +0,0 @@ -B2: 0.07491742089575296 -B3: 0.06227998381551604 -B4: 0.035777563662935274 -B5: 0.2757017661094787 -B6: 0.08511920000989216 -B7: 0.030933266714784642 diff --git a/tests/test_Image/test_preprocess.csv b/tests/test_Image/test_preprocess.csv new file mode 100644 index 00000000..35cfaba2 --- /dev/null +++ b/tests/test_Image/test_preprocess.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,0.072000000000000008,0.023871716662465316,0.094866361230148563,0.075075646584320546,0.032095785228132098,0.041514734055961663,0.042616661204940731,0.06048148600957913,0.10076004411394013,0.11402466599445431,0.12177626543987899,0.1200127249810941,0.13894672800604949,0.27464078648853035,0,0,0,0,3.3245021426770851,33.158558104360964,42.684144189563895,43.699306780942756,0.68194626922107227 diff --git a/tests/test_Image/test_preprocess.yml b/tests/test_Image/test_preprocess.yml deleted file mode 100644 index 5c5f1919..00000000 --- a/tests/test_Image/test_preprocess.yml +++ /dev/null @@ -1,23 +0,0 @@ -AOT: 0.07200000000000001 -B1: 0.023871716662465316 -B11: 0.09486636123014856 -B12: 0.07507564658432055 -B2: 0.0320957852281321 -B3: 0.04151473405596166 -B4: 0.04261666120494073 -B5: 0.06048148600957913 -B6: 0.10076004411394013 -B7: 0.11402466599445431 -B8: 0.12177626543987899 -B8A: 0.1200127249810941 -B9: 0.13894672800604949 -MSK_CLDPRB: 0.27464078648853035 -MSK_SNWPRB: 0 -QA10: 0 -QA20: 0 -QA60: 0 -SCL: 3.324502142677085 -TCI_B: 33.158558104360964 -TCI_G: 42.684144189563895 -TCI_R: 43.699306780942756 -WVP: 0.6819462692210723 diff --git a/tests/test_Image/test_reduce_bands.csv b/tests/test_Image/test_reduce_bands.csv new file mode 100644 index 00000000..0930ec29 --- /dev/null +++ b/tests/test_Image/test_reduce_bands.csv @@ -0,0 +1,2 @@ +,sum +0,10537.515616334762 diff --git a/tests/test_Image/test_reduce_bands.yml b/tests/test_Image/test_reduce_bands.yml deleted file mode 100644 index 17c97f09..00000000 --- a/tests/test_Image/test_reduce_bands.yml +++ /dev/null @@ -1 +0,0 @@ -sum: 10537.515616334762 diff --git a/tests/test_Image/test_reduce_bands_with_bands.csv b/tests/test_Image/test_reduce_bands_with_bands.csv new file mode 100644 index 00000000..2789621d --- /dev/null +++ b/tests/test_Image/test_reduce_bands_with_bands.csv @@ -0,0 +1,2 @@ +,sum +0,559.67501890597396 diff --git a/tests/test_Image/test_reduce_bands_with_bands.yml b/tests/test_Image/test_reduce_bands_with_bands.yml deleted file mode 100644 index 1b3784f2..00000000 --- a/tests/test_Image/test_reduce_bands_with_bands.yml +++ /dev/null @@ -1 +0,0 @@ -sum: 559.675018905974 diff --git a/tests/test_Image/test_reduce_bands_with_name.csv b/tests/test_Image/test_reduce_bands_with_name.csv new file mode 100644 index 00000000..e6ddb0f9 --- /dev/null +++ b/tests/test_Image/test_reduce_bands_with_name.csv @@ -0,0 +1,2 @@ +,toto +0,10537.515616334762 diff --git a/tests/test_Image/test_reduce_bands_with_name.yml b/tests/test_Image/test_reduce_bands_with_name.yml deleted file mode 100644 index b967c8d3..00000000 --- a/tests/test_Image/test_reduce_bands_with_name.yml +++ /dev/null @@ -1 +0,0 @@ -toto: 10537.515616334762 diff --git a/tests/test_Image/test_scale_and_offset.csv b/tests/test_Image/test_scale_and_offset.csv new file mode 100644 index 00000000..35cfaba2 --- /dev/null +++ b/tests/test_Image/test_scale_and_offset.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,0.072000000000000008,0.023871716662465316,0.094866361230148563,0.075075646584320546,0.032095785228132098,0.041514734055961663,0.042616661204940731,0.06048148600957913,0.10076004411394013,0.11402466599445431,0.12177626543987899,0.1200127249810941,0.13894672800604949,0.27464078648853035,0,0,0,0,3.3245021426770851,33.158558104360964,42.684144189563895,43.699306780942756,0.68194626922107227 diff --git a/tests/test_Image/test_scale_and_offset.yml b/tests/test_Image/test_scale_and_offset.yml deleted file mode 100644 index 5c5f1919..00000000 --- a/tests/test_Image/test_scale_and_offset.yml +++ /dev/null @@ -1,23 +0,0 @@ -AOT: 0.07200000000000001 -B1: 0.023871716662465316 -B11: 0.09486636123014856 -B12: 0.07507564658432055 -B2: 0.0320957852281321 -B3: 0.04151473405596166 -B4: 0.04261666120494073 -B5: 0.06048148600957913 -B6: 0.10076004411394013 -B7: 0.11402466599445431 -B8: 0.12177626543987899 -B8A: 0.1200127249810941 -B9: 0.13894672800604949 -MSK_CLDPRB: 0.27464078648853035 -MSK_SNWPRB: 0 -QA10: 0 -QA20: 0 -QA60: 0 -SCL: 3.324502142677085 -TCI_B: 33.158558104360964 -TCI_G: 42.684144189563895 -TCI_R: 43.699306780942756 -WVP: 0.6819462692210723 diff --git a/tests/test_Image/test_tasseled_cap.csv b/tests/test_Image/test_tasseled_cap.csv new file mode 100644 index 00000000..b41df708 --- /dev/null +++ b/tests/test_Image/test_tasseled_cap.csv @@ -0,0 +1,2 @@ +,B1,B2,B3,B4,B5,B7,TCB,TCG,TCW +0,80.646786099516518,36.996091045013017,39.201923038041691,41.476289750435498,60.247799617469894,37.873670520610993,107.81693958004151,-23.51120101153365,-7.983038306874465 diff --git a/tests/test_Image/test_tasseled_cap.yml b/tests/test_Image/test_tasseled_cap.yml deleted file mode 100644 index bc4072a8..00000000 --- a/tests/test_Image/test_tasseled_cap.yml +++ /dev/null @@ -1,9 +0,0 @@ -B1: 80.64678609951652 -B2: 36.99609104501302 -B3: 39.20192303804169 -B4: 41.4762897504355 -B5: 60.247799617469894 -B7: 37.87367052061099 -TCB: 107.8169395800415 -TCG: -23.51120101153365 -TCW: -7.983038306874465 From b1b327a1931354b0f73df2f3e7297040f4ed2f25 Mon Sep 17 00:00:00 2001 From: Rambaud Pierrick <12rambau@users.noreply.github.com> Date: Mon, 5 Feb 2024 09:34:12 +0000 Subject: [PATCH 5/7] test: use num_regression for ImageCollection tests --- tests/test_ImageCollection.py | 83 +++++++++++-------- .../test_collection_mask.csv | 2 + .../test_collection_mask.yml | 23 ----- .../test_deprecated_get_image.csv | 2 + .../test_deprecated_get_image.yml | 23 ----- .../test_deprecated_integral.csv | 2 + .../test_deprecated_integral.yml | 1 - .../test_deprecated_mask.csv | 2 + .../test_deprecated_mask.yml | 23 ----- .../test_deprecated_outliers.csv | 2 + .../test_deprecated_outliers.yml | 24 ------ tests/test_ImageCollection/test_iloc.csv | 2 + tests/test_ImageCollection/test_iloc.yml | 23 ----- tests/test_ImageCollection/test_integral.csv | 2 + tests/test_ImageCollection/test_integral.yml | 1 - .../test_ImageCollection/test_mask_s2_sr.csv | 2 + .../test_ImageCollection/test_mask_s2_sr.yml | 27 ------ tests/test_ImageCollection/test_outliers.csv | 2 + tests/test_ImageCollection/test_outliers.yml | 46 ---------- .../test_outliers_with_bands.csv | 2 + .../test_outliers_with_bands.yml | 25 ------ .../test_outliers_with_drop.csv | 2 + .../test_outliers_with_drop.yml | 23 ----- .../test_outliers_with_sigma.csv | 2 + .../test_outliers_with_sigma.yml | 46 ---------- .../test_ImageCollection/test_pan_sharpen.csv | 2 + .../test_ImageCollection/test_pan_sharpen.yml | 6 -- .../test_ImageCollection/test_preprocess.csv | 2 + .../test_ImageCollection/test_preprocess.yml | 23 ----- .../test_scale_and_offset.csv | 2 + .../test_scale_and_offset.yml | 23 ----- .../test_spectral_indices.csv | 2 + .../test_spectral_indices.yml | 25 ------ .../test_tasseled_cap.csv | 2 + .../test_tasseled_cap.yml | 16 ---- 35 files changed, 83 insertions(+), 412 deletions(-) create mode 100644 tests/test_ImageCollection/test_collection_mask.csv delete mode 100644 tests/test_ImageCollection/test_collection_mask.yml create mode 100644 tests/test_ImageCollection/test_deprecated_get_image.csv delete mode 100644 tests/test_ImageCollection/test_deprecated_get_image.yml create mode 100644 tests/test_ImageCollection/test_deprecated_integral.csv delete mode 100644 tests/test_ImageCollection/test_deprecated_integral.yml create mode 100644 tests/test_ImageCollection/test_deprecated_mask.csv delete mode 100644 tests/test_ImageCollection/test_deprecated_mask.yml create mode 100644 tests/test_ImageCollection/test_deprecated_outliers.csv delete mode 100644 tests/test_ImageCollection/test_deprecated_outliers.yml create mode 100644 tests/test_ImageCollection/test_iloc.csv delete mode 100644 tests/test_ImageCollection/test_iloc.yml create mode 100644 tests/test_ImageCollection/test_integral.csv delete mode 100644 tests/test_ImageCollection/test_integral.yml create mode 100644 tests/test_ImageCollection/test_mask_s2_sr.csv delete mode 100644 tests/test_ImageCollection/test_mask_s2_sr.yml create mode 100644 tests/test_ImageCollection/test_outliers.csv delete mode 100644 tests/test_ImageCollection/test_outliers.yml create mode 100644 tests/test_ImageCollection/test_outliers_with_bands.csv delete mode 100644 tests/test_ImageCollection/test_outliers_with_bands.yml create mode 100644 tests/test_ImageCollection/test_outliers_with_drop.csv delete mode 100644 tests/test_ImageCollection/test_outliers_with_drop.yml create mode 100644 tests/test_ImageCollection/test_outliers_with_sigma.csv delete mode 100644 tests/test_ImageCollection/test_outliers_with_sigma.yml create mode 100644 tests/test_ImageCollection/test_pan_sharpen.csv delete mode 100644 tests/test_ImageCollection/test_pan_sharpen.yml create mode 100644 tests/test_ImageCollection/test_preprocess.csv delete mode 100644 tests/test_ImageCollection/test_preprocess.yml create mode 100644 tests/test_ImageCollection/test_scale_and_offset.csv delete mode 100644 tests/test_ImageCollection/test_scale_and_offset.yml create mode 100644 tests/test_ImageCollection/test_spectral_indices.csv delete mode 100644 tests/test_ImageCollection/test_spectral_indices.yml create mode 100644 tests/test_ImageCollection/test_tasseled_cap.csv delete mode 100644 tests/test_ImageCollection/test_tasseled_cap.yml diff --git a/tests/test_ImageCollection.py b/tests/test_ImageCollection.py index 59dec112..cb84d527 100644 --- a/tests/test_ImageCollection.py +++ b/tests/test_ImageCollection.py @@ -2,6 +2,7 @@ from typing import Optional import ee +import numpy as np import pytest import geetools @@ -18,9 +19,9 @@ def reduce(collection: ee.ImageCollection, geometry: Optional[ee.Geometry] = Non class TestMaskClouds: """Test the ``maskClouds`` method.""" - def test_mask_s2_sr(self, s2_sr, data_regression): + def test_mask_s2_sr(self, s2_sr, num_regression): masked = s2_sr.geetools.maskClouds(prob=75, buffer=300, cdi=-0.5) - data_regression.check(reduce(masked).getInfo()) + num_regression.check(reduce(masked).getInfo()) class TestClosest: @@ -34,9 +35,9 @@ def test_closest_s2_sr(self, s2_sr, data_regression): class TestSpectralIndices: """Test the ``spectralIndices`` method.""" - def test_spectral_indices(self, s2_sr, data_regression): + def test_spectral_indices(self, s2_sr, num_regression): indices = s2_sr.geetools.spectralIndices(["NDVI", "NDWI"]) - data_regression.check(reduce(indices).getInfo()) + num_regression.check(reduce(indices).getInfo()) class TestGetScaleParams: @@ -58,17 +59,18 @@ def test_get_offset_params(self, s2_sr, data_regression): class TestScaleAndOffset: """Test the ``scaleAndOffset`` method.""" - def test_scale_and_offset(self, s2_sr, data_regression): + def test_scale_and_offset(self, s2_sr, num_regression): scaled = s2_sr.geetools.scaleAndOffset() - data_regression.check(reduce(scaled).getInfo()) + num_regression.check(reduce(scaled).getInfo()) class TestPreprocess: """Test the ``preprocess`` method.""" - def test_preprocess(self, s2_sr, data_regression): + def test_preprocess(self, s2_sr, num_regression): preprocessed = s2_sr.geetools.preprocess() - data_regression.check(reduce(preprocessed).getInfo()) + values = {k: np.nan if v is None else v for k, v in reduce(preprocessed).getInfo().items()} + num_regression.check(values) class TestGetSTAC: @@ -99,17 +101,17 @@ def test_get_citation(self, s2_sr, data_regression): class TestPanSharpen: """Test the ``panSharpen`` method.""" - def test_pan_sharpen(self, l8_toa, data_regression): + def test_pan_sharpen(self, l8_toa, num_regression): sharpened = l8_toa.geetools.panSharpen() - data_regression.check(reduce(sharpened).getInfo()) + num_regression.check(reduce(sharpened).getInfo()) class TestTasseledCap: """Test the ``tasseledCap`` method.""" - def test_tasseled_cap(self, s2, data_regression): + def test_tasseled_cap(self, s2, num_regression): tc = s2.geetools.tasseledCap() - data_regression.check(reduce(tc).getInfo()) + num_regression.check(reduce(tc).getInfo()) class TestAppend: @@ -128,67 +130,80 @@ def test_deprecated_add(self, s2_sr, data_regression): class TestcollectionMask: """Test the ``collectionMask`` method.""" - def test_collection_mask(self, s2_sr, amazonas, data_regression): + def test_collection_mask(self, s2_sr, amazonas, num_regression): masked = s2_sr.geetools.collectionMask() - data_regression.check(reduce(ee.ImageCollection([masked]), amazonas).getInfo()) + num_regression.check(reduce(ee.ImageCollection([masked]), amazonas).getInfo()) - def test_deprecated_mask(self, s2_sr, amazonas, data_regression): + def test_deprecated_mask(self, s2_sr, amazonas, num_regression): with pytest.deprecated_call(): masked = geetools.imagecollection.allMasked(s2_sr) - data_regression.check(reduce(ee.ImageCollection([masked]), amazonas).getInfo()) + num_regression.check(reduce(ee.ImageCollection([masked]), amazonas).getInfo()) class TestIloc: """Test the iloc class.""" - def test_iloc(self, s2_sr, data_regression): + def test_iloc(self, s2_sr, num_regression): ic = ee.ImageCollection([s2_sr.geetools.iloc(0).subtract(s2_sr.first())]) - data_regression.check(reduce(ic).getInfo()) + values = {k: np.nan if v is None else v for k, v in reduce(ic).getInfo().items()} + num_regression.check(values) - def test_deprecated_get_image(self, s2_sr, data_regression): + def test_deprecated_get_image(self, s2_sr, num_regression): with pytest.deprecated_call(): image = geetools.imagecollection.getImage(s2_sr, 0).subtract(s2_sr.first()) ic = ee.ImageCollection([image]) - data_regression.check(reduce(ic).getInfo()) + values = {k: np.nan if v is None else v for k, v in reduce(ic).getInfo().items()} + num_regression.check(values) class TestIntegral: """Test the ``integral`` method.""" - def test_integral(self, s2_sr, amazonas, data_regression): + def test_integral(self, s2_sr, amazonas, num_regression): integral = s2_sr.limit(10).geetools.integral("B4").select("integral") ic = ee.ImageCollection([integral]) - data_regression.check(reduce(ic, amazonas).getInfo()) + values = {k: np.nan if v is None else v for k, v in reduce(ic, amazonas).getInfo().items()} + num_regression.check(values) - def test_deprecated_integral(self, s2_sr, amazonas, data_regression): + def test_deprecated_integral(self, s2_sr, amazonas, num_regression): with pytest.deprecated_call(): integral = geetools.imagecollection.area_under_curve(s2_sr.limit(10), "B4").select( "under_curve" ) ic = ee.ImageCollection([integral]) - data_regression.check(reduce(ic, amazonas).getInfo()) + values = { + k: np.nan if v is None else v for k, v in reduce(ic, amazonas).getInfo().items() + } + num_regression.check(values) class TestOutliers: """Test the ``outliers`` method.""" - def test_outliers(self, s2_sr, amazonas, data_regression): + def test_outliers(self, s2_sr, amazonas, num_regression): ic = s2_sr.limit(10).geetools.outliers() - data_regression.check(reduce(ic, amazonas).getInfo()) + values = {k: np.nan if v is None else v for k, v in reduce(ic, amazonas).getInfo().items()} + num_regression.check(values) - def test_outliers_with_bands(self, s2_sr, amazonas, data_regression): + def test_outliers_with_bands(self, s2_sr, amazonas, num_regression): ic = s2_sr.limit(10).geetools.outliers(bands=["B4", "B2"]) - data_regression.check(reduce(ic, amazonas).getInfo()) + values = {k: np.nan if v is None else v for k, v in reduce(ic, amazonas).getInfo().items()} + num_regression.check(values) - def test_outliers_with_sigma(self, s2_sr, amazonas, data_regression): + def test_outliers_with_sigma(self, s2_sr, amazonas, num_regression): ic = s2_sr.limit(10).geetools.outliers(sigma=3) - data_regression.check(reduce(ic, amazonas).getInfo()) + values = {k: np.nan if v is None else v for k, v in reduce(ic, amazonas).getInfo().items()} + num_regression.check(values) - def test_outliers_with_drop(self, s2_sr, amazonas, data_regression): + def test_outliers_with_drop(self, s2_sr, amazonas, num_regression): ic = s2_sr.limit(10).geetools.outliers(drop=True) - data_regression.check(reduce(ic, amazonas).getInfo()) + values = {k: np.nan if v is None else v for k, v in reduce(ic, amazonas).getInfo().items()} + num_regression.check(values) - def test_deprecated_outliers(self, s2_sr, amazonas, data_regression): + def test_deprecated_outliers(self, s2_sr, amazonas, num_regression): with pytest.deprecated_call(): ic = geetools.imagecollection.outliers(s2_sr.limit(10), ["B4"]) - data_regression.check(reduce(ic, amazonas).getInfo()) + values = { + k: np.nan if v is None else v for k, v in reduce(ic, amazonas).getInfo().items() + } + num_regression.check(values) diff --git a/tests/test_ImageCollection/test_collection_mask.csv b/tests/test_ImageCollection/test_collection_mask.csv new file mode 100644 index 00000000..398ec81d --- /dev/null +++ b/tests/test_ImageCollection/test_collection_mask.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 diff --git a/tests/test_ImageCollection/test_collection_mask.yml b/tests/test_ImageCollection/test_collection_mask.yml deleted file mode 100644 index 5a1a6639..00000000 --- a/tests/test_ImageCollection/test_collection_mask.yml +++ /dev/null @@ -1,23 +0,0 @@ -AOT: 1 -B1: 1 -B11: 1 -B12: 1 -B2: 1 -B3: 1 -B4: 1 -B5: 1 -B6: 1 -B7: 1 -B8: 1 -B8A: 1 -B9: 1 -MSK_CLDPRB: 1 -MSK_SNWPRB: 1 -QA10: 1 -QA20: 1 -QA60: 1 -SCL: 1 -TCI_B: 1 -TCI_G: 1 -TCI_R: 1 -WVP: 1 diff --git a/tests/test_ImageCollection/test_deprecated_get_image.csv b/tests/test_ImageCollection/test_deprecated_get_image.csv new file mode 100644 index 00000000..52a10b2b --- /dev/null +++ b/tests/test_ImageCollection/test_deprecated_get_image.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,,,,,,,,,,,,,,0,0,0,0,0,,,,, diff --git a/tests/test_ImageCollection/test_deprecated_get_image.yml b/tests/test_ImageCollection/test_deprecated_get_image.yml deleted file mode 100644 index cd64b174..00000000 --- a/tests/test_ImageCollection/test_deprecated_get_image.yml +++ /dev/null @@ -1,23 +0,0 @@ -AOT: null -B1: null -B11: null -B12: null -B2: null -B3: null -B4: null -B5: null -B6: null -B7: null -B8: null -B8A: null -B9: null -MSK_CLDPRB: 0 -MSK_SNWPRB: 0 -QA10: 0 -QA20: 0 -QA60: 0 -SCL: null -TCI_B: null -TCI_G: null -TCI_R: null -WVP: null diff --git a/tests/test_ImageCollection/test_deprecated_integral.csv b/tests/test_ImageCollection/test_deprecated_integral.csv new file mode 100644 index 00000000..17bec5ab --- /dev/null +++ b/tests/test_ImageCollection/test_deprecated_integral.csv @@ -0,0 +1,2 @@ +,under_curve +0, diff --git a/tests/test_ImageCollection/test_deprecated_integral.yml b/tests/test_ImageCollection/test_deprecated_integral.yml deleted file mode 100644 index 8aec083b..00000000 --- a/tests/test_ImageCollection/test_deprecated_integral.yml +++ /dev/null @@ -1 +0,0 @@ -under_curve: null diff --git a/tests/test_ImageCollection/test_deprecated_mask.csv b/tests/test_ImageCollection/test_deprecated_mask.csv new file mode 100644 index 00000000..398ec81d --- /dev/null +++ b/tests/test_ImageCollection/test_deprecated_mask.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 diff --git a/tests/test_ImageCollection/test_deprecated_mask.yml b/tests/test_ImageCollection/test_deprecated_mask.yml deleted file mode 100644 index 5a1a6639..00000000 --- a/tests/test_ImageCollection/test_deprecated_mask.yml +++ /dev/null @@ -1,23 +0,0 @@ -AOT: 1 -B1: 1 -B11: 1 -B12: 1 -B2: 1 -B3: 1 -B4: 1 -B5: 1 -B6: 1 -B7: 1 -B8: 1 -B8A: 1 -B9: 1 -MSK_CLDPRB: 1 -MSK_SNWPRB: 1 -QA10: 1 -QA20: 1 -QA60: 1 -SCL: 1 -TCI_B: 1 -TCI_G: 1 -TCI_R: 1 -WVP: 1 diff --git a/tests/test_ImageCollection/test_deprecated_outliers.csv b/tests/test_ImageCollection/test_deprecated_outliers.csv new file mode 100644 index 00000000..edcbbd39 --- /dev/null +++ b/tests/test_ImageCollection/test_deprecated_outliers.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B4_outlier,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,,,,,,,,,,,,,,,,,,,,,,,, diff --git a/tests/test_ImageCollection/test_deprecated_outliers.yml b/tests/test_ImageCollection/test_deprecated_outliers.yml deleted file mode 100644 index 27d389b3..00000000 --- a/tests/test_ImageCollection/test_deprecated_outliers.yml +++ /dev/null @@ -1,24 +0,0 @@ -AOT: null -B1: null -B11: null -B12: null -B2: null -B3: null -B4: null -B4_outlier: null -B5: null -B6: null -B7: null -B8: null -B8A: null -B9: null -MSK_CLDPRB: null -MSK_SNWPRB: null -QA10: null -QA20: null -QA60: null -SCL: null -TCI_B: null -TCI_G: null -TCI_R: null -WVP: null diff --git a/tests/test_ImageCollection/test_iloc.csv b/tests/test_ImageCollection/test_iloc.csv new file mode 100644 index 00000000..52a10b2b --- /dev/null +++ b/tests/test_ImageCollection/test_iloc.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,,,,,,,,,,,,,,0,0,0,0,0,,,,, diff --git a/tests/test_ImageCollection/test_iloc.yml b/tests/test_ImageCollection/test_iloc.yml deleted file mode 100644 index cd64b174..00000000 --- a/tests/test_ImageCollection/test_iloc.yml +++ /dev/null @@ -1,23 +0,0 @@ -AOT: null -B1: null -B11: null -B12: null -B2: null -B3: null -B4: null -B5: null -B6: null -B7: null -B8: null -B8A: null -B9: null -MSK_CLDPRB: 0 -MSK_SNWPRB: 0 -QA10: 0 -QA20: 0 -QA60: 0 -SCL: null -TCI_B: null -TCI_G: null -TCI_R: null -WVP: null diff --git a/tests/test_ImageCollection/test_integral.csv b/tests/test_ImageCollection/test_integral.csv new file mode 100644 index 00000000..5268a191 --- /dev/null +++ b/tests/test_ImageCollection/test_integral.csv @@ -0,0 +1,2 @@ +,integral +0, diff --git a/tests/test_ImageCollection/test_integral.yml b/tests/test_ImageCollection/test_integral.yml deleted file mode 100644 index 99af907d..00000000 --- a/tests/test_ImageCollection/test_integral.yml +++ /dev/null @@ -1 +0,0 @@ -integral: null diff --git a/tests/test_ImageCollection/test_mask_s2_sr.csv b/tests/test_ImageCollection/test_mask_s2_sr.csv new file mode 100644 index 00000000..72e1d438 --- /dev/null +++ b/tests/test_ImageCollection/test_mask_s2_sr.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,CLOUD_MASK,CLOUD_MASK_CDI,CLOUD_SHADOW_MASK,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,SHADOW_MASK,TCI_B,TCI_G,TCI_R,WVP +0,199,16640.094805201559,1568.290431797825,1968.3295548610204,15419.765396984198,14101.613293902175,12931.892357709678,14237.406449381348,12795.376786673241,11806.409740942607,12098.870170407052,11006.397712738837,15899,1,0,0,0,0,0,0,1024,8,0,255,255,255,3645 diff --git a/tests/test_ImageCollection/test_mask_s2_sr.yml b/tests/test_ImageCollection/test_mask_s2_sr.yml deleted file mode 100644 index 4a2eead1..00000000 --- a/tests/test_ImageCollection/test_mask_s2_sr.yml +++ /dev/null @@ -1,27 +0,0 @@ -AOT: 199 -B1: 16640.09480520156 -B11: 1568.290431797825 -B12: 1968.3295548610204 -B2: 15419.765396984198 -B3: 14101.613293902175 -B4: 12931.892357709678 -B5: 14237.406449381348 -B6: 12795.376786673241 -B7: 11806.409740942607 -B8: 12098.870170407052 -B8A: 11006.397712738837 -B9: 15899 -CLOUD_MASK: 1 -CLOUD_MASK_CDI: 0 -CLOUD_SHADOW_MASK: 0 -MSK_CLDPRB: 0 -MSK_SNWPRB: 0 -QA10: 0 -QA20: 0 -QA60: 1024 -SCL: 8 -SHADOW_MASK: 0 -TCI_B: 255 -TCI_G: 255 -TCI_R: 255 -WVP: 3645 diff --git a/tests/test_ImageCollection/test_outliers.csv b/tests/test_ImageCollection/test_outliers.csv new file mode 100644 index 00000000..7abbfc1a --- /dev/null +++ b/tests/test_ImageCollection/test_outliers.csv @@ -0,0 +1,2 @@ +,AOT,AOT_outlier,B1,B11,B11_outlier,B12,B12_outlier,B1_outlier,B2,B2_outlier,B3,B3_outlier,B4,B4_outlier,B5,B5_outlier,B6,B6_outlier,B7,B7_outlier,B8,B8A,B8A_outlier,B8_outlier,B9,B9_outlier,MSK_CLDPRB,MSK_CLDPRB_outlier,MSK_SNWPRB,MSK_SNWPRB_outlier,QA10,QA10_outlier,QA20,QA20_outlier,QA60,QA60_outlier,SCL,SCL_outlier,TCI_B,TCI_B_outlier,TCI_G,TCI_G_outlier,TCI_R,TCI_R_outlier,WVP,WVP_outlier +0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, diff --git a/tests/test_ImageCollection/test_outliers.yml b/tests/test_ImageCollection/test_outliers.yml deleted file mode 100644 index 55f65ef3..00000000 --- a/tests/test_ImageCollection/test_outliers.yml +++ /dev/null @@ -1,46 +0,0 @@ -AOT: null -AOT_outlier: null -B1: null -B11: null -B11_outlier: null -B12: null -B12_outlier: null -B1_outlier: null -B2: null -B2_outlier: null -B3: null -B3_outlier: null -B4: null -B4_outlier: null -B5: null -B5_outlier: null -B6: null -B6_outlier: null -B7: null -B7_outlier: null -B8: null -B8A: null -B8A_outlier: null -B8_outlier: null -B9: null -B9_outlier: null -MSK_CLDPRB: null -MSK_CLDPRB_outlier: null -MSK_SNWPRB: null -MSK_SNWPRB_outlier: null -QA10: null -QA10_outlier: null -QA20: null -QA20_outlier: null -QA60: null -QA60_outlier: null -SCL: null -SCL_outlier: null -TCI_B: null -TCI_B_outlier: null -TCI_G: null -TCI_G_outlier: null -TCI_R: null -TCI_R_outlier: null -WVP: null -WVP_outlier: null diff --git a/tests/test_ImageCollection/test_outliers_with_bands.csv b/tests/test_ImageCollection/test_outliers_with_bands.csv new file mode 100644 index 00000000..ae77511b --- /dev/null +++ b/tests/test_ImageCollection/test_outliers_with_bands.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B2_outlier,B3,B4,B4_outlier,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,,,,,,,,,,,,,,,,,,,,,,,,, diff --git a/tests/test_ImageCollection/test_outliers_with_bands.yml b/tests/test_ImageCollection/test_outliers_with_bands.yml deleted file mode 100644 index 0475c739..00000000 --- a/tests/test_ImageCollection/test_outliers_with_bands.yml +++ /dev/null @@ -1,25 +0,0 @@ -AOT: null -B1: null -B11: null -B12: null -B2: null -B2_outlier: null -B3: null -B4: null -B4_outlier: null -B5: null -B6: null -B7: null -B8: null -B8A: null -B9: null -MSK_CLDPRB: null -MSK_SNWPRB: null -QA10: null -QA20: null -QA60: null -SCL: null -TCI_B: null -TCI_G: null -TCI_R: null -WVP: null diff --git a/tests/test_ImageCollection/test_outliers_with_drop.csv b/tests/test_ImageCollection/test_outliers_with_drop.csv new file mode 100644 index 00000000..27b115a9 --- /dev/null +++ b/tests/test_ImageCollection/test_outliers_with_drop.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,,,,,,,,,,,,,,,,,,,,,,, diff --git a/tests/test_ImageCollection/test_outliers_with_drop.yml b/tests/test_ImageCollection/test_outliers_with_drop.yml deleted file mode 100644 index 06608d47..00000000 --- a/tests/test_ImageCollection/test_outliers_with_drop.yml +++ /dev/null @@ -1,23 +0,0 @@ -AOT: null -B1: null -B11: null -B12: null -B2: null -B3: null -B4: null -B5: null -B6: null -B7: null -B8: null -B8A: null -B9: null -MSK_CLDPRB: null -MSK_SNWPRB: null -QA10: null -QA20: null -QA60: null -SCL: null -TCI_B: null -TCI_G: null -TCI_R: null -WVP: null diff --git a/tests/test_ImageCollection/test_outliers_with_sigma.csv b/tests/test_ImageCollection/test_outliers_with_sigma.csv new file mode 100644 index 00000000..7abbfc1a --- /dev/null +++ b/tests/test_ImageCollection/test_outliers_with_sigma.csv @@ -0,0 +1,2 @@ +,AOT,AOT_outlier,B1,B11,B11_outlier,B12,B12_outlier,B1_outlier,B2,B2_outlier,B3,B3_outlier,B4,B4_outlier,B5,B5_outlier,B6,B6_outlier,B7,B7_outlier,B8,B8A,B8A_outlier,B8_outlier,B9,B9_outlier,MSK_CLDPRB,MSK_CLDPRB_outlier,MSK_SNWPRB,MSK_SNWPRB_outlier,QA10,QA10_outlier,QA20,QA20_outlier,QA60,QA60_outlier,SCL,SCL_outlier,TCI_B,TCI_B_outlier,TCI_G,TCI_G_outlier,TCI_R,TCI_R_outlier,WVP,WVP_outlier +0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, diff --git a/tests/test_ImageCollection/test_outliers_with_sigma.yml b/tests/test_ImageCollection/test_outliers_with_sigma.yml deleted file mode 100644 index 55f65ef3..00000000 --- a/tests/test_ImageCollection/test_outliers_with_sigma.yml +++ /dev/null @@ -1,46 +0,0 @@ -AOT: null -AOT_outlier: null -B1: null -B11: null -B11_outlier: null -B12: null -B12_outlier: null -B1_outlier: null -B2: null -B2_outlier: null -B3: null -B3_outlier: null -B4: null -B4_outlier: null -B5: null -B5_outlier: null -B6: null -B6_outlier: null -B7: null -B7_outlier: null -B8: null -B8A: null -B8A_outlier: null -B8_outlier: null -B9: null -B9_outlier: null -MSK_CLDPRB: null -MSK_CLDPRB_outlier: null -MSK_SNWPRB: null -MSK_SNWPRB_outlier: null -QA10: null -QA10_outlier: null -QA20: null -QA20_outlier: null -QA60: null -QA60_outlier: null -SCL: null -SCL_outlier: null -TCI_B: null -TCI_B_outlier: null -TCI_G: null -TCI_G_outlier: null -TCI_R: null -TCI_R_outlier: null -WVP: null -WVP_outlier: null diff --git a/tests/test_ImageCollection/test_pan_sharpen.csv b/tests/test_ImageCollection/test_pan_sharpen.csv new file mode 100644 index 00000000..8ad930bc --- /dev/null +++ b/tests/test_ImageCollection/test_pan_sharpen.csv @@ -0,0 +1,2 @@ +,B2,B3,B4,B5,B6,B7 +0,0.42341190228971326,0.39605810178360285,0.39928781304364891,0.56361231196164929,0.42966321799378288,0.36453387368774781 diff --git a/tests/test_ImageCollection/test_pan_sharpen.yml b/tests/test_ImageCollection/test_pan_sharpen.yml deleted file mode 100644 index 018df447..00000000 --- a/tests/test_ImageCollection/test_pan_sharpen.yml +++ /dev/null @@ -1,6 +0,0 @@ -B2: 0.42341190228971326 -B3: 0.39605810178360285 -B4: 0.3992878130436489 -B5: 0.5636123119616493 -B6: 0.4296632179937829 -B7: 0.3645338736877478 diff --git a/tests/test_ImageCollection/test_preprocess.csv b/tests/test_ImageCollection/test_preprocess.csv new file mode 100644 index 00000000..27b115a9 --- /dev/null +++ b/tests/test_ImageCollection/test_preprocess.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,,,,,,,,,,,,,,,,,,,,,,, diff --git a/tests/test_ImageCollection/test_preprocess.yml b/tests/test_ImageCollection/test_preprocess.yml deleted file mode 100644 index 06608d47..00000000 --- a/tests/test_ImageCollection/test_preprocess.yml +++ /dev/null @@ -1,23 +0,0 @@ -AOT: null -B1: null -B11: null -B12: null -B2: null -B3: null -B4: null -B5: null -B6: null -B7: null -B8: null -B8A: null -B9: null -MSK_CLDPRB: null -MSK_SNWPRB: null -QA10: null -QA20: null -QA60: null -SCL: null -TCI_B: null -TCI_G: null -TCI_R: null -WVP: null diff --git a/tests/test_ImageCollection/test_scale_and_offset.csv b/tests/test_ImageCollection/test_scale_and_offset.csv new file mode 100644 index 00000000..af846329 --- /dev/null +++ b/tests/test_ImageCollection/test_scale_and_offset.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,0.19900000000000001,1.6640094805201937,0.15682904317977711,0.19683295548610844,1.5419765396983116,1.4101613293903945,1.2931892357711661,1.4237406449383538,1.2795376786673232,1.1806409740941775,1.2098870170405167,1.1006397712739482,1.5899000000000001,0,0,0,0,1024,8,255,255,255,3.645 diff --git a/tests/test_ImageCollection/test_scale_and_offset.yml b/tests/test_ImageCollection/test_scale_and_offset.yml deleted file mode 100644 index 458060b0..00000000 --- a/tests/test_ImageCollection/test_scale_and_offset.yml +++ /dev/null @@ -1,23 +0,0 @@ -AOT: 0.199 -B1: 1.6640094805201937 -B11: 0.1568290431797771 -B12: 0.19683295548610844 -B2: 1.5419765396983116 -B3: 1.4101613293903945 -B4: 1.293189235771166 -B5: 1.4237406449383538 -B6: 1.2795376786673232 -B7: 1.1806409740941775 -B8: 1.2098870170405167 -B8A: 1.1006397712739482 -B9: 1.5899 -MSK_CLDPRB: 0 -MSK_SNWPRB: 0 -QA10: 0 -QA20: 0 -QA60: 1024 -SCL: 8 -TCI_B: 255 -TCI_G: 255 -TCI_R: 255 -WVP: 3.645 diff --git a/tests/test_ImageCollection/test_spectral_indices.csv b/tests/test_ImageCollection/test_spectral_indices.csv new file mode 100644 index 00000000..a1f1737d --- /dev/null +++ b/tests/test_ImageCollection/test_spectral_indices.csv @@ -0,0 +1,2 @@ +,AOT,B1,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,MSK_CLDPRB,MSK_SNWPRB,NDVI,NDWI,QA10,QA20,QA60,SCL,TCI_B,TCI_G,TCI_R,WVP +0,199,16640.094805201559,1568.290431797825,1968.3295548610204,15419.765396984198,14101.613293902175,12931.892357709678,14237.406449381348,12795.376786673241,11806.409740942607,12098.870170407052,11006.397712738837,15899,0,0,-0.033280621230818465,0.076438807170131434,0,0,1024,8,255,255,255,3645 diff --git a/tests/test_ImageCollection/test_spectral_indices.yml b/tests/test_ImageCollection/test_spectral_indices.yml deleted file mode 100644 index 64df49eb..00000000 --- a/tests/test_ImageCollection/test_spectral_indices.yml +++ /dev/null @@ -1,25 +0,0 @@ -AOT: 199 -B1: 16640.09480520156 -B11: 1568.290431797825 -B12: 1968.3295548610204 -B2: 15419.765396984198 -B3: 14101.613293902175 -B4: 12931.892357709678 -B5: 14237.406449381348 -B6: 12795.376786673241 -B7: 11806.409740942607 -B8: 12098.870170407052 -B8A: 11006.397712738837 -B9: 15899 -MSK_CLDPRB: 0 -MSK_SNWPRB: 0 -NDVI: -0.033280621230818465 -NDWI: 0.07643880717013143 -QA10: 0 -QA20: 0 -QA60: 1024 -SCL: 8 -TCI_B: 255 -TCI_G: 255 -TCI_R: 255 -WVP: 3645 diff --git a/tests/test_ImageCollection/test_tasseled_cap.csv b/tests/test_ImageCollection/test_tasseled_cap.csv new file mode 100644 index 00000000..44671812 --- /dev/null +++ b/tests/test_ImageCollection/test_tasseled_cap.csv @@ -0,0 +1,2 @@ +,B1,B10,B11,B12,B2,B3,B4,B5,B6,B7,B8,B8A,B9,TCB,TCG,TCW +0,10066.350413384662,1985.183464943073,1396.1234760991549,1472.0991456509985,9949.6223964231503,9518.5082099609554,9810.8277370201613,9841.4738865686941,9820.7022202021853,9893.3753330696145,9659.3192883986594,9780.8934227915397,6767.9725350249855,29088.330313882791,-2787.9802013251656,1808.6277587458064 diff --git a/tests/test_ImageCollection/test_tasseled_cap.yml b/tests/test_ImageCollection/test_tasseled_cap.yml deleted file mode 100644 index 002caeaf..00000000 --- a/tests/test_ImageCollection/test_tasseled_cap.yml +++ /dev/null @@ -1,16 +0,0 @@ -B1: 10066.350413384662 -B10: 1985.183464943073 -B11: 1396.123476099155 -B12: 1472.0991456509985 -B2: 9949.62239642315 -B3: 9518.508209960955 -B4: 9810.827737020161 -B5: 9841.473886568694 -B6: 9820.702220202185 -B7: 9893.375333069614 -B8: 9659.31928839866 -B8A: 9780.89342279154 -B9: 6767.9725350249855 -TCB: 29088.33031388279 -TCG: -2787.9802013251656 -TCW: 1808.6277587458064 From fec5a09c7cd5b7b0b49636bae6fe8bdcf705ad34 Mon Sep 17 00:00:00 2001 From: Rambaud Pierrick <12rambau@users.noreply.github.com> Date: Mon, 5 Feb 2024 10:08:33 +0000 Subject: [PATCH 6/7] fix: extract DateRange from the root init for backward compatibility --- docs/usage/layout.rst | 6 ++++++ geetools/DateRange/__init__.py | 13 ++++++++++++- geetools/__init__.py | 7 +++++-- tests/test_DateRange.py | 1 + 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/docs/usage/layout.rst b/docs/usage/layout.rst index e612ca11..7e295c95 100644 --- a/docs/usage/layout.rst +++ b/docs/usage/layout.rst @@ -94,6 +94,12 @@ helper ee.DateRange ^^^^^^^^^^^^ +As reported in https://github.com/gee-community/geetools/issues/206, this object cannot be extended before the API of Earth Enfine is initialized. So to use the following methods, you will be forced to manually import the following: + +.. code-block:: python + + from geetools.DateRange import DateRangeAccessor + Extra operations ################ diff --git a/geetools/DateRange/__init__.py b/geetools/DateRange/__init__.py index ca1c0f66..36a88ab1 100644 --- a/geetools/DateRange/__init__.py +++ b/geetools/DateRange/__init__.py @@ -1,4 +1,15 @@ -"""Extra tools for the ``ee.DateRange`` class.""" +"""Extra tools for the ``ee.DateRange`` class. + +.. warning:: + + As reported in https://github.com/gee-community/geetools/issues/206, for user using ``earthengine-api<=0.1.388`` + this object cannot be extended before the API of Earth Enfine is initialized. So to use the + following methods, you will be forced to manually import the following: + + .. code-block:: python + + from geetools.DateRange import DateRangeAccessor +""" from __future__ import annotations import ee diff --git a/geetools/__init__.py b/geetools/__init__.py index ee9e15eb..bb1888b2 100644 --- a/geetools/__init__.py +++ b/geetools/__init__.py @@ -48,8 +48,11 @@ from .Authenticate import AuthenticateAccessor # Array cannot be imported directly in geetools prior to Initialisation -# waiting for a fix in https://github.com/gee-community/geetools/issues/173 -# from .Array import Array +# waiting for a fix in +# https://github.com/gee-community/geetools/issues/173 +# https://github.com/gee-community/geetools/issues/206 +# from .Array import ArrayAccessor +# from .DateRange import DateRangeAccessor __title__ = "geetools" diff --git a/tests/test_DateRange.py b/tests/test_DateRange.py index bbe6db77..050845ec 100644 --- a/tests/test_DateRange.py +++ b/tests/test_DateRange.py @@ -3,6 +3,7 @@ import pytest import geetools +from geetools.DateRange import DateRangeAccessor # noqa: F401 class TestSplit: From 56695db921e3d006d52bd0fcd462ce3a11cc4dca Mon Sep 17 00:00:00 2001 From: Rambaud Pierrick <12rambau@users.noreply.github.com> Date: Mon, 5 Feb 2024 13:09:50 +0100 Subject: [PATCH 7/7] docs: use the correct branch for raw image --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index b3b4bad6..f0d610bb 100644 --- a/README.rst +++ b/README.rst @@ -40,7 +40,7 @@ geetools Google Earth Engine tools ------------------------- -.. image:: https://raw.githubusercontent.com/gee-community/geetools/readme/docs/_static/logo.svg +.. image:: https://raw.githubusercontent.com/gee-community/geetools/main/docs/_static/logo.svg :width: 20% :align: right