From ad47c2117a427f57faa6d06031c915cae5f98285 Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Fri, 12 May 2023 16:51:16 -0500 Subject: [PATCH 01/23] Include a reusable workflow test. --- .../anchored_u24_workflow_before_release.yaml | 0 .../anchored_u24_workflow_release_call.yaml | 0 .../anchored_u24_workflow_tag_to_release.yaml | 0 .github/{ => .disable}/.staging_workflows/normalize.sh | 0 .github/{ => .disable}/.test/.secrets | 0 .github/{ => .disable}/.test/README.md | 0 .github/{ => .disable}/ISSUE_TEMPLATE/bug_report.md | 0 .github/{ => .disable}/ISSUE_TEMPLATE/config.yml | 0 .../{ => .disable}/ISSUE_TEMPLATE/feature_request.md | 0 .github/{ => .disable}/make-dev.sh | 0 .github/{ => .disable}/make-prod.sh | 0 .github/{ => .disable}/make-test.sh | 0 .github/{ => .disable}/run-act.sh | 0 .../workflows/u24_workflow_before_release.yaml | 0 .../workflows/u24_workflow_release_call.yaml | 0 .../workflows/u24_workflow_tag_to_release.yaml | 0 .github/workflows/development.yaml | 10 ++++++++++ 17 files changed, 10 insertions(+) rename .github/{ => .disable}/.staging_workflows/anchored_u24_workflow_before_release.yaml (100%) rename .github/{ => .disable}/.staging_workflows/anchored_u24_workflow_release_call.yaml (100%) rename .github/{ => .disable}/.staging_workflows/anchored_u24_workflow_tag_to_release.yaml (100%) rename .github/{ => .disable}/.staging_workflows/normalize.sh (100%) rename .github/{ => .disable}/.test/.secrets (100%) rename .github/{ => .disable}/.test/README.md (100%) rename .github/{ => .disable}/ISSUE_TEMPLATE/bug_report.md (100%) rename .github/{ => .disable}/ISSUE_TEMPLATE/config.yml (100%) rename .github/{ => .disable}/ISSUE_TEMPLATE/feature_request.md (100%) rename .github/{ => .disable}/make-dev.sh (100%) rename .github/{ => .disable}/make-prod.sh (100%) rename .github/{ => .disable}/make-test.sh (100%) rename .github/{ => .disable}/run-act.sh (100%) rename .github/{ => .disable}/workflows/u24_workflow_before_release.yaml (100%) rename .github/{ => .disable}/workflows/u24_workflow_release_call.yaml (100%) rename .github/{ => .disable}/workflows/u24_workflow_tag_to_release.yaml (100%) create mode 100644 .github/workflows/development.yaml diff --git a/.github/.staging_workflows/anchored_u24_workflow_before_release.yaml b/.github/.disable/.staging_workflows/anchored_u24_workflow_before_release.yaml similarity index 100% rename from .github/.staging_workflows/anchored_u24_workflow_before_release.yaml rename to .github/.disable/.staging_workflows/anchored_u24_workflow_before_release.yaml diff --git a/.github/.staging_workflows/anchored_u24_workflow_release_call.yaml b/.github/.disable/.staging_workflows/anchored_u24_workflow_release_call.yaml similarity index 100% rename from .github/.staging_workflows/anchored_u24_workflow_release_call.yaml rename to .github/.disable/.staging_workflows/anchored_u24_workflow_release_call.yaml diff --git a/.github/.staging_workflows/anchored_u24_workflow_tag_to_release.yaml b/.github/.disable/.staging_workflows/anchored_u24_workflow_tag_to_release.yaml similarity index 100% rename from .github/.staging_workflows/anchored_u24_workflow_tag_to_release.yaml rename to .github/.disable/.staging_workflows/anchored_u24_workflow_tag_to_release.yaml diff --git a/.github/.staging_workflows/normalize.sh b/.github/.disable/.staging_workflows/normalize.sh similarity index 100% rename from .github/.staging_workflows/normalize.sh rename to .github/.disable/.staging_workflows/normalize.sh diff --git a/.github/.test/.secrets b/.github/.disable/.test/.secrets similarity index 100% rename from .github/.test/.secrets rename to .github/.disable/.test/.secrets diff --git a/.github/.test/README.md b/.github/.disable/.test/README.md similarity index 100% rename from .github/.test/README.md rename to .github/.disable/.test/README.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/.disable/ISSUE_TEMPLATE/bug_report.md similarity index 100% rename from .github/ISSUE_TEMPLATE/bug_report.md rename to .github/.disable/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/.disable/ISSUE_TEMPLATE/config.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/config.yml rename to .github/.disable/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/.disable/ISSUE_TEMPLATE/feature_request.md similarity index 100% rename from .github/ISSUE_TEMPLATE/feature_request.md rename to .github/.disable/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/make-dev.sh b/.github/.disable/make-dev.sh similarity index 100% rename from .github/make-dev.sh rename to .github/.disable/make-dev.sh diff --git a/.github/make-prod.sh b/.github/.disable/make-prod.sh similarity index 100% rename from .github/make-prod.sh rename to .github/.disable/make-prod.sh diff --git a/.github/make-test.sh b/.github/.disable/make-test.sh similarity index 100% rename from .github/make-test.sh rename to .github/.disable/make-test.sh diff --git a/.github/run-act.sh b/.github/.disable/run-act.sh similarity index 100% rename from .github/run-act.sh rename to .github/.disable/run-act.sh diff --git a/.github/workflows/u24_workflow_before_release.yaml b/.github/.disable/workflows/u24_workflow_before_release.yaml similarity index 100% rename from .github/workflows/u24_workflow_before_release.yaml rename to .github/.disable/workflows/u24_workflow_before_release.yaml diff --git a/.github/workflows/u24_workflow_release_call.yaml b/.github/.disable/workflows/u24_workflow_release_call.yaml similarity index 100% rename from .github/workflows/u24_workflow_release_call.yaml rename to .github/.disable/workflows/u24_workflow_release_call.yaml diff --git a/.github/workflows/u24_workflow_tag_to_release.yaml b/.github/.disable/workflows/u24_workflow_tag_to_release.yaml similarity index 100% rename from .github/workflows/u24_workflow_tag_to_release.yaml rename to .github/.disable/workflows/u24_workflow_tag_to_release.yaml diff --git a/.github/workflows/development.yaml b/.github/workflows/development.yaml new file mode 100644 index 0000000..99a455e --- /dev/null +++ b/.github/workflows/development.yaml @@ -0,0 +1,10 @@ +name: Development +on: + push: +jobs: + build-codespaces: + uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer/build.yaml@main + # with: + # config-path: .github/labeler.yml + # secrets: + # envPAT: ${{ secrets.envPAT }} From bc852dea34243d5ff522a3d1daeed55d22a71600 Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Fri, 12 May 2023 16:54:30 -0500 Subject: [PATCH 02/23] Remove nested subdirectory call. --- .github/workflows/development.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/development.yaml b/.github/workflows/development.yaml index 99a455e..f9ab5cc 100644 --- a/.github/workflows/development.yaml +++ b/.github/workflows/development.yaml @@ -3,7 +3,7 @@ on: push: jobs: build-codespaces: - uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer/build.yaml@main + uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer-build.yaml@main # with: # config-path: .github/labeler.yml # secrets: From 257939f02675e17bb3e548ac0671bee8af67cada Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Fri, 12 May 2023 17:24:44 -0500 Subject: [PATCH 03/23] Update workflow reference. --- .devcontainer/docker-compose.yaml | 1 + .github/workflows/development.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.devcontainer/docker-compose.yaml b/.devcontainer/docker-compose.yaml index ca9788b..9db9324 100644 --- a/.devcontainer/docker-compose.yaml +++ b/.devcontainer/docker-compose.yaml @@ -4,6 +4,7 @@ services: extends: file: ./local/docker-compose.yaml service: app + image: datajoint/workflow_calcium_imaging_devcontainer:latest environment: - DJ_PUBLIC_S3_LOCATION=djhub.vathes.datapub.elements:/workflow-calcium-imaging-data-v2 devices: diff --git a/.github/workflows/development.yaml b/.github/workflows/development.yaml index f9ab5cc..948237d 100644 --- a/.github/workflows/development.yaml +++ b/.github/workflows/development.yaml @@ -2,7 +2,7 @@ name: Development on: push: jobs: - build-codespaces: + devcontainer-build: uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer-build.yaml@main # with: # config-path: .github/labeler.yml From 6194478a305d1aab3e23b59308ac816f674a27bc Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Mon, 15 May 2023 10:21:12 -0500 Subject: [PATCH 04/23] Move image definition to base compose file. --- .devcontainer/docker-compose.yaml | 1 - .devcontainer/local/docker-compose.yaml | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/docker-compose.yaml b/.devcontainer/docker-compose.yaml index 9db9324..ca9788b 100644 --- a/.devcontainer/docker-compose.yaml +++ b/.devcontainer/docker-compose.yaml @@ -4,7 +4,6 @@ services: extends: file: ./local/docker-compose.yaml service: app - image: datajoint/workflow_calcium_imaging_devcontainer:latest environment: - DJ_PUBLIC_S3_LOCATION=djhub.vathes.datapub.elements:/workflow-calcium-imaging-data-v2 devices: diff --git a/.devcontainer/local/docker-compose.yaml b/.devcontainer/local/docker-compose.yaml index 6adb3e9..f5c9bb1 100644 --- a/.devcontainer/local/docker-compose.yaml +++ b/.devcontainer/local/docker-compose.yaml @@ -6,6 +6,7 @@ services: build: context: ../.. dockerfile: ./.devcontainer/Dockerfile + image: datajoint/workflow_calcium_imaging_devcontainer:latest extra_hosts: - fakeservices.datajoint.io:127.0.0.1 volumes: From 170830c0ee188785daed0c83e93df4d8e8709511 Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Mon, 15 May 2023 11:59:56 -0500 Subject: [PATCH 05/23] Add devcontainer push step. --- .github/workflows/development.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/development.yaml b/.github/workflows/development.yaml index 948237d..50b8fe2 100644 --- a/.github/workflows/development.yaml +++ b/.github/workflows/development.yaml @@ -4,6 +4,9 @@ on: jobs: devcontainer-build: uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer-build.yaml@main + devcontainer-publish: + needs: devcontainer-build + uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer-publish.yaml@main # with: # config-path: .github/labeler.yml # secrets: From dba21b8f2d2467a016545cd49b9cbdf1d69e8dc3 Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Mon, 15 May 2023 12:01:55 -0500 Subject: [PATCH 06/23] Pass array to needs block. --- .github/workflows/development.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/development.yaml b/.github/workflows/development.yaml index 50b8fe2..8457b05 100644 --- a/.github/workflows/development.yaml +++ b/.github/workflows/development.yaml @@ -5,7 +5,8 @@ jobs: devcontainer-build: uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer-build.yaml@main devcontainer-publish: - needs: devcontainer-build + needs: + - devcontainer-build uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer-publish.yaml@main # with: # config-path: .github/labeler.yml From 271306745977fe8fff7d3adb80ef7f1c3ed3dd0b Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Mon, 15 May 2023 12:05:29 -0500 Subject: [PATCH 07/23] Try again. --- .github/workflows/development.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/development.yaml b/.github/workflows/development.yaml index 8457b05..87083e8 100644 --- a/.github/workflows/development.yaml +++ b/.github/workflows/development.yaml @@ -12,3 +12,4 @@ jobs: # config-path: .github/labeler.yml # secrets: # envPAT: ${{ secrets.envPAT }} + # From 81a6fcbce48ef642a8dec37a48fc1c649c51f0cf Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Mon, 15 May 2023 16:14:31 -0500 Subject: [PATCH 08/23] Add workflow dispatch option when publishing. --- .github/workflows/development.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/development.yaml b/.github/workflows/development.yaml index 87083e8..d2a1d73 100644 --- a/.github/workflows/development.yaml +++ b/.github/workflows/development.yaml @@ -1,10 +1,12 @@ name: Development on: push: + workflow_dispatch: jobs: devcontainer-build: uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer-build.yaml@main devcontainer-publish: + if: ${{github.event_name}} == 'workflow_dispatch' needs: - devcontainer-build uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer-publish.yaml@main From e131daf591edcf8ab492b4041a97ad9bbdd2fb98 Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Tue, 16 May 2023 09:44:09 -0500 Subject: [PATCH 09/23] Debug CI trigger. --- .github/workflows/development.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/development.yaml b/.github/workflows/development.yaml index d2a1d73..a70a407 100644 --- a/.github/workflows/development.yaml +++ b/.github/workflows/development.yaml @@ -4,6 +4,7 @@ on: workflow_dispatch: jobs: devcontainer-build: + if: ${{github.event_name}} == 'workflow_dispatch' uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer-build.yaml@main devcontainer-publish: if: ${{github.event_name}} == 'workflow_dispatch' From b22d723939cd01654ceaefdd936afa61fd387607 Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Tue, 16 May 2023 09:46:01 -0500 Subject: [PATCH 10/23] Fix typo. --- .github/workflows/development.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/development.yaml b/.github/workflows/development.yaml index a70a407..4ea471a 100644 --- a/.github/workflows/development.yaml +++ b/.github/workflows/development.yaml @@ -4,10 +4,10 @@ on: workflow_dispatch: jobs: devcontainer-build: - if: ${{github.event_name}} == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer-build.yaml@main devcontainer-publish: - if: ${{github.event_name}} == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' needs: - devcontainer-build uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer-publish.yaml@main From 38450691ebe6c29ff44e13f62a7ab36f76621b8e Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Tue, 16 May 2023 09:48:03 -0500 Subject: [PATCH 11/23] Apply correct logic handling for job trigger. --- .github/workflows/development.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/development.yaml b/.github/workflows/development.yaml index 4ea471a..eaef140 100644 --- a/.github/workflows/development.yaml +++ b/.github/workflows/development.yaml @@ -4,7 +4,6 @@ on: workflow_dispatch: jobs: devcontainer-build: - if: github.event_name == 'workflow_dispatch' uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer-build.yaml@main devcontainer-publish: if: github.event_name == 'workflow_dispatch' From 01354ddc0afed70cffebd95846d6996af03a368a Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Tue, 16 May 2023 10:06:27 -0500 Subject: [PATCH 12/23] Remove build dependency on compose. --- .devcontainer/local/docker-compose.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/local/docker-compose.yaml b/.devcontainer/local/docker-compose.yaml index f5c9bb1..2d1233e 100644 --- a/.devcontainer/local/docker-compose.yaml +++ b/.devcontainer/local/docker-compose.yaml @@ -3,9 +3,9 @@ services: app: cpus: 4 mem_limit: 8g - build: - context: ../.. - dockerfile: ./.devcontainer/Dockerfile + # build: + # context: ../.. + # dockerfile: ./.devcontainer/Dockerfile image: datajoint/workflow_calcium_imaging_devcontainer:latest extra_hosts: - fakeservices.datajoint.io:127.0.0.1 From 50bb80b517d9b27e3bb824e89a1e2bbd61bcf436 Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Tue, 16 May 2023 10:19:19 -0500 Subject: [PATCH 13/23] Trigger new CI run. --- .devcontainer/local/docker-compose.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.devcontainer/local/docker-compose.yaml b/.devcontainer/local/docker-compose.yaml index 2d1233e..9cf17a0 100644 --- a/.devcontainer/local/docker-compose.yaml +++ b/.devcontainer/local/docker-compose.yaml @@ -6,6 +6,7 @@ services: # build: # context: ../.. # dockerfile: ./.devcontainer/Dockerfile + # image: datajoint/workflow_calcium_imaging_devcontainer:latest extra_hosts: - fakeservices.datajoint.io:127.0.0.1 From 2ac60596eec953bbf58521bc565514ddce4fb263 Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Tue, 16 May 2023 11:20:33 -0500 Subject: [PATCH 14/23] Clarify purpose of GHA workflows and clean up. --- .../anchored_u24_workflow_before_release.yaml | 29 ------------ .../anchored_u24_workflow_release_call.yaml | 46 ------------------- .../anchored_u24_workflow_tag_to_release.yaml | 26 ----------- .../.disable/.staging_workflows/normalize.sh | 14 ------ .github/.disable/.test/.secrets | 4 -- .github/.disable/.test/README.md | 3 -- .github/.disable/make-dev.sh | 2 - .github/.disable/make-prod.sh | 2 - .github/.disable/make-test.sh | 2 - .github/.disable/run-act.sh | 7 --- .../u24_workflow_before_release.yaml | 18 -------- .../workflows/u24_workflow_release_call.yaml | 20 -------- .../u24_workflow_tag_to_release.yaml | 15 ------ .../ISSUE_TEMPLATE/bug_report.md | 0 .../{.disable => }/ISSUE_TEMPLATE/config.yml | 0 .../ISSUE_TEMPLATE/feature_request.md | 0 .../{development.yaml => release.yaml} | 9 +--- .github/workflows/test.yaml | 7 +++ 18 files changed, 8 insertions(+), 196 deletions(-) delete mode 100644 .github/.disable/.staging_workflows/anchored_u24_workflow_before_release.yaml delete mode 100644 .github/.disable/.staging_workflows/anchored_u24_workflow_release_call.yaml delete mode 100644 .github/.disable/.staging_workflows/anchored_u24_workflow_tag_to_release.yaml delete mode 100644 .github/.disable/.staging_workflows/normalize.sh delete mode 100644 .github/.disable/.test/.secrets delete mode 100644 .github/.disable/.test/README.md delete mode 100644 .github/.disable/make-dev.sh delete mode 100644 .github/.disable/make-prod.sh delete mode 100644 .github/.disable/make-test.sh delete mode 100644 .github/.disable/run-act.sh delete mode 100644 .github/.disable/workflows/u24_workflow_before_release.yaml delete mode 100644 .github/.disable/workflows/u24_workflow_release_call.yaml delete mode 100644 .github/.disable/workflows/u24_workflow_tag_to_release.yaml rename .github/{.disable => }/ISSUE_TEMPLATE/bug_report.md (100%) rename .github/{.disable => }/ISSUE_TEMPLATE/config.yml (100%) rename .github/{.disable => }/ISSUE_TEMPLATE/feature_request.md (100%) rename .github/workflows/{development.yaml => release.yaml} (60%) create mode 100644 .github/workflows/test.yaml diff --git a/.github/.disable/.staging_workflows/anchored_u24_workflow_before_release.yaml b/.github/.disable/.staging_workflows/anchored_u24_workflow_before_release.yaml deleted file mode 100644 index 76ea65f..0000000 --- a/.github/.disable/.staging_workflows/anchored_u24_workflow_before_release.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: u24_workflow_before_release_0.0.1 -on: - pull_request: - push: - branches: - - '**' - tags-ignore: - - '**' - workflow_dispatch: - -anchor-dev-build-call: &dev-build-call - uses: yambottle/djsciops-cicd/.github/workflows/u24_workflow_build.yaml@main - -anchor-test-build-call: &test-build-call - uses: yambottle/djsciops-cicd/.github/workflows/u24_workflow_build.yaml@main - -anchor-prod-build-call: &prod-build-call - uses: dj-sciops/djsciops-cicd/.github/workflows/u24_workflow_build.yaml@main - -jobs: - call_context_check: - uses: dj-sciops/djsciops-cicd/.github/workflows/context_check.yaml@main - - call_u24_workflow_build_debian: - !!merge <<: *$STAGE-build-call - with: - jhub_ver: 1.4.2 - py_ver: 3.9 - dist: debian \ No newline at end of file diff --git a/.github/.disable/.staging_workflows/anchored_u24_workflow_release_call.yaml b/.github/.disable/.staging_workflows/anchored_u24_workflow_release_call.yaml deleted file mode 100644 index d9fc757..0000000 --- a/.github/.disable/.staging_workflows/anchored_u24_workflow_release_call.yaml +++ /dev/null @@ -1,46 +0,0 @@ -name: u24_workflow_release_call_0.0.1 - -on: - workflow_run: - workflows: ["u24_workflow_tag_to_release_0.0.1"] - types: - - completed - -anchor-dev-release-call: &dev-release-call - uses: yambottle/djsciops-cicd/.github/workflows/u24_workflow_release.yaml@main - -anchor-test-release-call: &test-release-call - uses: yambottle/djsciops-cicd/.github/workflows/u24_workflow_release.yaml@main - -anchor-prod-release-call: &prod-release-call - uses: dj-sciops/djsciops-cicd/.github/workflows/u24_workflow_release.yaml@main - -anchor-dev-release-if: &dev-release-if - if: >- - github.event.workflow_run.conclusion == 'success' && - github.repository_owner == 'yambottle' - -anchor-test-release-if: &test-release-if - if: >- - github.event.workflow_run.conclusion == 'success' && - github.repository_owner == 'yambottle' - -anchor-prod-release-if: &prod-release-if - if: >- - github.event.workflow_run.conclusion == 'success' && - github.repository_owner == 'datajoint' - -jobs: - call_context_check: - uses: dj-sciops/djsciops-cicd/.github/workflows/context_check.yaml@main - - call_u24_workflow_release_debian: - !!merge <<: *$STAGE-release-if - !!merge <<: *$STAGE-release-call - with: - jhub_ver: 1.4.2 - py_ver: 3.9 - dist: debian - secrets: - REGISTRY_USERNAME: ${{secrets.DOCKER_USERNAME}} - REGISTRY_PASSWORD: ${{secrets.DOCKER_PASSWORD}} \ No newline at end of file diff --git a/.github/.disable/.staging_workflows/anchored_u24_workflow_tag_to_release.yaml b/.github/.disable/.staging_workflows/anchored_u24_workflow_tag_to_release.yaml deleted file mode 100644 index 982f287..0000000 --- a/.github/.disable/.staging_workflows/anchored_u24_workflow_tag_to_release.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: u24_workflow_tag_to_release_0.0.1 - -on: - push: - tags: - - '*.*.*' - - 'test*.*.*' - -anchor-dev-build-call: &dev-build-call - uses: yambottle/djsciops-cicd/.github/workflows/u24_workflow_build.yaml@main - -anchor-test-build-call: &test-build-call - uses: yambottle/djsciops-cicd/.github/workflows/u24_workflow_build.yaml@main - -anchor-prod-build-call: &prod-build-call - uses: dj-sciops/djsciops-cicd/.github/workflows/u24_workflow_build.yaml@main - -jobs: - call_context_check: - uses: dj-sciops/djsciops-cicd/.github/workflows/context_check.yaml@main - call_u24_workflow_build_debian: - !!merge <<: *$STAGE-build-call - with: - jhub_ver: 1.4.2 - py_ver: 3.9 - dist: debian \ No newline at end of file diff --git a/.github/.disable/.staging_workflows/normalize.sh b/.github/.disable/.staging_workflows/normalize.sh deleted file mode 100644 index 08619ee..0000000 --- a/.github/.disable/.staging_workflows/normalize.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -# For Github Action that doesn't support anchor yet... -# https://github.com/actions/runner/issues/1182 - -STAGE=$1 -# .yaml in .staging_workflows has to be named using a prefix 'anchored_', this will be removed when normalizing -PREFIX="anchored_" -SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -for source in $(ls $SCRIPT_DIR | grep yaml) -do - target=${source#$PREFIX} - export STAGE - envsubst '${STAGE}' < $SCRIPT_DIR/$source | yq e 'explode(.) | del(.anchor-*)' > $SCRIPT_DIR/../workflows/$target -done \ No newline at end of file diff --git a/.github/.disable/.test/.secrets b/.github/.disable/.test/.secrets deleted file mode 100644 index 0cdd0de..0000000 --- a/.github/.disable/.test/.secrets +++ /dev/null @@ -1,4 +0,0 @@ -RAW_DEPLOY_KEY= -GITHUB_TOKEN= -REGISTRY_USERNAME= -REGISTRY_PASSWORD= \ No newline at end of file diff --git a/.github/.disable/.test/README.md b/.github/.disable/.test/README.md deleted file mode 100644 index 3ffc63a..0000000 --- a/.github/.disable/.test/README.md +++ /dev/null @@ -1,3 +0,0 @@ -For local testing using act, you need to create few things: -- make a `.test/artifacts` dir for `act --artifact-server-path ./.test/artifacts/` -- make a `.test/.secrets` file similar as `.env` for `act --secret-file ./.test/.secrets` \ No newline at end of file diff --git a/.github/.disable/make-dev.sh b/.github/.disable/make-dev.sh deleted file mode 100644 index e9bdb38..0000000 --- a/.github/.disable/make-dev.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -bash ./.staging_workflows/normalize.sh dev \ No newline at end of file diff --git a/.github/.disable/make-prod.sh b/.github/.disable/make-prod.sh deleted file mode 100644 index 806e39e..0000000 --- a/.github/.disable/make-prod.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -bash ./.staging_workflows/normalize.sh prod \ No newline at end of file diff --git a/.github/.disable/make-test.sh b/.github/.disable/make-test.sh deleted file mode 100644 index 3870e77..0000000 --- a/.github/.disable/make-test.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -bash ./.staging_workflows/normalize.sh test \ No newline at end of file diff --git a/.github/.disable/run-act.sh b/.github/.disable/run-act.sh deleted file mode 100644 index 4ae9cdf..0000000 --- a/.github/.disable/run-act.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -bash $SCRIPT_DIR/.staging_workflows/normalize.sh dev -cd .. -act -P ubuntu-latest=drewyangdev/ubuntu:act-latest \ - --secret-file $SCRIPT_DIR/.test/.secrets \ - --artifact-server-path $SCRIPT_DIR/.test/artifacts/ \ No newline at end of file diff --git a/.github/.disable/workflows/u24_workflow_before_release.yaml b/.github/.disable/workflows/u24_workflow_before_release.yaml deleted file mode 100644 index 28a5ff5..0000000 --- a/.github/.disable/workflows/u24_workflow_before_release.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: u24_workflow_before_release_0.0.1 -on: - pull_request: - push: - branches: - - '**' - tags-ignore: - - '**' - workflow_dispatch: -jobs: - call_context_check: - uses: dj-sciops/djsciops-cicd/.github/workflows/context_check.yaml@main - call_u24_workflow_build_debian: - uses: dj-sciops/djsciops-cicd/.github/workflows/u24_workflow_build.yaml@main - with: - jhub_ver: 1.4.2 - py_ver: 3.9 - dist: debian diff --git a/.github/.disable/workflows/u24_workflow_release_call.yaml b/.github/.disable/workflows/u24_workflow_release_call.yaml deleted file mode 100644 index 8196673..0000000 --- a/.github/.disable/workflows/u24_workflow_release_call.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: u24_workflow_release_call_0.0.1 -on: - workflow_run: - workflows: ["u24_workflow_tag_to_release_0.0.1"] - types: - - completed -jobs: - call_context_check: - uses: dj-sciops/djsciops-cicd/.github/workflows/context_check.yaml@main - call_u24_workflow_release_debian: - if: >- - github.event.workflow_run.conclusion == 'success' && github.repository_owner == 'datajoint' - uses: dj-sciops/djsciops-cicd/.github/workflows/u24_workflow_release.yaml@main - with: - jhub_ver: 1.4.2 - py_ver: 3.9 - dist: debian - secrets: - REGISTRY_USERNAME: ${{secrets.DOCKER_USERNAME}} - REGISTRY_PASSWORD: ${{secrets.DOCKER_PASSWORD}} diff --git a/.github/.disable/workflows/u24_workflow_tag_to_release.yaml b/.github/.disable/workflows/u24_workflow_tag_to_release.yaml deleted file mode 100644 index 3a6ce58..0000000 --- a/.github/.disable/workflows/u24_workflow_tag_to_release.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: u24_workflow_tag_to_release_0.0.1 -on: - push: - tags: - - '*.*.*' - - 'test*.*.*' -jobs: - call_context_check: - uses: dj-sciops/djsciops-cicd/.github/workflows/context_check.yaml@main - call_u24_workflow_build_debian: - uses: dj-sciops/djsciops-cicd/.github/workflows/u24_workflow_build.yaml@main - with: - jhub_ver: 1.4.2 - py_ver: 3.9 - dist: debian diff --git a/.github/.disable/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md similarity index 100% rename from .github/.disable/ISSUE_TEMPLATE/bug_report.md rename to .github/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/.disable/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml similarity index 100% rename from .github/.disable/ISSUE_TEMPLATE/config.yml rename to .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/.disable/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md similarity index 100% rename from .github/.disable/ISSUE_TEMPLATE/feature_request.md rename to .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/workflows/development.yaml b/.github/workflows/release.yaml similarity index 60% rename from .github/workflows/development.yaml rename to .github/workflows/release.yaml index eaef140..a9667a1 100644 --- a/.github/workflows/development.yaml +++ b/.github/workflows/release.yaml @@ -1,17 +1,10 @@ -name: Development +name: Release on: - push: workflow_dispatch: jobs: devcontainer-build: uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer-build.yaml@main devcontainer-publish: - if: github.event_name == 'workflow_dispatch' needs: - devcontainer-build uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer-publish.yaml@main - # with: - # config-path: .github/labeler.yml - # secrets: - # envPAT: ${{ secrets.envPAT }} - # diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..754b7eb --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,7 @@ +name: Test +on: + push: +jobs: + devcontainer-build: + uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer-build.yaml@main + From 7415e114478ccd68d56628f68c97143bf17426be Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Tue, 16 May 2023 11:23:54 -0500 Subject: [PATCH 15/23] Add test runs on PR. --- .github/workflows/test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 754b7eb..18307b5 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,6 +1,7 @@ name: Test on: push: + pull_request: jobs: devcontainer-build: uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer-build.yaml@main From 649a7f3fd1a4517ebe2defbcfe55b56c61785d27 Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Tue, 16 May 2023 16:39:41 -0500 Subject: [PATCH 16/23] Apply review suggestions. --- .devcontainer/Dockerfile | 3 ++ .devcontainer/devcontainer.json | 11 +++---- .devcontainer/docker-compose.yaml | 2 +- .devcontainer/local-test/devcontainer.json | 30 ------------------- .devcontainer/local-test/docker-compose.yaml | 15 ---------- .../{local-data => local}/devcontainer.json | 11 +++---- .../{local-data => local}/docker-compose.yaml | 9 +++--- README.md | 7 ++--- 8 files changed, 19 insertions(+), 69 deletions(-) delete mode 100644 .devcontainer/local-test/devcontainer.json delete mode 100644 .devcontainer/local-test/docker-compose.yaml rename .devcontainer/{local-data => local}/devcontainer.json (76%) rename .devcontainer/{local-data => local}/docker-compose.yaml (70%) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 1d6a055..0b0fd38 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -13,6 +13,7 @@ RUN \ usermod -aG docker vscode && \ apt-get clean +COPY ./requirements_dev.txt /tmp/ RUN \ # dev setup apt update && \ @@ -22,6 +23,8 @@ RUN \ pip install --no-cache-dir --upgrade black pip && \ echo '. /etc/bash_completion' >> /home/vscode/.bashrc && \ echo 'export PS1="\[\e[32;1m\]\u\[\e[m\]@\[\e[34;1m\]\H\[\e[m\]:\[\e[33;1m\]\w\[\e[m\]$ "' >> /home/vscode/.bashrc && \ + pip install --no-cache-dir -r /tmp/requirements_dev.txt && \ + rm /tmp/requirements_dev.txt && \ # dircolors -b >> /home/vscode/.bashrc && \ # somehow fix colors apt-get clean COPY ./requirements.txt /tmp/ diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 40cbfe0..4611ab2 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { - "name": "Tutorial environment", + "name": "Tutorial (remote data)", "dockerComposeFile": "docker-compose.yaml", "service": "app", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", @@ -9,17 +9,14 @@ "onCreateCommand": "mkdir -p ${IMAGING_ROOT_DATA_DIR} && pip install -e . && MYSQL_VER=8.0 docker compose down && MYSQL_VER=8.0 docker compose up --build --wait", "postStartCommand": "docker volume prune -f && s3fs ${DJ_PUBLIC_S3_LOCATION} ${IMAGING_ROOT_DATA_DIR} -o nonempty,multipart_size=530,endpoint=us-east-1,url=http://s3.amazonaws.com,public_bucket=1", "hostRequirements": { - "cpus": 2, - "memory": "16gb", + "cpus": 4, + "memory": "8gb", "storage": "32gb" }, "forwardPorts": [ 3306 ], - "customizations": { - "settings": { - "python.pythonPath": "/usr/local/bin/python" - }, + "customizations": { "vscode": { "extensions": [ "ms-python.python", diff --git a/.devcontainer/docker-compose.yaml b/.devcontainer/docker-compose.yaml index e8107cd..ca9788b 100644 --- a/.devcontainer/docker-compose.yaml +++ b/.devcontainer/docker-compose.yaml @@ -2,7 +2,7 @@ version: "3" services: app: extends: - file: ./local-data/docker-compose.yaml + file: ./local/docker-compose.yaml service: app environment: - DJ_PUBLIC_S3_LOCATION=djhub.vathes.datapub.elements:/workflow-calcium-imaging-data-v2 diff --git a/.devcontainer/local-test/devcontainer.json b/.devcontainer/local-test/devcontainer.json deleted file mode 100644 index b1c1d77..0000000 --- a/.devcontainer/local-test/devcontainer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "Dev environment for local pytests with remote data", - "dockerComposeFile": "docker-compose.yaml", - "service": "app", - "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", - "remoteEnv": { - "LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}" - }, - "onCreateCommand": "pip install -r ./requirements_dev.txt && pip install -e . && pip install -e ../element-calcium-imaging && MYSQL_VER=8.0 docker compose down && MYSQL_VER=8.0 docker compose up --build --wait", - "postStartCommand": "docker volume prune -f && s3fs ${DJ_PUBLIC_S3_LOCATION} ${IMAGING_ROOT_DATA_DIR} -o nonempty,multipart_size=530,endpoint=us-east-1,url=http://s3.amazonaws.com,public_bucket=1", - "hostRequirements": { - "cpus": 2, - "memory": "16gb", - "storage": "32gb" - }, - "forwardPorts": [ - 3306 - ], - "customizations": { - "settings": { - "python.pythonPath": "/usr/local/bin/python" - }, - "vscode": { - "extensions": [ - "ms-python.python", - "ms-toolsai.jupyter" - ] - } - } -} \ No newline at end of file diff --git a/.devcontainer/local-test/docker-compose.yaml b/.devcontainer/local-test/docker-compose.yaml deleted file mode 100644 index add45d0..0000000 --- a/.devcontainer/local-test/docker-compose.yaml +++ /dev/null @@ -1,15 +0,0 @@ -version: "3" -services: - app: - cpus: 2 - mem_limit: 16g - environment: - - DJ_PUBLIC_S3_LOCATION=djhub.vathes.datapub.elements:/workflow-calcium-imaging-data-v2 - build: - context: ../.. - dockerfile: ./.devcontainer/Dockerfile - extra_hosts: - - fakeservices.datajoint.io:127.0.0.1 - volumes: - - ../../..:/workspaces:cached - privileged: true # only because of dind \ No newline at end of file diff --git a/.devcontainer/local-data/devcontainer.json b/.devcontainer/local/devcontainer.json similarity index 76% rename from .devcontainer/local-data/devcontainer.json rename to .devcontainer/local/devcontainer.json index 5cc077e..c7d3dfa 100644 --- a/.devcontainer/local-data/devcontainer.json +++ b/.devcontainer/local/devcontainer.json @@ -1,5 +1,5 @@ { - "name": "Dev environment with local data", + "name": "Tutorial (local data)", "dockerComposeFile": "docker-compose.yaml", "service": "app", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", @@ -9,17 +9,14 @@ "onCreateCommand": "pip install -e . && MYSQL_VER=8.0 docker compose down && MYSQL_VER=8.0 docker compose up --build --wait", "postStartCommand": "docker volume prune -f", "hostRequirements": { - "cpus": 2, - "memory": "16gb", + "cpus": 4, + "memory": "8gb", "storage": "32gb" }, "forwardPorts": [ 3306 ], - "customizations": { - "settings": { - "python.pythonPath": "/usr/local/bin/python" - }, + "customizations": { "vscode": { "extensions": [ "ms-python.python", diff --git a/.devcontainer/local-data/docker-compose.yaml b/.devcontainer/local/docker-compose.yaml similarity index 70% rename from .devcontainer/local-data/docker-compose.yaml rename to .devcontainer/local/docker-compose.yaml index 9cf17a0..2d2538f 100644 --- a/.devcontainer/local-data/docker-compose.yaml +++ b/.devcontainer/local/docker-compose.yaml @@ -3,15 +3,14 @@ services: app: cpus: 4 mem_limit: 8g - # build: - # context: ../.. - # dockerfile: ./.devcontainer/Dockerfile - # + build: + context: ../.. + dockerfile: ./.devcontainer/Dockerfile image: datajoint/workflow_calcium_imaging_devcontainer:latest extra_hosts: - fakeservices.datajoint.io:127.0.0.1 volumes: - - ../../..:/workspaces:cached + - ../..:/workspaces/workflow-calcium-imaging:cached - docker_data:/var/lib/docker # persist docker images privileged: true # only because of dind volumes: diff --git a/README.md b/README.md index a196084..9a06d5a 100644 --- a/README.md +++ b/README.md @@ -35,15 +35,14 @@ NIS`, or `PrairieView` acquisition software, using [Suite2p](https://github.com/ Here are some options that provide a great experience: -- Cloud-based Environment (*recommended*) +- (*recommended*) Cloud-based Environment - Launch using [GitHub Codespaces](https://github.com/features/codespaces) using the `+` option which will `Create codespace on main` in the codebase repository on your fork with default options. For more control, see the `...` where you may create `New with options...`. - - Build time for a codespace is several minutes. This is done infrequently and cached for convenience. - - Start time for a codespace is less than 1 minute. This will pull the built codespace from cache when you need it. + - Start time for a codespace is less than 1 minute. - *Tip*: Each month, GitHub renews a [free-tier](https://docs.github.com/en/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#monthly-included-storage-and-core-hours-for-personal-accounts) quota of compute and storage. Typically we run into the storage limits before anything else since Codespaces consume storage while stopped. It is best to delete Codespaces when not actively in use and recreate when needed. We'll soon be creating prebuilds to avoid larger build times. Once any portion of your quota is reached, you will need to wait for it to be reset at the end of your cycle or add billing info to your GitHub account to handle overages. - *Tip*: GitHub auto names the codespace but you can rename the codespace so that it is easier to identify later. - Local Environment - - Note: On Windows, running the tutorial notebook with the example data in a Dev Container is not currently possible due to a s3fs mounting issue. Please use the `Cloud-based Development Environment` option above. + > *Note: Access to example data is currently limited to MacOS and Linux due to the s3fs utility. Windows users are recommended to use the above environment.* - Install [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - Install [Docker](https://docs.docker.com/get-docker/) - Install [VSCode](https://code.visualstudio.com/) From 2bcb050844083369e83b24fee09e7fbbd90344e7 Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Tue, 16 May 2023 22:08:09 +0000 Subject: [PATCH 17/23] Add setting for kernel back. --- .devcontainer/devcontainer.json | 5 ++++- .devcontainer/local/devcontainer.json | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4611ab2..2b35812 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { - "name": "Tutorial (remote data)", + "name": "Environment + Data", "dockerComposeFile": "docker-compose.yaml", "service": "app", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", @@ -17,6 +17,9 @@ 3306 ], "customizations": { + "settings": { + "python.pythonPath": "/usr/local/bin/python" + }, "vscode": { "extensions": [ "ms-python.python", diff --git a/.devcontainer/local/devcontainer.json b/.devcontainer/local/devcontainer.json index c7d3dfa..84e15d0 100644 --- a/.devcontainer/local/devcontainer.json +++ b/.devcontainer/local/devcontainer.json @@ -1,5 +1,5 @@ { - "name": "Tutorial (local data)", + "name": "Environment", "dockerComposeFile": "docker-compose.yaml", "service": "app", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", @@ -17,6 +17,9 @@ 3306 ], "customizations": { + "settings": { + "python.pythonPath": "/usr/local/bin/python" + }, "vscode": { "extensions": [ "ms-python.python", From 7d0459e9aa2706300db29d1f69e951ae45553442 Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Tue, 16 May 2023 22:21:51 +0000 Subject: [PATCH 18/23] Pass secret along. --- .github/workflows/test.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 18307b5..3990014 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -5,4 +5,7 @@ on: jobs: devcontainer-build: uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer-build.yaml@main + secrets: + DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}} + dockerhub_token: ${{secrets.dockerhub_token}} From 19c1abdb42b57180d81e6cf9f22e5e4d888ada7d Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Tue, 16 May 2023 22:29:15 +0000 Subject: [PATCH 19/23] Remove debugging clutter. --- .github/workflows/release.yaml | 3 +++ .github/workflows/test.yaml | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a9667a1..b51b20e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,3 +8,6 @@ jobs: needs: - devcontainer-build uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer-publish.yaml@main + secrets: + DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}} + DOCKERHUB_TOKEN: ${{secrets.DOCKERHUB_TOKEN}} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 3990014..214a0f0 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -5,7 +5,3 @@ on: jobs: devcontainer-build: uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer-build.yaml@main - secrets: - DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}} - dockerhub_token: ${{secrets.dockerhub_token}} - From 9fdeb6b561c77b7e395365dfcf146a2834c6ee72 Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Tue, 16 May 2023 22:32:21 +0000 Subject: [PATCH 20/23] Disable compose build to force pull. --- .devcontainer/local/docker-compose.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/local/docker-compose.yaml b/.devcontainer/local/docker-compose.yaml index 2d2538f..b944a2b 100644 --- a/.devcontainer/local/docker-compose.yaml +++ b/.devcontainer/local/docker-compose.yaml @@ -3,9 +3,9 @@ services: app: cpus: 4 mem_limit: 8g - build: - context: ../.. - dockerfile: ./.devcontainer/Dockerfile + # build: + # context: ../.. + # dockerfile: ./.devcontainer/Dockerfile image: datajoint/workflow_calcium_imaging_devcontainer:latest extra_hosts: - fakeservices.datajoint.io:127.0.0.1 From 0105bae7168fc66eafa4dfc7c4e85a581e38288b Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Tue, 16 May 2023 22:47:56 +0000 Subject: [PATCH 21/23] Move references closer to their final destination. --- .github/workflows/release.yaml | 4 ++-- .github/workflows/test.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b51b20e..878ea22 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,11 +3,11 @@ on: workflow_dispatch: jobs: devcontainer-build: - uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer-build.yaml@main + uses: guzman-raphael/datajoint.github/.github/workflows/devcontainer-build.yaml@main devcontainer-publish: needs: - devcontainer-build - uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer-publish.yaml@main + uses: guzman-raphael/datajoint.github/.github/workflows/devcontainer-publish.yaml@main secrets: DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}} DOCKERHUB_TOKEN: ${{secrets.DOCKERHUB_TOKEN}} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 214a0f0..86be950 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -4,4 +4,4 @@ on: pull_request: jobs: devcontainer-build: - uses: datajoint/dj-gha-workflows/.github/workflows/devcontainer-build.yaml@main + uses: guzman-raphael/datajoint.github/.github/workflows/devcontainer-build.yaml@main From 28d277fa15b9e9280fcff55735ec2e742f9e5b1c Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Tue, 16 May 2023 23:44:32 +0000 Subject: [PATCH 22/23] Bump up RAM due to local db and use PROD actions. --- .devcontainer/devcontainer.json | 2 +- .devcontainer/local/devcontainer.json | 2 +- .devcontainer/local/docker-compose.yaml | 2 +- .github/workflows/release.yaml | 4 ++-- .github/workflows/test.yaml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2b35812..bebf37a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -10,7 +10,7 @@ "postStartCommand": "docker volume prune -f && s3fs ${DJ_PUBLIC_S3_LOCATION} ${IMAGING_ROOT_DATA_DIR} -o nonempty,multipart_size=530,endpoint=us-east-1,url=http://s3.amazonaws.com,public_bucket=1", "hostRequirements": { "cpus": 4, - "memory": "8gb", + "memory": "16gb", "storage": "32gb" }, "forwardPorts": [ diff --git a/.devcontainer/local/devcontainer.json b/.devcontainer/local/devcontainer.json index 84e15d0..81b73f5 100644 --- a/.devcontainer/local/devcontainer.json +++ b/.devcontainer/local/devcontainer.json @@ -10,7 +10,7 @@ "postStartCommand": "docker volume prune -f", "hostRequirements": { "cpus": 4, - "memory": "8gb", + "memory": "16gb", "storage": "32gb" }, "forwardPorts": [ diff --git a/.devcontainer/local/docker-compose.yaml b/.devcontainer/local/docker-compose.yaml index b944a2b..44c5f62 100644 --- a/.devcontainer/local/docker-compose.yaml +++ b/.devcontainer/local/docker-compose.yaml @@ -2,7 +2,7 @@ version: "3" services: app: cpus: 4 - mem_limit: 8g + mem_limit: 16g # build: # context: ../.. # dockerfile: ./.devcontainer/Dockerfile diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 878ea22..5109e17 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,11 +3,11 @@ on: workflow_dispatch: jobs: devcontainer-build: - uses: guzman-raphael/datajoint.github/.github/workflows/devcontainer-build.yaml@main + uses: datajoint/.github/.github/workflows/devcontainer-build.yaml@main devcontainer-publish: needs: - devcontainer-build - uses: guzman-raphael/datajoint.github/.github/workflows/devcontainer-publish.yaml@main + uses: datajoint/.github/.github/workflows/devcontainer-publish.yaml@main secrets: DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}} DOCKERHUB_TOKEN: ${{secrets.DOCKERHUB_TOKEN}} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 86be950..6b8420d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -4,4 +4,4 @@ on: pull_request: jobs: devcontainer-build: - uses: guzman-raphael/datajoint.github/.github/workflows/devcontainer-build.yaml@main + uses: datajoint/.github/.github/workflows/devcontainer-build.yaml@main From fad3f366d582081aa170740a44b3ccc6aa921812 Mon Sep 17 00:00:00 2001 From: guzman-raphael Date: Tue, 16 May 2023 23:52:16 +0000 Subject: [PATCH 23/23] Update doc. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a06d5a..0e5c080 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,8 @@ Here are some options that provide a great experience: - (*recommended*) Cloud-based Environment - Launch using [GitHub Codespaces](https://github.com/features/codespaces) using the `+` option which will `Create codespace on main` in the codebase repository on your fork with default options. For more control, see the `...` where you may create `New with options...`. - - Start time for a codespace is less than 1 minute. + - Build time for a codespace is a few minutes. This is done infrequently and cached for convenience. + - Start time for a codespace is less than 1 minute. This will pull the built codespace from cache when you need it. - *Tip*: Each month, GitHub renews a [free-tier](https://docs.github.com/en/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#monthly-included-storage-and-core-hours-for-personal-accounts) quota of compute and storage. Typically we run into the storage limits before anything else since Codespaces consume storage while stopped. It is best to delete Codespaces when not actively in use and recreate when needed. We'll soon be creating prebuilds to avoid larger build times. Once any portion of your quota is reached, you will need to wait for it to be reset at the end of your cycle or add billing info to your GitHub account to handle overages. - *Tip*: GitHub auto names the codespace but you can rename the codespace so that it is easier to identify later.