From 66fb08d6207987ea2209e9322f9556f87f2ebf41 Mon Sep 17 00:00:00 2001 From: Robbi Bishop-Taylor Date: Tue, 9 Jul 2024 12:16:02 +1000 Subject: [PATCH 01/20] Create test_changed_notebooks.yaml --- .github/workflows/test_changed_notebooks.yaml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/test_changed_notebooks.yaml diff --git a/.github/workflows/test_changed_notebooks.yaml b/.github/workflows/test_changed_notebooks.yaml new file mode 100644 index 000000000..23cce711c --- /dev/null +++ b/.github/workflows/test_changed_notebooks.yaml @@ -0,0 +1,49 @@ +name: Test Modified Files + +on: + push: + branches: [ changed_files ] + pull_request: + branches: [ changed_files ] + +jobs: + test_files: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + path: dea-notebooks + + # - name: Set up Python + # uses: actions/setup-python@v4 + # with: + # python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest pytest-nbval jupyter + + - name: Get changed notebook files + id: changed-notebooks + uses: tj-actions/changed-files@v44 + with: + files: '**/*.ipynb' + + - name: Get changed Python files + id: changed-py-files + uses: tj-actions/changed-files@v44 + with: + files: '**/*.py' + + - name: Run pytest on changed notebooks + if: steps.changed-notebooks.outputs.any_changed == 'true' + run: | + pytest --nbval-lax ${{ steps.changed-notebooks.outputs.all_changed_files }} + + - name: Run pytest on Python files + if: steps.changed-py-files.outputs.any_changed == 'true' + run: | + pytest Tests/dea_tools From 908b92536c6cb84841cd6f13a41d0d0055a8d98d Mon Sep 17 00:00:00 2001 From: Robbi Bishop-Taylor Date: Tue, 9 Jul 2024 12:22:55 +1000 Subject: [PATCH 02/20] Update test_changed_notebooks.yaml --- .github/workflows/test_changed_notebooks.yaml | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test_changed_notebooks.yaml b/.github/workflows/test_changed_notebooks.yaml index 23cce711c..981cd3698 100644 --- a/.github/workflows/test_changed_notebooks.yaml +++ b/.github/workflows/test_changed_notebooks.yaml @@ -13,7 +13,6 @@ jobs: steps: - uses: actions/checkout@v3 with: - fetch-depth: 0 path: dea-notebooks # - name: Set up Python @@ -21,29 +20,33 @@ jobs: # with: # python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install pytest pytest-nbval jupyter - - name: Get changed notebook files id: changed-notebooks uses: tj-actions/changed-files@v44 with: files: '**/*.ipynb' - + separator: ' ' + + - name: Print changed notebook files + if: steps.changed-notebooks.outputs.any_changed == 'true' + run: | + echo "Changed notebook files:" + echo "${{ steps.changed-notebooks.outputs.all_changed_files }}" + - name: Get changed Python files id: changed-py-files uses: tj-actions/changed-files@v44 with: files: '**/*.py' - - - name: Run pytest on changed notebooks - if: steps.changed-notebooks.outputs.any_changed == 'true' - run: | - pytest --nbval-lax ${{ steps.changed-notebooks.outputs.all_changed_files }} - - - name: Run pytest on Python files + separator: ' ' + + - name: Print changed Python files if: steps.changed-py-files.outputs.any_changed == 'true' run: | - pytest Tests/dea_tools + echo "Changed Python files:" + echo "${{ steps.changed-py-files.outputs.all_changed_files }}" + + # - name: Run pytest on Python files + # if: steps.changed-py-files.outputs.any_changed == 'true' + # run: | + # pytest Tests/dea_tools From 9aa49df346dea753966fc5d6192fabd4a70e0211 Mon Sep 17 00:00:00 2001 From: Robbi Bishop-Taylor Date: Tue, 9 Jul 2024 12:23:56 +1000 Subject: [PATCH 03/20] Update test_changed_notebooks.yaml --- .github/workflows/test_changed_notebooks.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test_changed_notebooks.yaml b/.github/workflows/test_changed_notebooks.yaml index 981cd3698..058d3fceb 100644 --- a/.github/workflows/test_changed_notebooks.yaml +++ b/.github/workflows/test_changed_notebooks.yaml @@ -12,8 +12,6 @@ jobs: steps: - uses: actions/checkout@v3 - with: - path: dea-notebooks # - name: Set up Python # uses: actions/setup-python@v4 From 569ce354e64027837114278233284786e35152c1 Mon Sep 17 00:00:00 2001 From: Robbi Bishop-Taylor Date: Tue, 9 Jul 2024 12:26:21 +1000 Subject: [PATCH 04/20] Update test_changed_notebooks.yaml --- .github/workflows/test_changed_notebooks.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test_changed_notebooks.yaml b/.github/workflows/test_changed_notebooks.yaml index 058d3fceb..706c599a7 100644 --- a/.github/workflows/test_changed_notebooks.yaml +++ b/.github/workflows/test_changed_notebooks.yaml @@ -12,6 +12,8 @@ jobs: steps: - uses: actions/checkout@v3 + with: + fetch-depth: 10 # - name: Set up Python # uses: actions/setup-python@v4 From c2d13eef8b3b97debc91116de946d409f203d84f Mon Sep 17 00:00:00 2001 From: Robbi Bishop-Taylor Date: Tue, 9 Jul 2024 12:26:43 +1000 Subject: [PATCH 05/20] Update coastal.py --- Tools/dea_tools/coastal.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Tools/dea_tools/coastal.py b/Tools/dea_tools/coastal.py index e5b7fc9e0..8dacb532b 100644 --- a/Tools/dea_tools/coastal.py +++ b/Tools/dea_tools/coastal.py @@ -19,6 +19,7 @@ Last modified: June 2024 """ +# test # Import required packages import os From bfafcdcda4a845600f4565da7b1bf7d4bbc4b6c5 Mon Sep 17 00:00:00 2001 From: Robbi Bishop-Taylor Date: Tue, 9 Jul 2024 12:30:20 +1000 Subject: [PATCH 06/20] Update test_changed_notebooks.yaml --- .github/workflows/test_changed_notebooks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_changed_notebooks.yaml b/.github/workflows/test_changed_notebooks.yaml index 706c599a7..e52077df1 100644 --- a/.github/workflows/test_changed_notebooks.yaml +++ b/.github/workflows/test_changed_notebooks.yaml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - fetch-depth: 10 + fetch-depth: 25 # - name: Set up Python # uses: actions/setup-python@v4 From c539f1b22d17b6c2c921c214c2eaba89c58d7915 Mon Sep 17 00:00:00 2001 From: Robbi Bishop-Taylor Date: Tue, 9 Jul 2024 12:32:19 +1000 Subject: [PATCH 07/20] Update test_changed_notebooks.yaml --- .github/workflows/test_changed_notebooks.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test_changed_notebooks.yaml b/.github/workflows/test_changed_notebooks.yaml index e52077df1..ff9331a59 100644 --- a/.github/workflows/test_changed_notebooks.yaml +++ b/.github/workflows/test_changed_notebooks.yaml @@ -25,6 +25,7 @@ jobs: uses: tj-actions/changed-files@v44 with: files: '**/*.ipynb' + skip_initial_fetch: 'true' separator: ' ' - name: Print changed notebook files @@ -38,6 +39,7 @@ jobs: uses: tj-actions/changed-files@v44 with: files: '**/*.py' + skip_initial_fetch: 'true' separator: ' ' - name: Print changed Python files From 94b2fe6f09eab1fb4f4159ba6728921d6a60028f Mon Sep 17 00:00:00 2001 From: Robbi Bishop-Taylor Date: Tue, 9 Jul 2024 12:33:43 +1000 Subject: [PATCH 08/20] Update test_changed_notebooks.yaml --- .github/workflows/test_changed_notebooks.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test_changed_notebooks.yaml b/.github/workflows/test_changed_notebooks.yaml index ff9331a59..4078d5a36 100644 --- a/.github/workflows/test_changed_notebooks.yaml +++ b/.github/workflows/test_changed_notebooks.yaml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - fetch-depth: 25 + fetch-depth: 100 # - name: Set up Python # uses: actions/setup-python@v4 @@ -25,7 +25,6 @@ jobs: uses: tj-actions/changed-files@v44 with: files: '**/*.ipynb' - skip_initial_fetch: 'true' separator: ' ' - name: Print changed notebook files @@ -39,7 +38,6 @@ jobs: uses: tj-actions/changed-files@v44 with: files: '**/*.py' - skip_initial_fetch: 'true' separator: ' ' - name: Print changed Python files From 8c5a67d264afd84e0f89bd8b3bff5f02caf231b2 Mon Sep 17 00:00:00 2001 From: Robbi Bishop-Taylor Date: Tue, 9 Jul 2024 12:42:29 +1000 Subject: [PATCH 09/20] Update test_changed_notebooks.yaml --- .github/workflows/test_changed_notebooks.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_changed_notebooks.yaml b/.github/workflows/test_changed_notebooks.yaml index 4078d5a36..127cf7ead 100644 --- a/.github/workflows/test_changed_notebooks.yaml +++ b/.github/workflows/test_changed_notebooks.yaml @@ -12,8 +12,8 @@ jobs: steps: - uses: actions/checkout@v3 - with: - fetch-depth: 100 + # with: + # fetch-depth: 100 # - name: Set up Python # uses: actions/setup-python@v4 From 6928992cedd886cc34406359d631549904de32ec Mon Sep 17 00:00:00 2001 From: Robbi Bishop-Taylor Date: Tue, 9 Jul 2024 13:03:01 +1000 Subject: [PATCH 10/20] Update test_changed_notebooks.yaml --- .github/workflows/test_changed_notebooks.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_changed_notebooks.yaml b/.github/workflows/test_changed_notebooks.yaml index 127cf7ead..1b83deca6 100644 --- a/.github/workflows/test_changed_notebooks.yaml +++ b/.github/workflows/test_changed_notebooks.yaml @@ -12,8 +12,8 @@ jobs: steps: - uses: actions/checkout@v3 - # with: - # fetch-depth: 100 + with: + fetch-depth: 0 # - name: Set up Python # uses: actions/setup-python@v4 From 590b85bad30bf08d1a8b308c7be57a3736a4f94c Mon Sep 17 00:00:00 2001 From: Robbi Bishop-Taylor Date: Tue, 9 Jul 2024 13:05:10 +1000 Subject: [PATCH 11/20] Update test_changed_notebooks.yaml --- .github/workflows/test_changed_notebooks.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_changed_notebooks.yaml b/.github/workflows/test_changed_notebooks.yaml index 1b83deca6..b726d6d23 100644 --- a/.github/workflows/test_changed_notebooks.yaml +++ b/.github/workflows/test_changed_notebooks.yaml @@ -1,8 +1,6 @@ name: Test Modified Files on: - push: - branches: [ changed_files ] pull_request: branches: [ changed_files ] @@ -12,8 +10,8 @@ jobs: steps: - uses: actions/checkout@v3 - with: - fetch-depth: 0 + # with: + # fetch-depth: 0 # - name: Set up Python # uses: actions/setup-python@v4 From 39a5b99f6952ff7d3e36ece8aba187d3228e717a Mon Sep 17 00:00:00 2001 From: Robbi Bishop-Taylor Date: Tue, 9 Jul 2024 13:05:29 +1000 Subject: [PATCH 12/20] Update coastal.py --- Tools/dea_tools/coastal.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/Tools/dea_tools/coastal.py b/Tools/dea_tools/coastal.py index 8dacb532b..f3035d25f 100644 --- a/Tools/dea_tools/coastal.py +++ b/Tools/dea_tools/coastal.py @@ -19,8 +19,6 @@ Last modified: June 2024 """ -# test - # Import required packages import os import pyproj From 2bea3c0a29d044533b954d1043fddaeb99166592 Mon Sep 17 00:00:00 2001 From: Robbi Bishop-Taylor Date: Tue, 9 Jul 2024 13:06:55 +1000 Subject: [PATCH 13/20] Update test_changed_notebooks.yaml --- .github/workflows/test_changed_notebooks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_changed_notebooks.yaml b/.github/workflows/test_changed_notebooks.yaml index b726d6d23..5543db7cd 100644 --- a/.github/workflows/test_changed_notebooks.yaml +++ b/.github/workflows/test_changed_notebooks.yaml @@ -2,7 +2,7 @@ name: Test Modified Files on: pull_request: - branches: [ changed_files ] + branches: [ develop ] jobs: test_files: From ceae2d52df3f9c855e6d6989fce10be6b1de5272 Mon Sep 17 00:00:00 2001 From: Robbi Bishop-Taylor Date: Thu, 29 Aug 2024 16:02:51 +1000 Subject: [PATCH 14/20] Test changing notebook --- How_to_guides/Calculating_band_indices.ipynb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/How_to_guides/Calculating_band_indices.ipynb b/How_to_guides/Calculating_band_indices.ipynb index ab0330cd8..583fa5a5f 100644 --- a/How_to_guides/Calculating_band_indices.ipynb +++ b/How_to_guides/Calculating_band_indices.ipynb @@ -18,7 +18,9 @@ "source": [ "## Background\n", "Remote sensing indices are combinations of spectral bands used to highlight features in the data and the underlying landscape.\n", - "Using Digital Earth Australia's archive of analysis-ready satellite data, we can easily calculate a wide range of remote sensing indices that can be used to assist in mapping and monitoring features like vegetation and water consistently through time, or as inputs to machine learning or classification algorithms.\n" + "Using Digital Earth Australia's archive of analysis-ready satellite data, we can easily calculate a wide range of remote sensing indices that can be used to assist in mapping and monitoring features like vegetation and water consistently through time, or as inputs to machine learning or classification algorithms.\n", + "\n", + "Test change\n" ] }, { From 578dc8d69ca17e64435959b6b9dcd540fc98bd1f Mon Sep 17 00:00:00 2001 From: Robbi Bishop-Taylor Date: Thu, 29 Aug 2024 16:16:50 +1000 Subject: [PATCH 15/20] Test --- .github/workflows/test_changed_notebooks.yaml | 130 +++++++++++++----- .github/workflows/test_notebooks.yml | 104 +++++++------- 2 files changed, 144 insertions(+), 90 deletions(-) diff --git a/.github/workflows/test_changed_notebooks.yaml b/.github/workflows/test_changed_notebooks.yaml index 5543db7cd..241634a67 100644 --- a/.github/workflows/test_changed_notebooks.yaml +++ b/.github/workflows/test_changed_notebooks.yaml @@ -4,47 +4,101 @@ on: pull_request: branches: [ develop ] +permissions: + id-token: write # Required for OIDC authentication to AWS + contents: read + jobs: test_files: runs-on: ubuntu-latest + + # Automatically activate our mamba environment when it's ready + defaults: + run: + shell: bash -l {0} steps: - - uses: actions/checkout@v3 - # with: - # fetch-depth: 0 - - # - name: Set up Python - # uses: actions/setup-python@v4 - # with: - # python-version: '3.x' - - - name: Get changed notebook files - id: changed-notebooks - uses: tj-actions/changed-files@v44 - with: - files: '**/*.ipynb' - separator: ' ' - - - name: Print changed notebook files - if: steps.changed-notebooks.outputs.any_changed == 'true' - run: | - echo "Changed notebook files:" - echo "${{ steps.changed-notebooks.outputs.all_changed_files }}" - - - name: Get changed Python files - id: changed-py-files - uses: tj-actions/changed-files@v44 - with: - files: '**/*.py' - separator: ' ' - - - name: Print changed Python files - if: steps.changed-py-files.outputs.any_changed == 'true' - run: | - echo "Changed Python files:" - echo "${{ steps.changed-py-files.outputs.all_changed_files }}" + - uses: actions/checkout@v4 + with: + path: dea-notebooks + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: arn:aws:iam::538673716275:role/github-actions-role-readonly + aws-region: ap-southeast-2 + role-duration-seconds: 7200 # 2 hours + + - name: Copy tide modelling files with the AWS CLI + run: aws s3 sync s3://dea-non-public-data/tide_models/tide_models tide_models + + - name: Login to Amazon ECR Private + id: login-ecr + uses: aws-actions/amazon-ecr-login@v2 + + - name: Pull dea-sandbox image from ECR + run: | + docker pull 538673716275.dkr.ecr.ap-southeast-2.amazonaws.com/geoscienceaustralia/sandbox:stable + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: arn:aws:iam::060378307146:role/github-actions-dea-notebooks--sandbox + aws-region: ap-southeast-2 + role-duration-seconds: 7200 # 2 hours + + - name: Get Database Credentials + run: | + username_password=$(aws ssm get-parameter --name /dea-sandbox-eks/sandbox_reader/db.creds --with-decryption --query Parameter.Value --output text) + echo DATACUBE_DB_URL=postgresql://${username_password}@localhost:5432/odc >> $GITHUB_ENV + + - name: Open Port Forward to RDS + run: | + npx basti connect \ + --custom-target-vpc vpc-086904199e505c1f6 \ + --custom-target-host db-aurora-dea-sandbox-eks-1.cos5zfpkso9m.ap-southeast-2.rds.amazonaws.com \ + --custom-target-port 5432 \ + --local-port 5432 & + npx wait-on --timeout 120000 --interval 1000 tcp:127.0.0.1:5432 + echo "PGPORT=5432" >> $GITHUB_ENV + echo "PGHOST=localhost" >> $GITHUB_ENV + + - name: Get changed notebook files + id: changed-notebooks + uses: tj-actions/changed-files@v44 + with: + files: '**/*.ipynb' + separator: ' ' - # - name: Run pytest on Python files - # if: steps.changed-py-files.outputs.any_changed == 'true' - # run: | - # pytest Tests/dea_tools + - name: Print changed notebook files + if: steps.changed-notebooks.outputs.any_changed == 'true' + run: | + echo "Changed notebook files:" + echo "${{ steps.changed-notebooks.outputs.all_changed_files }}" + + - name: Run the Notebook tests + if: steps.changed-notebooks.outputs.any_changed == 'true' + run: | + sudo chown -R 1000:100 ./dea-notebooks + cd ./dea-notebooks + docker run --rm \ + --net=host \ + --env DATACUBE_DB_URL \ + --env AWS_SESSION_TOKEN \ + --env AWS_REGION \ + --env AWS_ACCESS_KEY_ID \ + --env AWS_SECRET_ACCESS_KEY \ + --env AWS_SESSION_TOKEN \ + --volume ${GITHUB_WORKSPACE}/dea-notebooks:/home/jovyan/dea-notebooks \ + --volume ${GITHUB_WORKSPACE}/tide_models:/var/share/tide_models \ + --env GDAL_HTTP_MAX_RETRY=3 \ + --entrypoint /bin/bash \ + 538673716275.dkr.ecr.ap-southeast-2.amazonaws.com/geoscienceaustralia/sandbox:stable \ + -c " + set -ex + set -o pipefail + cd /home/jovyan/dea-notebooks + pip3 install ./Tools + pytest Tests/dea_tools + pytest --durations=10 --nbval-lax ${{ steps.changed-notebooks.outputs.all_changed_files }} + " \ No newline at end of file diff --git a/.github/workflows/test_notebooks.yml b/.github/workflows/test_notebooks.yml index 045d60f09..fb7c465ac 100644 --- a/.github/workflows/test_notebooks.yml +++ b/.github/workflows/test_notebooks.yml @@ -1,53 +1,53 @@ -name: Test notebooks - -on: - push: - branches: [ develop, stable, nbtests ] - paths-ignore: - - '**/*.md' # ignore markdown files - - '**/*.rst' # ignore restructured text files - - '.github/**' # ignore anything in .github folder - - '!.github/workflows/test_notebooks.yml' # except test_notebooks.yml - pull_request: - branches: [ develop, stable ] - paths-ignore: - - '**/*.md' - - '**/*.rst' - - '.github/**' - - '!.github/workflows/test_notebooks.yml' - -permissions: - id-token: write # This is required for requesting the JSON web token - contents: read # This is required for actions/checkout - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - path: dea-notebooks - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - role-to-assume: arn:aws:iam::538673716275:role/github-actions-role-readonly - aws-region: ap-southeast-2 - - - name: Copy tide modelling files with the AWS CLI - run: | - aws s3 sync s3://dea-non-public-data/tide_models/tide_models/fes2014 tide_models/fes2014 - aws s3 sync s3://dea-non-public-data/tide_models/tide_models/hamtide tide_models/hamtide - - - name: Login to Amazon ECR Private - id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 - - - name: Set up Datacube and test - run: | - sudo chown -R 1000:100 ./dea-notebooks - cd ./dea-notebooks - CURRENT_UID=1000:100 docker-compose up -d - docker-compose exec -T sandbox ./dea-notebooks/Tests/setup_test_datacube.sh - docker-compose exec -T sandbox ./dea-notebooks/Tests/test_notebooks.sh +# name: Test notebooks + +# on: +# push: +# branches: [ develop, stable, nbtests ] +# paths-ignore: +# - '**/*.md' # ignore markdown files +# - '**/*.rst' # ignore restructured text files +# - '.github/**' # ignore anything in .github folder +# - '!.github/workflows/test_notebooks.yml' # except test_notebooks.yml +# pull_request: +# branches: [ develop, stable ] +# paths-ignore: +# - '**/*.md' +# - '**/*.rst' +# - '.github/**' +# - '!.github/workflows/test_notebooks.yml' + +# permissions: +# id-token: write # This is required for requesting the JSON web token +# contents: read # This is required for actions/checkout + +# jobs: +# test: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v3 +# with: +# path: dea-notebooks + +# - name: Configure AWS credentials +# uses: aws-actions/configure-aws-credentials@v1 +# with: +# role-to-assume: arn:aws:iam::538673716275:role/github-actions-role-readonly +# aws-region: ap-southeast-2 + +# - name: Copy tide modelling files with the AWS CLI +# run: | +# aws s3 sync s3://dea-non-public-data/tide_models/tide_models/fes2014 tide_models/fes2014 +# aws s3 sync s3://dea-non-public-data/tide_models/tide_models/hamtide tide_models/hamtide + +# - name: Login to Amazon ECR Private +# id: login-ecr +# uses: aws-actions/amazon-ecr-login@v1 + +# - name: Set up Datacube and test +# run: | +# sudo chown -R 1000:100 ./dea-notebooks +# cd ./dea-notebooks +# CURRENT_UID=1000:100 docker-compose up -d +# docker-compose exec -T sandbox ./dea-notebooks/Tests/setup_test_datacube.sh +# docker-compose exec -T sandbox ./dea-notebooks/Tests/test_notebooks.sh From 262f3c11fc7b7cd5b13399abf21d5aa11c234c46 Mon Sep 17 00:00:00 2001 From: Robbi Bishop-Taylor Date: Thu, 29 Aug 2024 16:17:57 +1000 Subject: [PATCH 16/20] Remove old script --- .github/workflows/test_notebooks.yml | 53 ---------------------------- 1 file changed, 53 deletions(-) delete mode 100644 .github/workflows/test_notebooks.yml diff --git a/.github/workflows/test_notebooks.yml b/.github/workflows/test_notebooks.yml deleted file mode 100644 index fb7c465ac..000000000 --- a/.github/workflows/test_notebooks.yml +++ /dev/null @@ -1,53 +0,0 @@ - -# name: Test notebooks - -# on: -# push: -# branches: [ develop, stable, nbtests ] -# paths-ignore: -# - '**/*.md' # ignore markdown files -# - '**/*.rst' # ignore restructured text files -# - '.github/**' # ignore anything in .github folder -# - '!.github/workflows/test_notebooks.yml' # except test_notebooks.yml -# pull_request: -# branches: [ develop, stable ] -# paths-ignore: -# - '**/*.md' -# - '**/*.rst' -# - '.github/**' -# - '!.github/workflows/test_notebooks.yml' - -# permissions: -# id-token: write # This is required for requesting the JSON web token -# contents: read # This is required for actions/checkout - -# jobs: -# test: -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v3 -# with: -# path: dea-notebooks - -# - name: Configure AWS credentials -# uses: aws-actions/configure-aws-credentials@v1 -# with: -# role-to-assume: arn:aws:iam::538673716275:role/github-actions-role-readonly -# aws-region: ap-southeast-2 - -# - name: Copy tide modelling files with the AWS CLI -# run: | -# aws s3 sync s3://dea-non-public-data/tide_models/tide_models/fes2014 tide_models/fes2014 -# aws s3 sync s3://dea-non-public-data/tide_models/tide_models/hamtide tide_models/hamtide - -# - name: Login to Amazon ECR Private -# id: login-ecr -# uses: aws-actions/amazon-ecr-login@v1 - -# - name: Set up Datacube and test -# run: | -# sudo chown -R 1000:100 ./dea-notebooks -# cd ./dea-notebooks -# CURRENT_UID=1000:100 docker-compose up -d -# docker-compose exec -T sandbox ./dea-notebooks/Tests/setup_test_datacube.sh -# docker-compose exec -T sandbox ./dea-notebooks/Tests/test_notebooks.sh From a0066b958f9487892e74f15c017492c94cd27c3b Mon Sep 17 00:00:00 2001 From: Robbi Bishop-Taylor Date: Thu, 29 Aug 2024 16:18:43 +1000 Subject: [PATCH 17/20] Remove tide sync --- .github/workflows/test_changed_notebooks.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_changed_notebooks.yaml b/.github/workflows/test_changed_notebooks.yaml index 241634a67..4e31896d0 100644 --- a/.github/workflows/test_changed_notebooks.yaml +++ b/.github/workflows/test_changed_notebooks.yaml @@ -29,8 +29,8 @@ jobs: aws-region: ap-southeast-2 role-duration-seconds: 7200 # 2 hours - - name: Copy tide modelling files with the AWS CLI - run: aws s3 sync s3://dea-non-public-data/tide_models/tide_models tide_models + # - name: Copy tide modelling files with the AWS CLI + # run: aws s3 sync s3://dea-non-public-data/tide_models/tide_models tide_models - name: Login to Amazon ECR Private id: login-ecr From 847db4b466c55abf7d4c4310db56d1069c1de47b Mon Sep 17 00:00:00 2001 From: robbibt Date: Thu, 29 Aug 2024 06:27:04 +0000 Subject: [PATCH 18/20] Add change --- Beginners_guide/07_Intro_to_numpy.ipynb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Beginners_guide/07_Intro_to_numpy.ipynb b/Beginners_guide/07_Intro_to_numpy.ipynb index e0c6538f8..5848d375d 100644 --- a/Beginners_guide/07_Intro_to_numpy.ipynb +++ b/Beginners_guide/07_Intro_to_numpy.ipynb @@ -165,6 +165,15 @@ "a" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "1" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -1029,7 +1038,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -1043,7 +1052,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.10" + "version": "3.10.13" }, "widgets": { "application/vnd.jupyter.widget-state+json": { From 79c5fc904a689f9a88c5dc4308696109679ce3e9 Mon Sep 17 00:00:00 2001 From: Robbi Bishop-Taylor Date: Thu, 29 Aug 2024 16:40:35 +1000 Subject: [PATCH 19/20] Add tide model sync back --- .github/workflows/test_changed_notebooks.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_changed_notebooks.yaml b/.github/workflows/test_changed_notebooks.yaml index 4e31896d0..541017f58 100644 --- a/.github/workflows/test_changed_notebooks.yaml +++ b/.github/workflows/test_changed_notebooks.yaml @@ -29,8 +29,10 @@ jobs: aws-region: ap-southeast-2 role-duration-seconds: 7200 # 2 hours - # - name: Copy tide modelling files with the AWS CLI - # run: aws s3 sync s3://dea-non-public-data/tide_models/tide_models tide_models + - name: Copy tide modelling files with the AWS CLI + run: | + aws s3 sync s3://dea-non-public-data/tide_models/tide_models/fes2014 tide_models/fes2014 + aws s3 sync s3://dea-non-public-data/tide_models/tide_models/hamtide tide_models/hamtide - name: Login to Amazon ECR Private id: login-ecr From c75a86586acaf00d3a4899d9a8143895b2ff1596 Mon Sep 17 00:00:00 2001 From: Robbi Bishop-Taylor Date: Thu, 29 Aug 2024 16:43:08 +1000 Subject: [PATCH 20/20] Remove DEA Tools test --- .github/workflows/test_changed_notebooks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_changed_notebooks.yaml b/.github/workflows/test_changed_notebooks.yaml index 541017f58..351f3a866 100644 --- a/.github/workflows/test_changed_notebooks.yaml +++ b/.github/workflows/test_changed_notebooks.yaml @@ -101,6 +101,6 @@ jobs: set -o pipefail cd /home/jovyan/dea-notebooks pip3 install ./Tools - pytest Tests/dea_tools + # pytest Tests/dea_tools pytest --durations=10 --nbval-lax ${{ steps.changed-notebooks.outputs.all_changed_files }} " \ No newline at end of file