diff --git a/.github/workflows/test_notebooks.yml b/.github/workflows/test_notebooks.yml index 87906f6dd..343f6a2f4 100644 --- a/.github/workflows/test_notebooks.yml +++ b/.github/workflows/test_notebooks.yml @@ -6,27 +6,22 @@ on: branches: [ develop, stable, nbtests ] pull_request: branches: [ develop, stable ] + jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Pre-pull images - run: docker-compose pull - - - name: Activate Docker cache - uses: satackey/action-docker-layer-caching@v0.0.8 - # Ignore the failure of a step and avoid terminating the job. - continue-on-error: true - - name: Set up containers run: | docker-compose up -d + - name: Set up Datacube run: | - cat Tests/setup_test_datacube.sh | docker-compose exec -T index bash - docker-compose exec -T sandbox datacube product list + docker-compose exec -T index setup_test_datacube.sh + docker-compose exec -T index datacube product list + - name: Test with pytest run: | docker-compose exec -T sandbox pip install testbook diff --git a/Beginners_guide/04_Loading_data.ipynb b/Beginners_guide/04_Loading_data.ipynb index 67eab13ba..46131cc87 100644 --- a/Beginners_guide/04_Loading_data.ipynb +++ b/Beginners_guide/04_Loading_data.ipynb @@ -502,43 +502,43 @@ " count (time, y, x) int16 16 16 16 16 16 16 16 ... 13 13 12 12 12 12\n", "Attributes:\n", " crs: EPSG:3577\n", - " grid_mapping: spatial_ref
  • crs :
    EPSG:3577
    grid_mapping :
    spatial_ref
  • " ], "text/plain": [ "\n", @@ -1044,13 +1044,13 @@ " units: 1\n", " nodata: -999\n", " crs: EPSG:3577\n", - " grid_mapping: spatial_ref
    • time
      (time)
      datetime64[ns]
      2015-07-02T11:59:59.999999
      units :
      seconds since 1970-01-01 00:00:00
      array(['2015-07-02T11:59:59.999999000'], dtype='datetime64[ns]')
    • y
      (y)
      float64
      -3.156e+06 ... -3.168e+06
      units :
      metre
      resolution :
      -30.0
      crs :
      EPSG:3577
      array([-3155805., -3155835., -3155865., ..., -3168435., -3168465., -3168495.])
    • x
      (x)
      float64
      2.067e+06 2.067e+06 ... 2.079e+06
      units :
      metre
      resolution :
      30.0
      crs :
      EPSG:3577
      array([2067435., 2067465., 2067495., ..., 2078865., 2078895., 2078925.])
    • spatial_ref
      ()
      int32
      3577
      spatial_ref :
      PROJCS["GDA94 / Australian Albers",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4283"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["latitude_of_center",0],PARAMETER["longitude_of_center",132],PARAMETER["standard_parallel_1",-18],PARAMETER["standard_parallel_2",-36],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","3577"]]
      grid_mapping_name :
      albers_conical_equal_area
      array(3577, dtype=int32)
  • units :
    1
    nodata :
    -999
    crs :
    EPSG:3577
    grid_mapping :
    spatial_ref
  • " ], "text/plain": [ "\n", @@ -1501,25 +1501,25 @@ " blue (time, y, x) int16 469 470 474 480 481 ... 321 311 277 258 267\n", "Attributes:\n", " crs: EPSG:3577\n", - " grid_mapping: spatial_ref
  • crs :
    EPSG:3577
    grid_mapping :
    spatial_ref
  • " ], "text/plain": [ "\n", @@ -1951,43 +1951,43 @@ " count (time, y, x) int16 17 17 17 17 17 17 17 ... 16 17 16 16 14 14\n", "Attributes:\n", " crs: EPSG:3577\n", - " grid_mapping: spatial_ref
  • crs :
    EPSG:3577
    grid_mapping :
    spatial_ref
  • " ], "text/plain": [ "\n", @@ -2461,53 +2461,53 @@ " count (time, y, x) int16 17 17 17 17 16 16 16 ... 14 15 15 15 15 15\n", "Attributes:\n", " crs: EPSG:32756\n", - " grid_mapping: spatial_ref
  • crs :
    EPSG:32756
    grid_mapping :
    spatial_ref
  • " ], "text/plain": [ "\n", @@ -2999,7 +2999,7 @@ " count (time, y, x) int16 17 17 16 15 16 16 17 ... 14 14 14 13 12 12\n", "Attributes:\n", " crs: EPSG:3577\n", - " grid_mapping: spatial_ref
  • crs :
    EPSG:3577
    grid_mapping :
    spatial_ref
  • " ], "text/plain": [ "\n", @@ -3523,53 +3523,53 @@ " count (time, y, x) int16 17 17 17 17 16 16 16 ... 14 15 15 15 15 15\n", "Attributes:\n", " crs: EPSG:32756\n", - " grid_mapping: spatial_ref
  • crs :
    EPSG:32756
    grid_mapping :
    spatial_ref
  • " ], "text/plain": [ "\n", @@ -4072,43 +4072,43 @@ " count (time, y, x) int16 16 16 16 16 16 16 16 ... 13 13 12 12 12 12\n", "Attributes:\n", " crs: EPSG:3577\n", - " grid_mapping: spatial_ref
  • crs :
    EPSG:3577
    grid_mapping :
    spatial_ref
  • " ], "text/plain": [ "\n", @@ -4574,53 +4574,53 @@ " count (time, y, x) int16 17 17 17 17 16 16 16 ... 14 15 15 15 15 15\n", "Attributes:\n", " crs: EPSG:32756\n", - " grid_mapping: spatial_ref
  • crs :
    EPSG:32756
    grid_mapping :
    spatial_ref
  • " ], "text/plain": [ "\n", @@ -5093,53 +5093,53 @@ " count (time, y, x) int16 13 13 12 12 12 12 12 ... 13 11 11 11 12 12\n", "Attributes:\n", " crs: EPSG:32756\n", - " grid_mapping: spatial_ref
  • crs :
    EPSG:32756
    grid_mapping :
    spatial_ref
  • " ], "text/plain": [ "\n", @@ -5610,53 +5610,53 @@ " count (time, y, x) int16 13 13 12 12 12 12 12 ... 13 11 11 11 12 12\n", "Attributes:\n", " crs: PROJCS["WGS 84 / UTM zone 56S",GEOGCS["WGS 84",DATUM["WGS_...\n", - " grid_mapping: spatial_ref
  • crs :
    PROJCS["WGS 84 / UTM zone 56S",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",153],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","32756"]]
    grid_mapping :
    spatial_ref
  • " ], "text/plain": [ "\n", @@ -5757,7 +5757,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "ee4e11a7c9744f61a1cb61bb2a09abfd", + "model_id": "3b377ce9e1644633a3ac066a2abaf588", "version_major": 2, "version_minor": 0 }, @@ -6142,9 +6142,9 @@ " count (time, y, x) int16 10 11 11 11 12 11 11 ... 17 17 15 14 14 14\n", "Attributes:\n", " crs: EPSG:3577\n", - " grid_mapping: spatial_ref
  • crs :
    EPSG:3577
    grid_mapping :
    spatial_ref
  • " ], "text/plain": [ "\n", @@ -6673,135 +6673,135 @@ "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { - "0b8e73aa95d3434d924e434442c9200a": { + "2bb6cd6b3ae24e62bad299675e0b8df3": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", - "model_name": "ProgressStyleModel", - "state": { - "description_width": "" - } - }, - "1924caf0ff424bfa96304b8b73aad48c": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "1.5.0", - "model_name": "DescriptionStyleModel", + "model_name": "LabelModel", "state": { - "description_width": "" + "layout": "IPY_MODEL_913a803f0e6443429d8e6d629799d016", + "style": "IPY_MODEL_c292a651c19a48079e8005d6539716fc", + "value": "100 of 100" } }, - "217f95336aad4e5a9d7fb45521ee7a03": { + "2c96bbdebc504f209c8396526a04292e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", - "model_name": "LabelModel", + "model_name": "HBoxModel", "state": { - "layout": "IPY_MODEL_55cce4f7c7714fe6bbc5375917be7c42", - "style": "IPY_MODEL_1924caf0ff424bfa96304b8b73aad48c", - "value": "FPS: 5.5 (0.0 s remaining)" + "children": [ + "IPY_MODEL_ba6b3d1f824d45c0aa095881ff23cbc9", + "IPY_MODEL_2bb6cd6b3ae24e62bad299675e0b8df3" + ], + "layout": "IPY_MODEL_62c169993efd49568251d9a19bbbaa87" } }, - "55cce4f7c7714fe6bbc5375917be7c42": { + "2f8bf8f637024b4bbf551f72fcce88ee": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", - "state": {} + "state": { + "width": "100%" + } }, - "5859f221d3f2460e9b12702fd0174b1b": { + "33bb73de6c9b41dd9ad11152d7df6e0e": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, - "668394458c6f4bd9b474b6e8f1f79953": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "1.2.0", - "model_name": "LayoutModel", + "3b377ce9e1644633a3ac066a2abaf588": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "VBoxModel", "state": { - "width": "100%" + "children": [ + "IPY_MODEL_2c96bbdebc504f209c8396526a04292e", + "IPY_MODEL_f8d38ebd146c4724a9dc9d03f64a1220" + ], + "layout": "IPY_MODEL_d55147b344224e7da3aa68bd019a4f60" } }, - "822cf8e1679c49d491cca955c7a9097a": { + "62c169993efd49568251d9a19bbbaa87": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { - "width": "100%" + "justify_content": "space-between" } }, - "8258a81d77bb4388ae4a05802864cd1b": { + "729bcfa54e6148dd9c349f67d67a95d2": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", - "model_name": "DescriptionStyleModel", + "model_name": "IntProgressModel", "state": { - "description_width": "" + "layout": "IPY_MODEL_2f8bf8f637024b4bbf551f72fcce88ee", + "style": "IPY_MODEL_d8ae933b9e764c47b60c3a5e339b51f5", + "value": 100 } }, - "a6915da1d72d4a1cb66f726cdab0f0a4": { + "913a803f0e6443429d8e6d629799d016": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, - "c1f5e9270cec4b32a49a4eb556548f27": { + "9ee158f5c70145c1b3b505a5ba997baa": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", - "model_name": "IntProgressModel", + "model_name": "DescriptionStyleModel", "state": { - "layout": "IPY_MODEL_668394458c6f4bd9b474b6e8f1f79953", - "style": "IPY_MODEL_0b8e73aa95d3434d924e434442c9200a", - "value": 100 + "description_width": "" } }, - "cc47fc2aef894beea032561e0fb2b907": { + "ba6b3d1f824d45c0aa095881ff23cbc9": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "LabelModel", "state": { - "layout": "IPY_MODEL_a6915da1d72d4a1cb66f726cdab0f0a4", - "style": "IPY_MODEL_8258a81d77bb4388ae4a05802864cd1b", - "value": "100 of 100" + "layout": "IPY_MODEL_33bb73de6c9b41dd9ad11152d7df6e0e", + "style": "IPY_MODEL_9ee158f5c70145c1b3b505a5ba997baa", + "value": "FPS: 3.5 (0.0 s remaining)" } }, - "d4647098402041b9ba1ba4a985d70ebe": { + "c292a651c19a48079e8005d6539716fc": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", - "model_name": "HBoxModel", + "model_name": "DescriptionStyleModel", "state": { - "children": [ - "IPY_MODEL_c1f5e9270cec4b32a49a4eb556548f27" - ], - "layout": "IPY_MODEL_5859f221d3f2460e9b12702fd0174b1b" + "description_width": "" } }, - "e2648563c21740649aac4fab71e0336a": { + "cd25cdd871ff414580007b11018a99b4": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": {} + }, + "d55147b344224e7da3aa68bd019a4f60": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { - "justify_content": "space-between" + "width": "100%" } }, - "ee4e11a7c9744f61a1cb61bb2a09abfd": { + "d8ae933b9e764c47b60c3a5e339b51f5": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", - "model_name": "VBoxModel", + "model_name": "ProgressStyleModel", "state": { - "children": [ - "IPY_MODEL_fcd02bff60a54fe0bec36b8c881ecce8", - "IPY_MODEL_d4647098402041b9ba1ba4a985d70ebe" - ], - "layout": "IPY_MODEL_822cf8e1679c49d491cca955c7a9097a" + "description_width": "" } }, - "fcd02bff60a54fe0bec36b8c881ecce8": { + "f8d38ebd146c4724a9dc9d03f64a1220": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "children": [ - "IPY_MODEL_217f95336aad4e5a9d7fb45521ee7a03", - "IPY_MODEL_cc47fc2aef894beea032561e0fb2b907" + "IPY_MODEL_729bcfa54e6148dd9c349f67d67a95d2" ], - "layout": "IPY_MODEL_e2648563c21740649aac4fab71e0336a" + "layout": "IPY_MODEL_cd25cdd871ff414580007b11018a99b4" } } }, diff --git a/Tests/Beginners_guide/01_Jupyter_notebooks_test.py b/Tests/Beginners_guide/01_Jupyter_notebooks_test.py index c2cea1b1c..178fc62e7 100644 --- a/Tests/Beginners_guide/01_Jupyter_notebooks_test.py +++ b/Tests/Beginners_guide/01_Jupyter_notebooks_test.py @@ -6,6 +6,6 @@ NB_PATH = NB_DIR / "Beginners_guide" / "01_Jupyter_notebooks.ipynb" -@testbook(NB_PATH, execute=True) +@testbook(NB_PATH, execute=True, timeout=180) def test_ok(tb): assert True # ok diff --git a/Tests/Beginners_guide/02_DEA_test.py b/Tests/Beginners_guide/02_DEA_test.py index d0d7468a5..db6ffaa0f 100644 --- a/Tests/Beginners_guide/02_DEA_test.py +++ b/Tests/Beginners_guide/02_DEA_test.py @@ -6,6 +6,6 @@ NB_PATH = NB_DIR / "Beginners_guide" / "02_DEA.ipynb" -@testbook(NB_PATH, execute=True) +@testbook(NB_PATH, execute=True, timeout=180) def test_ok(tb): assert True # ok diff --git a/Tests/Beginners_guide/03_Products_and_measurements_test.py b/Tests/Beginners_guide/03_Products_and_measurements_test.py index 660db5ad5..9c45e5790 100644 --- a/Tests/Beginners_guide/03_Products_and_measurements_test.py +++ b/Tests/Beginners_guide/03_Products_and_measurements_test.py @@ -6,6 +6,6 @@ NB_PATH = NB_DIR / "Beginners_guide" / "03_Products_and_measurements.ipynb" -@testbook(NB_PATH, execute=True) +@testbook(NB_PATH, execute=True, timeout=180) def test_ok(tb): assert True # ok diff --git a/Tests/Beginners_guide/04_Loading_data_test.py b/Tests/Beginners_guide/04_Loading_data_test.py index 2ada1a069..b2af37e7e 100644 --- a/Tests/Beginners_guide/04_Loading_data_test.py +++ b/Tests/Beginners_guide/04_Loading_data_test.py @@ -6,6 +6,6 @@ NB_PATH = NB_DIR / "Beginners_guide" / "04_Loading_data.ipynb" -@testbook(NB_PATH, execute=True) +@testbook(NB_PATH, execute=True, timeout=180) def test_ok(tb): assert True # ok diff --git a/Tests/Beginners_guide/06_Basic_analysis_test.py b/Tests/Beginners_guide/06_Basic_analysis_test.py index e7e6298f7..2ca943686 100644 --- a/Tests/Beginners_guide/06_Basic_analysis_test.py +++ b/Tests/Beginners_guide/06_Basic_analysis_test.py @@ -9,7 +9,7 @@ @pytest.fixture(scope="module") def tb(): - with testbook(NB_PATH, execute=True) as tb: + with testbook(NB_PATH, execute=True, timeout=180) as tb: yield tb diff --git a/Tests/Beginners_guide/07_Intro_to_numpy_test.py b/Tests/Beginners_guide/07_Intro_to_numpy_test.py index 63b2ea858..88dd25edd 100644 --- a/Tests/Beginners_guide/07_Intro_to_numpy_test.py +++ b/Tests/Beginners_guide/07_Intro_to_numpy_test.py @@ -14,7 +14,7 @@ def tb(): # Update working directory to ensure relative links in notebooks work os.chdir(NB_DIR.parent) - with testbook(NB_PATH, execute=True) as tb: + with testbook(NB_PATH, execute=True, timeout=180) as tb: yield tb diff --git a/Tests/Frequently_used_code/Animated_timeseries_test.py b/Tests/Frequently_used_code/Animated_timeseries_test.py index e7e4ad253..eb5869d5e 100644 --- a/Tests/Frequently_used_code/Animated_timeseries_test.py +++ b/Tests/Frequently_used_code/Animated_timeseries_test.py @@ -14,7 +14,7 @@ def tb(): # Update working directory to ensure relative links in notebooks work os.chdir(NB_DIR.parent) - with testbook(NB_PATH, execute=True) as tb: + with testbook(NB_PATH, execute=True, timeout=180) as tb: yield tb diff --git a/Tests/Frequently_used_code/Calculating_band_indices_test.py b/Tests/Frequently_used_code/Calculating_band_indices_test.py index 9585a2e24..613d4d0d5 100644 --- a/Tests/Frequently_used_code/Calculating_band_indices_test.py +++ b/Tests/Frequently_used_code/Calculating_band_indices_test.py @@ -10,7 +10,7 @@ @pytest.fixture(scope="module") def tb(): - with testbook(NB_PATH, execute=True) as tb: + with testbook(NB_PATH, execute=True, timeout=180) as tb: yield tb diff --git a/Tests/Frequently_used_code/Contour_extraction_test.py b/Tests/Frequently_used_code/Contour_extraction_test.py index c14f82379..bf66f8996 100644 --- a/Tests/Frequently_used_code/Contour_extraction_test.py +++ b/Tests/Frequently_used_code/Contour_extraction_test.py @@ -14,7 +14,7 @@ def tb(): # Update working directory to ensure relative links in notebooks work os.chdir(NB_DIR.parent) - with testbook(NB_PATH, execute=True) as tb: + with testbook(NB_PATH, execute=True, timeout=180) as tb: yield tb diff --git a/Tests/Frequently_used_code/Exporting_GeoTIFFs_test.py b/Tests/Frequently_used_code/Exporting_GeoTIFFs_test.py index 9a81bca90..c2207085d 100644 --- a/Tests/Frequently_used_code/Exporting_GeoTIFFs_test.py +++ b/Tests/Frequently_used_code/Exporting_GeoTIFFs_test.py @@ -9,7 +9,7 @@ @pytest.fixture(scope="module") def tb(): - with testbook(NB_PATH, execute=True) as tb: + with testbook(NB_PATH, execute=True, timeout=180) as tb: yield tb diff --git a/Tests/Frequently_used_code/Generating_composites_test.py b/Tests/Frequently_used_code/Generating_composites_test.py index 4e4ad4078..5d09038fe 100644 --- a/Tests/Frequently_used_code/Generating_composites_test.py +++ b/Tests/Frequently_used_code/Generating_composites_test.py @@ -14,7 +14,7 @@ def tb(): # Update working directory to ensure relative links in notebooks work os.chdir(NB_DIR.parent) - with testbook(NB_PATH, execute=True) as tb: + with testbook(NB_PATH, execute=True, timeout=180) as tb: yield tb diff --git a/Tests/Frequently_used_code/Polygon_drill_test.py b/Tests/Frequently_used_code/Polygon_drill_test.py index 053146b41..691146c45 100644 --- a/Tests/Frequently_used_code/Polygon_drill_test.py +++ b/Tests/Frequently_used_code/Polygon_drill_test.py @@ -9,7 +9,7 @@ @pytest.fixture(scope="module") def tb(): - with testbook(NB_PATH, execute=True) as tb: + with testbook(NB_PATH, execute=True, timeout=180) as tb: yield tb diff --git a/Tests/Frequently_used_code/Rasterize_vectorize_test.py b/Tests/Frequently_used_code/Rasterize_vectorize_test.py index ee94cf5db..06e022094 100644 --- a/Tests/Frequently_used_code/Rasterize_vectorize_test.py +++ b/Tests/Frequently_used_code/Rasterize_vectorize_test.py @@ -9,7 +9,7 @@ @pytest.fixture(scope="module") def tb(): - with testbook(NB_PATH, execute=True) as tb: + with testbook(NB_PATH, execute=True, timeout=180) as tb: yield tb diff --git a/Tests/Frequently_used_code/Tidal_modelling_test.py b/Tests/Frequently_used_code/Tidal_modelling_test.py index 5eea9d840..83481f2a4 100644 --- a/Tests/Frequently_used_code/Tidal_modelling_test.py +++ b/Tests/Frequently_used_code/Tidal_modelling_test.py @@ -9,7 +9,7 @@ @pytest.fixture(scope="module") def tb(): - with testbook(NB_PATH, execute=True) as tb: + with testbook(NB_PATH, execute=True, timeout=180) as tb: yield tb diff --git a/Tests/Frequently_used_code/Using_load_ard_test.py b/Tests/Frequently_used_code/Using_load_ard_test.py index 0ba500bf5..8483dbf7b 100644 --- a/Tests/Frequently_used_code/Using_load_ard_test.py +++ b/Tests/Frequently_used_code/Using_load_ard_test.py @@ -9,7 +9,7 @@ @pytest.fixture(scope='module') def tb(): - with testbook(NB_PATH, execute=True) as tb: + with testbook(NB_PATH, execute=True, timeout=180) as tb: yield tb diff --git a/Tests/setup_test_datacube.sh b/Tests/setup_test_datacube.sh old mode 100644 new mode 100755 index 8ea260718..e6c65666b --- a/Tests/setup_test_datacube.sh +++ b/Tests/setup_test_datacube.sh @@ -2,68 +2,73 @@ set -ex # Setup datacube -datacube system init --no-default-types --no-init-users +datacube system init --no-init-users + +# clone dea-config +git clone https://github.com/GeoscienceAustralia/dea-config.git + # Setup metadata types -datacube metadata add "$METADATA_CATALOG" -# Index products we care about for dea-notebooks -wget "$PRODUCT_CATALOG" -O product_list.csv +for metadata_yaml in $(find ./dea-config/product_metadata -name '*.yaml'); do + datacube metadata add $metadata_yaml +done -bash -c "tail -n+2 product_list.csv | grep 'ga_ls7e_nbart_gm_cyear_3\|ga_ls8c_nbart_gm_cyear_3\|ga_ls_wo_3\|s2a_ard_granule\|s2b_ard_granule\|ga_ls5t_ard_3\|ga_ls7e_ard_3\|ga_ls8c_ard_3\|wofs_annual_summary' | awk -F , '{print \$2}' | xargs datacube -v product add" +# Index products we care about for dea-notebooks +for prod_def_yaml in $(find ./dea-config/products -name '*.yaml' -regex '.*\(ga_ls7e_nbart_gm_cyear_3\|ga_ls8c_nbart_gm_cyear_3\|ga_ls_wo_3\|s2a_ard_granule\|s2b_ard_granule\|ga_ls5t_ard_3\|ga_ls7e_ard_3\|ga_ls8c_ard_3\|wofs_annual_summary\).*'); do + datacube product add $prod_def_yaml +done # Index scenes -cat > index_tiles.sh <