From 0e166c55ab03e288aaf8b6ae9077b3203b358e76 Mon Sep 17 00:00:00 2001 From: "pin.jin@ga.gov.au" Date: Mon, 23 May 2022 01:35:27 +0000 Subject: [PATCH 1/5] optimise test github action --- .github/workflows/test_notebooks.yml | 6 +- Tests/setup_test_datacube.sh | 96 +++++++++++++++------------- docker-compose.yml | 2 + 3 files changed, 58 insertions(+), 46 deletions(-) mode change 100644 => 100755 Tests/setup_test_datacube.sh diff --git a/.github/workflows/test_notebooks.yml b/.github/workflows/test_notebooks.yml index 87906f6dd..799638a6e 100644 --- a/.github/workflows/test_notebooks.yml +++ b/.github/workflows/test_notebooks.yml @@ -14,7 +14,7 @@ jobs: - 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. @@ -25,8 +25,8 @@ jobs: 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/Tests/setup_test_datacube.sh b/Tests/setup_test_datacube.sh old mode 100644 new mode 100755 index 5b57909c4..41669c966 --- a/Tests/setup_test_datacube.sh +++ b/Tests/setup_test_datacube.sh @@ -2,63 +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 'ls7_nbart_geomedian_annual\|ls8_nbart_geomedian_annual\|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'); do + if [[ $prod_def_yaml != *"decommissioned/"* ]]; then + datacube product add $prod_def_yaml + fi +done # Index scenes -cat > index_tiles.sh < Date: Mon, 23 May 2022 04:25:56 +0000 Subject: [PATCH 2/5] limit product for adding --- Tests/setup_test_datacube.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Tests/setup_test_datacube.sh b/Tests/setup_test_datacube.sh index 41669c966..e6c65666b 100755 --- a/Tests/setup_test_datacube.sh +++ b/Tests/setup_test_datacube.sh @@ -13,10 +13,8 @@ for metadata_yaml in $(find ./dea-config/product_metadata -name '*.yaml'); do done # Index products we care about for dea-notebooks -for prod_def_yaml in $(find ./dea-config/products -name '*.yaml'); do - if [[ $prod_def_yaml != *"decommissioned/"* ]]; then +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 - fi done # Index scenes @@ -41,30 +39,17 @@ s3-to-dc 's3://dea-public-data/baseline/s2a_ard_granule/2018-11-08/S2A_OPER_MSI_ s3-to-dc 's3://dea-public-data/baseline/s2a_ard_granule/2018-11-18/S2A_OPER_MSI_ARD_TL_EPAE_20181118T021103_A017788_T55LBD_N02.07/*.odc-metadata.yaml' --no-sign-request --skip-lineage 's2a_ard_granule' s3-to-dc 's3://dea-public-data/baseline/s2a_ard_granule/2018-11-28/S2A_OPER_MSI_ARD_TL_EPAE_20181128T020701_A017931_T55LBD_N02.07/*.odc-metadata.yaml' --no-sign-request --skip-lineage 's2a_ard_granule' s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/110/073/2019/06/19/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' -# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/110/073/2021/06/24/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' -# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/073/2021/06/15/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' -# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/110/073/2021/06/08/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' -# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/073/2021/07/01/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/072/2020/10/02/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/110/073/2019/03/31/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/110/073/2019/01/26/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' -# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/073/2021/04/12/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' -# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/073/2021/03/27/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/072/2019/01/01/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' -# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/073/2021/02/23/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/110/073/2020/09/25/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/072/2020/07/14/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' -# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/110/073/2021/09/28/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' -# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/073/2020/12/21/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/110/073/2019/05/18/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' -# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/110/073/2020/12/30/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' -# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/072/2021/07/17/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/072/2020/05/11/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' -# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/110/073/2021/05/23/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/073/2020/04/25/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/072/2020/06/12/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/110/073/2019/10/25/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' -# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/073/2019/12/19/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/073/2020/02/05/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/110/073/2019/11/26/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/072/2019/07/12/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' @@ -72,3 +57,18 @@ s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/072/2019/06/26/*.json' s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/073/2019/06/10/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/073/2019/08/29/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/073/2020/02/21/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' + +# incompatable datasets +# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/110/073/2021/06/24/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' +# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/073/2021/06/15/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' +# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/110/073/2021/06/08/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' +# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/073/2021/07/01/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' +# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/073/2019/12/19/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' +# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/110/073/2021/05/23/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' +# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/110/073/2020/12/30/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' +# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/072/2021/07/17/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' +# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/110/073/2021/09/28/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' +# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/073/2020/12/21/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' +# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/073/2021/04/12/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' +# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/073/2021/03/27/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' +# s3-to-dc 's3://dea-public-data/baseline/ga_ls8c_ard_3/111/073/2021/02/23/*.json' --no-sign-request --skip-lineage --stac 'ga_ls8c_ard_3' \ No newline at end of file From 686cc9a4bf215cd7485ab744d5ba96c5af294e6f Mon Sep 17 00:00:00 2001 From: robbibt Date: Mon, 23 May 2022 04:51:29 +0000 Subject: [PATCH 3/5] Test whether tests fail due to load time --- Beginners_guide/04_Loading_data.ipynb | 668 +++++++++----------------- 1 file changed, 229 insertions(+), 439 deletions(-) diff --git a/Beginners_guide/04_Loading_data.ipynb b/Beginners_guide/04_Loading_data.ipynb index 67eab13ba..15441eec0 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": "ec6abc515de74c02b614d8d95363b33f", "version_major": 2, "version_minor": 0 }, @@ -6123,52 +6123,27 @@ " fill: currentColor;\n", "}\n", "
    <xarray.Dataset>\n",
    -       "Dimensions:      (time: 5, y: 424, x: 384)\n",
    +       "Dimensions:      (time: 2, y: 424, x: 384)\n",
            "Coordinates:\n",
    -       "  * time         (time) datetime64[ns] 2013-07-02T11:59:59.999999 ... 2017-07...\n",
    +       "  * time         (time) datetime64[ns] 2016-07-01T23:59:59.999999 2017-07-02T...\n",
            "  * y            (y) float64 -3.156e+06 -3.156e+06 ... -3.168e+06 -3.168e+06\n",
            "  * x            (x) float64 2.067e+06 2.067e+06 ... 2.079e+06 2.079e+06\n",
            "    spatial_ref  int32 3577\n",
            "Data variables:\n",
    -       "    blue         (time, y, x) int16 490 506 504 497 498 ... 350 351 311 296 292\n",
    -       "    green        (time, y, x) int16 537 557 558 548 536 ... 526 531 450 392 391\n",
    -       "    red          (time, y, x) int16 253 273 275 269 268 ... 407 402 351 337 340\n",
    -       "    nir          (time, y, x) int16 93 106 104 100 108 ... 2889 2557 2344 2403\n",
    -       "    swir1        (time, y, x) int16 51 61 62 58 68 ... 1394 1397 1127 1009 1089\n",
    -       "    swir2        (time, y, x) int16 41 48 48 47 55 49 ... 661 650 521 465 495\n",
    -       "    sdev         (time, y, x) float32 0.003682 0.004547 ... 0.001669 0.002302\n",
    -       "    edev         (time, y, x) float32 142.1 160.1 159.9 ... 220.8 205.4 237.7\n",
    -       "    bcdev        (time, y, x) float32 0.1025 0.1248 0.1216 ... 0.04438 0.05313\n",
    -       "    count        (time, y, x) int16 10 11 11 11 12 11 11 ... 17 17 15 14 14 14\n",
    +       "    blue         (time, y, x) int16 479 478 476 481 484 ... 350 351 311 296 292\n",
    +       "    green        (time, y, x) int16 505 504 506 510 511 ... 526 531 450 392 391\n",
    +       "    red          (time, y, x) int16 215 215 215 221 225 ... 407 402 351 337 340\n",
    +       "    nir          (time, y, x) int16 90 87 88 91 95 ... 2808 2889 2557 2344 2403\n",
    +       "    swir1        (time, y, x) int16 50 49 49 51 54 ... 1394 1397 1127 1009 1089\n",
    +       "    swir2        (time, y, x) int16 40 40 39 41 44 44 ... 661 650 521 465 495\n",
    +       "    sdev         (time, y, x) float32 0.003809 0.005104 ... 0.001669 0.002302\n",
    +       "    edev         (time, y, x) float32 136.6 141.2 139.9 ... 220.8 205.4 237.7\n",
    +       "    bcdev        (time, y, x) float32 0.1048 0.1089 0.1113 ... 0.04438 0.05313\n",
    +       "    count        (time, y, x) int16 17 17 17 17 17 17 17 ... 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", - "Dimensions: (time: 5, y: 424, x: 384)\n", + "Dimensions: (time: 2, y: 424, x: 384)\n", "Coordinates:\n", - " * time (time) datetime64[ns] 2013-07-02T11:59:59.999999 ... 2017-07...\n", + " * time (time) datetime64[ns] 2016-07-01T23:59:59.999999 2017-07-02T...\n", " * y (y) float64 -3.156e+06 -3.156e+06 ... -3.168e+06 -3.168e+06\n", " * x (x) float64 2.067e+06 2.067e+06 ... 2.079e+06 2.079e+06\n", " spatial_ref int32 3577\n", "Data variables:\n", - " blue (time, y, x) int16 490 506 504 497 498 ... 350 351 311 296 292\n", - " green (time, y, x) int16 537 557 558 548 536 ... 526 531 450 392 391\n", - " red (time, y, x) int16 253 273 275 269 268 ... 407 402 351 337 340\n", - " nir (time, y, x) int16 93 106 104 100 108 ... 2889 2557 2344 2403\n", - " swir1 (time, y, x) int16 51 61 62 58 68 ... 1394 1397 1127 1009 1089\n", - " swir2 (time, y, x) int16 41 48 48 47 55 49 ... 661 650 521 465 495\n", - " sdev (time, y, x) float32 0.003682 0.004547 ... 0.001669 0.002302\n", - " edev (time, y, x) float32 142.1 160.1 159.9 ... 220.8 205.4 237.7\n", - " bcdev (time, y, x) float32 0.1025 0.1248 0.1216 ... 0.04438 0.05313\n", - " count (time, y, x) int16 10 11 11 11 12 11 11 ... 17 17 15 14 14 14\n", + " blue (time, y, x) int16 479 478 476 481 484 ... 350 351 311 296 292\n", + " green (time, y, x) int16 505 504 506 510 511 ... 526 531 450 392 391\n", + " red (time, y, x) int16 215 215 215 221 225 ... 407 402 351 337 340\n", + " nir (time, y, x) int16 90 87 88 91 95 ... 2808 2889 2557 2344 2403\n", + " swir1 (time, y, x) int16 50 49 49 51 54 ... 1394 1397 1127 1009 1089\n", + " swir2 (time, y, x) int16 40 40 39 41 44 44 ... 661 650 521 465 495\n", + " sdev (time, y, x) float32 0.003809 0.005104 ... 0.001669 0.002302\n", + " edev (time, y, x) float32 136.6 141.2 139.9 ... 220.8 205.4 237.7\n", + " bcdev (time, y, x) float32 0.1048 0.1089 0.1113 ... 0.04438 0.05313\n", + " count (time, y, x) int16 17 17 17 17 17 17 17 ... 17 17 15 14 14 14\n", "Attributes:\n", " crs: EPSG:3577\n", " grid_mapping: spatial_ref" @@ -6564,7 +6353,7 @@ "source": [ "query = {\"x\": (153.3, 153.4),\n", " \"y\": (-27.5, -27.6),\n", - " \"time\": (\"2013\", \"2017\")}\n", + " \"time\": (\"2016\", \"2017\")}\n", "\n", "ds_progress = dc.load(product=\"ga_ls8c_nbart_gm_cyear_3\",\n", " progress_cbk=with_ui_cbk(),\n", @@ -6673,15 +6462,15 @@ "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { - "0b8e73aa95d3434d924e434442c9200a": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "1.5.0", - "model_name": "ProgressStyleModel", + "07fe47c6bde44a0bbbb365b4a61e3bc8": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", "state": { - "description_width": "" + "width": "100%" } }, - "1924caf0ff424bfa96304b8b73aad48c": { + "0f4b46f884744fb2a9af85323c8c6e5a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "DescriptionStyleModel", @@ -6689,119 +6478,120 @@ "description_width": "" } }, - "217f95336aad4e5a9d7fb45521ee7a03": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "1.5.0", - "model_name": "LabelModel", - "state": { - "layout": "IPY_MODEL_55cce4f7c7714fe6bbc5375917be7c42", - "style": "IPY_MODEL_1924caf0ff424bfa96304b8b73aad48c", - "value": "FPS: 5.5 (0.0 s remaining)" - } - }, - "55cce4f7c7714fe6bbc5375917be7c42": { + "12be6b61cd914abd925398da70444e80": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", - "state": {} + "state": { + "justify_content": "space-between" + } }, - "5859f221d3f2460e9b12702fd0174b1b": { + "2f66df212cfe4412a0e6516a70954a42": { "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", + "4e74d6cda7c34c159207c5cc839c7d5c": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", "state": { - "width": "100%" + "description_width": "" } }, - "822cf8e1679c49d491cca955c7a9097a": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "1.2.0", - "model_name": "LayoutModel", + "5fec533516cd41e4b751162b2211647d": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "LabelModel", "state": { - "width": "100%" + "layout": "IPY_MODEL_2f66df212cfe4412a0e6516a70954a42", + "style": "IPY_MODEL_4e74d6cda7c34c159207c5cc839c7d5c", + "value": "40 of 40" } }, - "8258a81d77bb4388ae4a05802864cd1b": { + "89f5f43766114c9bb0a58771953a990a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", - "model_name": "DescriptionStyleModel", + "model_name": "IntProgressModel", "state": { - "description_width": "" + "layout": "IPY_MODEL_eb00945fd0df49db89034b00c35314c1", + "max": 40, + "style": "IPY_MODEL_d05d4f8be9144f0f818288b91cdee119", + "value": 40 } }, - "a6915da1d72d4a1cb66f726cdab0f0a4": { + "974017b509c74f629f73c2aca5f6b9b0": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, - "c1f5e9270cec4b32a49a4eb556548f27": { + "9e160360e83042859ecb082693feaf2a": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", - "model_name": "IntProgressModel", + "model_name": "HBoxModel", "state": { - "layout": "IPY_MODEL_668394458c6f4bd9b474b6e8f1f79953", - "style": "IPY_MODEL_0b8e73aa95d3434d924e434442c9200a", - "value": 100 + "children": [ + "IPY_MODEL_89f5f43766114c9bb0a58771953a990a" + ], + "layout": "IPY_MODEL_cffd23c0b7db49fc88e9d84742159fdb" } }, - "cc47fc2aef894beea032561e0fb2b907": { + "cffd23c0b7db49fc88e9d84742159fdb": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": {} + }, + "d03eed55e94b4021b2cb7eac8e6f1714": { "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_974017b509c74f629f73c2aca5f6b9b0", + "style": "IPY_MODEL_0f4b46f884744fb2a9af85323c8c6e5a", + "value": "FPS: 3.2 (0.0 s remaining)" } }, - "d4647098402041b9ba1ba4a985d70ebe": { + "d05d4f8be9144f0f818288b91cdee119": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", - "model_name": "HBoxModel", + "model_name": "ProgressStyleModel", "state": { - "children": [ - "IPY_MODEL_c1f5e9270cec4b32a49a4eb556548f27" - ], - "layout": "IPY_MODEL_5859f221d3f2460e9b12702fd0174b1b" + "description_width": "" } }, - "e2648563c21740649aac4fab71e0336a": { + "eb00945fd0df49db89034b00c35314c1": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { - "justify_content": "space-between" + "width": "100%" } }, - "ee4e11a7c9744f61a1cb61bb2a09abfd": { + "ec6abc515de74c02b614d8d95363b33f": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "VBoxModel", "state": { "children": [ - "IPY_MODEL_fcd02bff60a54fe0bec36b8c881ecce8", - "IPY_MODEL_d4647098402041b9ba1ba4a985d70ebe" + "IPY_MODEL_ff97b709db8c4014a0f765d2884243b2", + "IPY_MODEL_9e160360e83042859ecb082693feaf2a" ], - "layout": "IPY_MODEL_822cf8e1679c49d491cca955c7a9097a" + "layout": "IPY_MODEL_07fe47c6bde44a0bbbb365b4a61e3bc8" } }, - "fcd02bff60a54fe0bec36b8c881ecce8": { + "ff97b709db8c4014a0f765d2884243b2": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "children": [ - "IPY_MODEL_217f95336aad4e5a9d7fb45521ee7a03", - "IPY_MODEL_cc47fc2aef894beea032561e0fb2b907" + "IPY_MODEL_d03eed55e94b4021b2cb7eac8e6f1714", + "IPY_MODEL_5fec533516cd41e4b751162b2211647d" ], - "layout": "IPY_MODEL_e2648563c21740649aac4fab71e0336a" + "layout": "IPY_MODEL_12be6b61cd914abd925398da70444e80" } } }, From e553f34a2917d5acfc488dc010b0055b0e93be5e Mon Sep 17 00:00:00 2001 From: robbibt Date: Mon, 23 May 2022 05:08:14 +0000 Subject: [PATCH 4/5] Add longer timeout to tests --- Beginners_guide/04_Loading_data.ipynb | 664 ++++++++++++------ .../01_Jupyter_notebooks_test.py | 2 +- Tests/Beginners_guide/02_DEA_test.py | 2 +- .../03_Products_and_measurements_test.py | 2 +- Tests/Beginners_guide/04_Loading_data_test.py | 2 +- .../Beginners_guide/06_Basic_analysis_test.py | 2 +- .../Beginners_guide/07_Intro_to_numpy_test.py | 2 +- .../Animated_timeseries_test.py | 2 +- .../Calculating_band_indices_test.py | 2 +- .../Contour_extraction_test.py | 2 +- .../Exporting_GeoTIFFs_test.py | 2 +- .../Generating_composites_test.py | 2 +- .../Polygon_drill_test.py | 2 +- .../Rasterize_vectorize_test.py | 2 +- .../Tidal_modelling_test.py | 2 +- .../Using_load_ard_test.py | 2 +- 16 files changed, 452 insertions(+), 242 deletions(-) diff --git a/Beginners_guide/04_Loading_data.ipynb b/Beginners_guide/04_Loading_data.ipynb index 15441eec0..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": "ec6abc515de74c02b614d8d95363b33f", + "model_id": "3b377ce9e1644633a3ac066a2abaf588", "version_major": 2, "version_minor": 0 }, @@ -6123,27 +6123,52 @@ " fill: currentColor;\n", "}\n", "
    <xarray.Dataset>\n",
    -       "Dimensions:      (time: 2, y: 424, x: 384)\n",
    +       "Dimensions:      (time: 5, y: 424, x: 384)\n",
            "Coordinates:\n",
    -       "  * time         (time) datetime64[ns] 2016-07-01T23:59:59.999999 2017-07-02T...\n",
    +       "  * time         (time) datetime64[ns] 2013-07-02T11:59:59.999999 ... 2017-07...\n",
            "  * y            (y) float64 -3.156e+06 -3.156e+06 ... -3.168e+06 -3.168e+06\n",
            "  * x            (x) float64 2.067e+06 2.067e+06 ... 2.079e+06 2.079e+06\n",
            "    spatial_ref  int32 3577\n",
            "Data variables:\n",
    -       "    blue         (time, y, x) int16 479 478 476 481 484 ... 350 351 311 296 292\n",
    -       "    green        (time, y, x) int16 505 504 506 510 511 ... 526 531 450 392 391\n",
    -       "    red          (time, y, x) int16 215 215 215 221 225 ... 407 402 351 337 340\n",
    -       "    nir          (time, y, x) int16 90 87 88 91 95 ... 2808 2889 2557 2344 2403\n",
    -       "    swir1        (time, y, x) int16 50 49 49 51 54 ... 1394 1397 1127 1009 1089\n",
    -       "    swir2        (time, y, x) int16 40 40 39 41 44 44 ... 661 650 521 465 495\n",
    -       "    sdev         (time, y, x) float32 0.003809 0.005104 ... 0.001669 0.002302\n",
    -       "    edev         (time, y, x) float32 136.6 141.2 139.9 ... 220.8 205.4 237.7\n",
    -       "    bcdev        (time, y, x) float32 0.1048 0.1089 0.1113 ... 0.04438 0.05313\n",
    -       "    count        (time, y, x) int16 17 17 17 17 17 17 17 ... 17 17 15 14 14 14\n",
    +       "    blue         (time, y, x) int16 490 506 504 497 498 ... 350 351 311 296 292\n",
    +       "    green        (time, y, x) int16 537 557 558 548 536 ... 526 531 450 392 391\n",
    +       "    red          (time, y, x) int16 253 273 275 269 268 ... 407 402 351 337 340\n",
    +       "    nir          (time, y, x) int16 93 106 104 100 108 ... 2889 2557 2344 2403\n",
    +       "    swir1        (time, y, x) int16 51 61 62 58 68 ... 1394 1397 1127 1009 1089\n",
    +       "    swir2        (time, y, x) int16 41 48 48 47 55 49 ... 661 650 521 465 495\n",
    +       "    sdev         (time, y, x) float32 0.003682 0.004547 ... 0.001669 0.002302\n",
    +       "    edev         (time, y, x) float32 142.1 160.1 159.9 ... 220.8 205.4 237.7\n",
    +       "    bcdev        (time, y, x) float32 0.1025 0.1248 0.1216 ... 0.04438 0.05313\n",
    +       "    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", - "Dimensions: (time: 2, y: 424, x: 384)\n", + "Dimensions: (time: 5, y: 424, x: 384)\n", "Coordinates:\n", - " * time (time) datetime64[ns] 2016-07-01T23:59:59.999999 2017-07-02T...\n", + " * time (time) datetime64[ns] 2013-07-02T11:59:59.999999 ... 2017-07...\n", " * y (y) float64 -3.156e+06 -3.156e+06 ... -3.168e+06 -3.168e+06\n", " * x (x) float64 2.067e+06 2.067e+06 ... 2.079e+06 2.079e+06\n", " spatial_ref int32 3577\n", "Data variables:\n", - " blue (time, y, x) int16 479 478 476 481 484 ... 350 351 311 296 292\n", - " green (time, y, x) int16 505 504 506 510 511 ... 526 531 450 392 391\n", - " red (time, y, x) int16 215 215 215 221 225 ... 407 402 351 337 340\n", - " nir (time, y, x) int16 90 87 88 91 95 ... 2808 2889 2557 2344 2403\n", - " swir1 (time, y, x) int16 50 49 49 51 54 ... 1394 1397 1127 1009 1089\n", - " swir2 (time, y, x) int16 40 40 39 41 44 44 ... 661 650 521 465 495\n", - " sdev (time, y, x) float32 0.003809 0.005104 ... 0.001669 0.002302\n", - " edev (time, y, x) float32 136.6 141.2 139.9 ... 220.8 205.4 237.7\n", - " bcdev (time, y, x) float32 0.1048 0.1089 0.1113 ... 0.04438 0.05313\n", - " count (time, y, x) int16 17 17 17 17 17 17 17 ... 17 17 15 14 14 14\n", + " blue (time, y, x) int16 490 506 504 497 498 ... 350 351 311 296 292\n", + " green (time, y, x) int16 537 557 558 548 536 ... 526 531 450 392 391\n", + " red (time, y, x) int16 253 273 275 269 268 ... 407 402 351 337 340\n", + " nir (time, y, x) int16 93 106 104 100 108 ... 2889 2557 2344 2403\n", + " swir1 (time, y, x) int16 51 61 62 58 68 ... 1394 1397 1127 1009 1089\n", + " swir2 (time, y, x) int16 41 48 48 47 55 49 ... 661 650 521 465 495\n", + " sdev (time, y, x) float32 0.003682 0.004547 ... 0.001669 0.002302\n", + " edev (time, y, x) float32 142.1 160.1 159.9 ... 220.8 205.4 237.7\n", + " bcdev (time, y, x) float32 0.1025 0.1248 0.1216 ... 0.04438 0.05313\n", + " 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" @@ -6353,7 +6564,7 @@ "source": [ "query = {\"x\": (153.3, 153.4),\n", " \"y\": (-27.5, -27.6),\n", - " \"time\": (\"2016\", \"2017\")}\n", + " \"time\": (\"2013\", \"2017\")}\n", "\n", "ds_progress = dc.load(product=\"ga_ls8c_nbart_gm_cyear_3\",\n", " progress_cbk=with_ui_cbk(),\n", @@ -6462,107 +6673,111 @@ "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { - "07fe47c6bde44a0bbbb365b4a61e3bc8": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "1.2.0", - "model_name": "LayoutModel", + "2bb6cd6b3ae24e62bad299675e0b8df3": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "LabelModel", "state": { - "width": "100%" + "layout": "IPY_MODEL_913a803f0e6443429d8e6d629799d016", + "style": "IPY_MODEL_c292a651c19a48079e8005d6539716fc", + "value": "100 of 100" } }, - "0f4b46f884744fb2a9af85323c8c6e5a": { + "2c96bbdebc504f209c8396526a04292e": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", - "model_name": "DescriptionStyleModel", + "model_name": "HBoxModel", "state": { - "description_width": "" + "children": [ + "IPY_MODEL_ba6b3d1f824d45c0aa095881ff23cbc9", + "IPY_MODEL_2bb6cd6b3ae24e62bad299675e0b8df3" + ], + "layout": "IPY_MODEL_62c169993efd49568251d9a19bbbaa87" } }, - "12be6b61cd914abd925398da70444e80": { + "2f8bf8f637024b4bbf551f72fcce88ee": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": { - "justify_content": "space-between" + "width": "100%" } }, - "2f66df212cfe4412a0e6516a70954a42": { + "33bb73de6c9b41dd9ad11152d7df6e0e": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, - "4e74d6cda7c34c159207c5cc839c7d5c": { + "3b377ce9e1644633a3ac066a2abaf588": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", - "model_name": "DescriptionStyleModel", + "model_name": "VBoxModel", "state": { - "description_width": "" + "children": [ + "IPY_MODEL_2c96bbdebc504f209c8396526a04292e", + "IPY_MODEL_f8d38ebd146c4724a9dc9d03f64a1220" + ], + "layout": "IPY_MODEL_d55147b344224e7da3aa68bd019a4f60" } }, - "5fec533516cd41e4b751162b2211647d": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "1.5.0", - "model_name": "LabelModel", + "62c169993efd49568251d9a19bbbaa87": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", "state": { - "layout": "IPY_MODEL_2f66df212cfe4412a0e6516a70954a42", - "style": "IPY_MODEL_4e74d6cda7c34c159207c5cc839c7d5c", - "value": "40 of 40" + "justify_content": "space-between" } }, - "89f5f43766114c9bb0a58771953a990a": { + "729bcfa54e6148dd9c349f67d67a95d2": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "IntProgressModel", "state": { - "layout": "IPY_MODEL_eb00945fd0df49db89034b00c35314c1", - "max": 40, - "style": "IPY_MODEL_d05d4f8be9144f0f818288b91cdee119", - "value": 40 + "layout": "IPY_MODEL_2f8bf8f637024b4bbf551f72fcce88ee", + "style": "IPY_MODEL_d8ae933b9e764c47b60c3a5e339b51f5", + "value": 100 } }, - "974017b509c74f629f73c2aca5f6b9b0": { + "913a803f0e6443429d8e6d629799d016": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.2.0", "model_name": "LayoutModel", "state": {} }, - "9e160360e83042859ecb082693feaf2a": { + "9ee158f5c70145c1b3b505a5ba997baa": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", - "model_name": "HBoxModel", + "model_name": "DescriptionStyleModel", "state": { - "children": [ - "IPY_MODEL_89f5f43766114c9bb0a58771953a990a" - ], - "layout": "IPY_MODEL_cffd23c0b7db49fc88e9d84742159fdb" + "description_width": "" } }, - "cffd23c0b7db49fc88e9d84742159fdb": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "1.2.0", - "model_name": "LayoutModel", - "state": {} - }, - "d03eed55e94b4021b2cb7eac8e6f1714": { + "ba6b3d1f824d45c0aa095881ff23cbc9": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "LabelModel", "state": { - "layout": "IPY_MODEL_974017b509c74f629f73c2aca5f6b9b0", - "style": "IPY_MODEL_0f4b46f884744fb2a9af85323c8c6e5a", - "value": "FPS: 3.2 (0.0 s remaining)" + "layout": "IPY_MODEL_33bb73de6c9b41dd9ad11152d7df6e0e", + "style": "IPY_MODEL_9ee158f5c70145c1b3b505a5ba997baa", + "value": "FPS: 3.5 (0.0 s remaining)" } }, - "d05d4f8be9144f0f818288b91cdee119": { + "c292a651c19a48079e8005d6539716fc": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", - "model_name": "ProgressStyleModel", + "model_name": "DescriptionStyleModel", "state": { "description_width": "" } }, - "eb00945fd0df49db89034b00c35314c1": { + "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", @@ -6570,28 +6785,23 @@ "width": "100%" } }, - "ec6abc515de74c02b614d8d95363b33f": { + "d8ae933b9e764c47b60c3a5e339b51f5": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", - "model_name": "VBoxModel", + "model_name": "ProgressStyleModel", "state": { - "children": [ - "IPY_MODEL_ff97b709db8c4014a0f765d2884243b2", - "IPY_MODEL_9e160360e83042859ecb082693feaf2a" - ], - "layout": "IPY_MODEL_07fe47c6bde44a0bbbb365b4a61e3bc8" + "description_width": "" } }, - "ff97b709db8c4014a0f765d2884243b2": { + "f8d38ebd146c4724a9dc9d03f64a1220": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.5.0", "model_name": "HBoxModel", "state": { "children": [ - "IPY_MODEL_d03eed55e94b4021b2cb7eac8e6f1714", - "IPY_MODEL_5fec533516cd41e4b751162b2211647d" + "IPY_MODEL_729bcfa54e6148dd9c349f67d67a95d2" ], - "layout": "IPY_MODEL_12be6b61cd914abd925398da70444e80" + "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 From 88fed466c38641e231ee294be116ae71c68052e0 Mon Sep 17 00:00:00 2001 From: "pin.jin@ga.gov.au" Date: Mon, 23 May 2022 05:16:09 +0000 Subject: [PATCH 5/5] remove docker caching --- .github/workflows/test_notebooks.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test_notebooks.yml b/.github/workflows/test_notebooks.yml index 799638a6e..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: | 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