From 9c3fe7a044c2bac88c1726299b69de3f258bc57f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Thu, 19 Sep 2024 11:46:27 +0200 Subject: [PATCH 01/25] dispatch event to trigger workflow in views_pipeline --- ...ger_views_pipeline_cm_catalog_dispatch.yml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml diff --git a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml new file mode 100644 index 0000000..d3e96c4 --- /dev/null +++ b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml @@ -0,0 +1,23 @@ +name: dispatch event to views_pipeline on changes in cm_querysets.py and pgm_querysets.py + +# Trigger on file changes in viewsforecasting +on: + push: + branches: + - github_workflows + paths: + - Tools/cm_querysets.py + - Tools/pgm_querysets.py + +jobs: + dispatch: + runs-on: ubuntu-latest + + steps: + - name: Trigger repository dispatch in views_pipeline + run: | + curl -X POST \ + -H "Authorization: token ${{ secrets.VIEWS_PIPELINE_ACCESS_TOKEN }}" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/lujzi05/views_pipeline/dispatches \ + -d '{"event_type": "trigger-generate_links_to_querysets"}' From f337e3567bf8ca25f7bf2354755b078cfe9b2cc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Thu, 19 Sep 2024 11:59:20 +0200 Subject: [PATCH 02/25] test workflow: modifying pgm_querysets.py --- .../trigger_views_pipeline_cm_catalog_dispatch.yml | 1 + Tools/pgm_querysets.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml index d3e96c4..9390860 100644 --- a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml +++ b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml @@ -5,6 +5,7 @@ on: push: branches: - github_workflows + - main paths: - Tools/cm_querysets.py - Tools/pgm_querysets.py diff --git a/Tools/pgm_querysets.py b/Tools/pgm_querysets.py index adcd888..5d13e99 100644 --- a/Tools/pgm_querysets.py +++ b/Tools/pgm_querysets.py @@ -9,7 +9,13 @@ import numpy as np from viewser import Queryset, Column +''' + +THIS IS SOME BLANK SPACE TO TEST THE GITHUB WORKFLOW + + +''' def report(df): print() print(f"A dataset with {len(df.columns)} columns, with " From 7990c1a421f22667ce2ce9d874f5e66a11dc130a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Thu, 19 Sep 2024 13:18:01 +0200 Subject: [PATCH 03/25] test workflow: modifying cm_querysets.py --- .../trigger_views_pipeline_cm_catalog_dispatch.yml | 2 +- Tools/cm_querysets.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml index 9390860..b6d7e4f 100644 --- a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml +++ b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml @@ -4,8 +4,8 @@ name: dispatch event to views_pipeline on changes in cm_querysets.py and pgm_que on: push: branches: - - github_workflows - main + - github_workflows paths: - Tools/cm_querysets.py - Tools/pgm_querysets.py diff --git a/Tools/cm_querysets.py b/Tools/cm_querysets.py index 1a4ee66..c736ffa 100644 --- a/Tools/cm_querysets.py +++ b/Tools/cm_querysets.py @@ -9,6 +9,14 @@ import numpy as np from viewser import Queryset, Column +''' + + +THIS IS SOME BLANK SPACE TO TEST THE GITHUB WORKFLOW + + +''' + def get_cm_querysets(): From 145d393916fdadfb394c36271118dc063d892b7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Thu, 19 Sep 2024 15:21:23 +0200 Subject: [PATCH 04/25] changing workflow method --- ...ger_views_pipeline_cm_catalog_dispatch.yml | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml index b6d7e4f..b8cef72 100644 --- a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml +++ b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml @@ -11,14 +11,32 @@ on: - Tools/pgm_querysets.py jobs: - dispatch: + modify-views_pipeline: runs-on: ubuntu-latest steps: - - name: Trigger repository dispatch in views_pipeline + - name: Checkout views_pipeline repository + uses: actions/checkout@v3 + with: + repository: lujzi05/views_pipeline + token: ${{ secrets.VIEWS_PIPELINE_ACCESS_TOKEN }} + + - name: Clone viewsforecasting repository + run: | + git clone https://github.com/your_username/lujzi05/views_pipeline.git + cd views_pipeline + git checkout create_cm_catalog_01 + + - name: Run Python script run: | - curl -X POST \ - -H "Authorization: token ${{ secrets.VIEWS_PIPELINE_ACCESS_TOKEN }}" \ - -H "Accept: application/vnd.github.v3+json" \ - https://api.github.com/repos/lujzi05/views_pipeline/dispatches \ - -d '{"event_type": "trigger-generate_links_to_querysets"}' + python documentation/catalogs/generate_links_to_querysets.py + + - name: Commit and Push Changes + run: | + git add documentation/catalogs/cm_model_catalog.md + git commit -m "Automated changes by GitHub Actions" + git push origin create_cm_catalog_01 + env: + GITHUB_TOKEN: ${{ secrets.GVIEWS_PIPELINE_ACCESS_TOKENN }} + + From c2d5c086198c9e361f2e404be5595524711ce79a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Thu, 19 Sep 2024 15:32:33 +0200 Subject: [PATCH 05/25] typo in workflow --- .../workflows/trigger_views_pipeline_cm_catalog_dispatch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml index b8cef72..0b9366d 100644 --- a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml +++ b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml @@ -37,6 +37,6 @@ jobs: git commit -m "Automated changes by GitHub Actions" git push origin create_cm_catalog_01 env: - GITHUB_TOKEN: ${{ secrets.GVIEWS_PIPELINE_ACCESS_TOKENN }} + GITHUB_TOKEN: ${{ secrets.VIEWS_PIPELINE_ACCESS_TOKEN }} From 8f7e3575371af27df110f926cc89ea22b430a4ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Thu, 19 Sep 2024 15:34:06 +0200 Subject: [PATCH 06/25] test workflow: modifying pgm_querysets.py and cm_querysets.py --- Tools/cm_querysets.py | 5 +++++ Tools/pgm_querysets.py | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Tools/cm_querysets.py b/Tools/cm_querysets.py index c736ffa..5920bc3 100644 --- a/Tools/cm_querysets.py +++ b/Tools/cm_querysets.py @@ -15,6 +15,11 @@ THIS IS SOME BLANK SPACE TO TEST THE GITHUB WORKFLOW + + + + + ''' def get_cm_querysets(): diff --git a/Tools/pgm_querysets.py b/Tools/pgm_querysets.py index 5d13e99..1653537 100644 --- a/Tools/pgm_querysets.py +++ b/Tools/pgm_querysets.py @@ -10,8 +10,6 @@ from viewser import Queryset, Column ''' - - THIS IS SOME BLANK SPACE TO TEST THE GITHUB WORKFLOW From 9187731188621ff8c5021b48cc06ea7165722e9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Thu, 19 Sep 2024 15:48:03 +0200 Subject: [PATCH 07/25] fix workflow --- .../trigger_views_pipeline_cm_catalog_dispatch.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml index 0b9366d..119fbe9 100644 --- a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml +++ b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml @@ -15,13 +15,13 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout views_pipeline repository + - name: Checkout viewsforecasting repository uses: actions/checkout@v3 with: - repository: lujzi05/views_pipeline + repository: lujzi05/viewsforecasting token: ${{ secrets.VIEWS_PIPELINE_ACCESS_TOKEN }} - - name: Clone viewsforecasting repository + - name: Clone views_pipeline repository run: | git clone https://github.com/your_username/lujzi05/views_pipeline.git cd views_pipeline @@ -29,10 +29,12 @@ jobs: - name: Run Python script run: | + cd views_pipeline python documentation/catalogs/generate_links_to_querysets.py - name: Commit and Push Changes run: | + cd views_pipeline git add documentation/catalogs/cm_model_catalog.md git commit -m "Automated changes by GitHub Actions" git push origin create_cm_catalog_01 From 98c709ace808f40eff105525b20f7a80c50720ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Thu, 19 Sep 2024 15:48:43 +0200 Subject: [PATCH 08/25] test workflow: modifying cm_querysets.py --- Tools/cm_querysets.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Tools/cm_querysets.py b/Tools/cm_querysets.py index 5920bc3..f01bbe7 100644 --- a/Tools/cm_querysets.py +++ b/Tools/cm_querysets.py @@ -14,12 +14,6 @@ THIS IS SOME BLANK SPACE TO TEST THE GITHUB WORKFLOW - - - - - - ''' def get_cm_querysets(): From 6683782b69b922ec7bfa1035006bee3529ec11e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Thu, 19 Sep 2024 16:00:53 +0200 Subject: [PATCH 09/25] fix workflow --- .../trigger_views_pipeline_cm_catalog_dispatch.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml index 119fbe9..6fdf9a2 100644 --- a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml +++ b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml @@ -1,4 +1,4 @@ -name: dispatch event to views_pipeline on changes in cm_querysets.py and pgm_querysets.py +name: Update views_pipeline on Changes in cm_querysets.py and pgm_querysets.py # Trigger on file changes in viewsforecasting on: @@ -18,12 +18,12 @@ jobs: - name: Checkout viewsforecasting repository uses: actions/checkout@v3 with: - repository: lujzi05/viewsforecasting + repository: prio-data/viewsforecasting token: ${{ secrets.VIEWS_PIPELINE_ACCESS_TOKEN }} - name: Clone views_pipeline repository run: | - git clone https://github.com/your_username/lujzi05/views_pipeline.git + git clone https://github.com/prio-data/views_pipeline.git cd views_pipeline git checkout create_cm_catalog_01 From abaf50a7cc51ec227f7f39b32408be8b058b0fbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Thu, 19 Sep 2024 16:01:22 +0200 Subject: [PATCH 10/25] test workflow: modifying cm_querysets.py --- Tools/cm_querysets.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Tools/cm_querysets.py b/Tools/cm_querysets.py index f01bbe7..f667f95 100644 --- a/Tools/cm_querysets.py +++ b/Tools/cm_querysets.py @@ -14,6 +14,20 @@ THIS IS SOME BLANK SPACE TO TEST THE GITHUB WORKFLOW + + + + + + + + + + + + + + ''' def get_cm_querysets(): From 5bdece8b04351023e4aadd51c8d04518c692d286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Fri, 20 Sep 2024 09:17:07 +0200 Subject: [PATCH 11/25] debugging workflow --- ...ger_views_pipeline_cm_catalog_dispatch.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml index 6fdf9a2..0f76943 100644 --- a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml +++ b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml @@ -9,28 +9,44 @@ on: paths: - Tools/cm_querysets.py - Tools/pgm_querysets.py + workflow_dispatch: jobs: modify-views_pipeline: runs-on: ubuntu-latest steps: + - name: Echo Step 1 - Starting Workflow + run: echo "Starting workflow to update views_pipeline..." + - name: Checkout viewsforecasting repository + run: echo "Checking out viewsforecasting repository..." uses: actions/checkout@v3 with: repository: prio-data/viewsforecasting token: ${{ secrets.VIEWS_PIPELINE_ACCESS_TOKEN }} + - name: Echo Step 2 - Cloning views_pipeline repository + run: echo "Cloning views_pipeline repository..." + - name: Clone views_pipeline repository run: | git clone https://github.com/prio-data/views_pipeline.git cd views_pipeline git checkout create_cm_catalog_01 + continue-on-error: false + + - name: Echo Step 3 - Running generate_links_to_querysets.py + run: echo "Running generate_links_to_querysets.py..." - name: Run Python script run: | cd views_pipeline python documentation/catalogs/generate_links_to_querysets.py + continue-on-error: false + + - name: Echo Step 4 - Committing changes + run: echo "Committing and pushing changes..." - name: Commit and Push Changes run: | @@ -41,4 +57,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.VIEWS_PIPELINE_ACCESS_TOKEN }} + - name: Echo Step 5 - Workflow completed + run: echo "Workflow completed successfully!" + From 56f098d2099c03b60d2ce84051dcd327bdd1c33b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Fri, 20 Sep 2024 10:03:50 +0200 Subject: [PATCH 12/25] test workflow: modifying cm_querysets.py --- Tools/cm_querysets.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Tools/cm_querysets.py b/Tools/cm_querysets.py index f667f95..3428e00 100644 --- a/Tools/cm_querysets.py +++ b/Tools/cm_querysets.py @@ -21,13 +21,6 @@ - - - - - - - ''' def get_cm_querysets(): From 859d6b3f34254ad0e37df0ace8767d61b336a840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Fri, 20 Sep 2024 10:06:18 +0200 Subject: [PATCH 13/25] fix error --- .github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml index 0f76943..494b993 100644 --- a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml +++ b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml @@ -20,7 +20,6 @@ jobs: run: echo "Starting workflow to update views_pipeline..." - name: Checkout viewsforecasting repository - run: echo "Checking out viewsforecasting repository..." uses: actions/checkout@v3 with: repository: prio-data/viewsforecasting From 752732244e688ff391f7d6db9244b63d2b06e7c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Fri, 20 Sep 2024 10:20:40 +0200 Subject: [PATCH 14/25] cloning viewsforecasting repository too --- ...ger_views_pipeline_cm_catalog_dispatch.yml | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml index 494b993..1ae42de 100644 --- a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml +++ b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml @@ -16,36 +16,27 @@ jobs: runs-on: ubuntu-latest steps: - - name: Echo Step 1 - Starting Workflow - run: echo "Starting workflow to update views_pipeline..." - - name: Checkout viewsforecasting repository uses: actions/checkout@v3 with: repository: prio-data/viewsforecasting token: ${{ secrets.VIEWS_PIPELINE_ACCESS_TOKEN }} - - name: Echo Step 2 - Cloning views_pipeline repository - run: echo "Cloning views_pipeline repository..." - - name: Clone views_pipeline repository run: | git clone https://github.com/prio-data/views_pipeline.git cd views_pipeline git checkout create_cm_catalog_01 - continue-on-error: false - - name: Echo Step 3 - Running generate_links_to_querysets.py - run: echo "Running generate_links_to_querysets.py..." + - name: Clone viewsforecasting repository + run: | + cd views_pipeline + git clone https://github.com/prio-data/viewsforecasting.git ../viewsforecasting - name: Run Python script run: | cd views_pipeline python documentation/catalogs/generate_links_to_querysets.py - continue-on-error: false - - - name: Echo Step 4 - Committing changes - run: echo "Committing and pushing changes..." - name: Commit and Push Changes run: | @@ -56,7 +47,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.VIEWS_PIPELINE_ACCESS_TOKEN }} - - name: Echo Step 5 - Workflow completed - run: echo "Workflow completed successfully!" - From 9c4a3b30987674fbb3e3428cf4ab3c1616f65cd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Fri, 20 Sep 2024 10:25:28 +0200 Subject: [PATCH 15/25] configure git --- .../workflows/trigger_views_pipeline_cm_catalog_dispatch.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml index 1ae42de..b7797ef 100644 --- a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml +++ b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml @@ -38,6 +38,11 @@ jobs: cd views_pipeline python documentation/catalogs/generate_links_to_querysets.py + - name: Configure Git + run: | + git config --global user.name "GitHub Actions" + git config --global user.email "actions@github.com" + - name: Commit and Push Changes run: | cd views_pipeline From 86f96533aa07f9e62504814c983d0a3622a063e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Fri, 20 Sep 2024 10:43:00 +0200 Subject: [PATCH 16/25] git push uses the token --- .../workflows/trigger_views_pipeline_cm_catalog_dispatch.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml index b7797ef..3c74dbc 100644 --- a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml +++ b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml @@ -48,8 +48,7 @@ jobs: cd views_pipeline git add documentation/catalogs/cm_model_catalog.md git commit -m "Automated changes by GitHub Actions" - git push origin create_cm_catalog_01 - env: - GITHUB_TOKEN: ${{ secrets.VIEWS_PIPELINE_ACCESS_TOKEN }} + git push https://${{ secrets.VIEWS_PIPELINE_ACCESS_TOKEN }}:x-oauth-basic@github.com/prio-data/views_pipeline.git create_cm_catalog_01 + From de2fb332b038df999ee93e293910c5f7ef1df58a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Fri, 20 Sep 2024 10:54:13 +0200 Subject: [PATCH 17/25] checkout to github_workflows branch --- .../trigger_views_pipeline_cm_catalog_dispatch.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml index 3c74dbc..1e870fc 100644 --- a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml +++ b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml @@ -5,18 +5,18 @@ on: push: branches: - main - - github_workflows + - github_workflows paths: - Tools/cm_querysets.py - Tools/pgm_querysets.py - workflow_dispatch: + workflow_dispatch: # enables manual triggering jobs: modify-views_pipeline: runs-on: ubuntu-latest steps: - - name: Checkout viewsforecasting repository + - name: Checkout viewsforecasting repository uses: actions/checkout@v3 with: repository: prio-data/viewsforecasting @@ -33,6 +33,12 @@ jobs: cd views_pipeline git clone https://github.com/prio-data/viewsforecasting.git ../viewsforecasting + # this step should be removed when merged to main + - name: Checkout github_workflows branch in viewsforecasting + run: | + cd ../viewsforecasting + git checkout GitHub_workflows + - name: Run Python script run: | cd views_pipeline From 59ce751b44e93bcac9d328d031056bfaf633b970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Fri, 20 Sep 2024 10:56:57 +0200 Subject: [PATCH 18/25] typo --- .../trigger_views_pipeline_cm_catalog_dispatch.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml index 1e870fc..d192334 100644 --- a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml +++ b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml @@ -5,7 +5,7 @@ on: push: branches: - main - - github_workflows + - github_workflows # TODO: remove when merge to main paths: - Tools/cm_querysets.py - Tools/pgm_querysets.py @@ -33,11 +33,11 @@ jobs: cd views_pipeline git clone https://github.com/prio-data/viewsforecasting.git ../viewsforecasting - # this step should be removed when merged to main + # TODO: this step should be removed when merged to main - name: Checkout github_workflows branch in viewsforecasting run: | cd ../viewsforecasting - git checkout GitHub_workflows + git checkout github_workflows - name: Run Python script run: | From 39572f202e6e11d57bb53ee8e7339097d5840798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Fri, 20 Sep 2024 11:08:44 +0200 Subject: [PATCH 19/25] debugging --- .../workflows/trigger_views_pipeline_cm_catalog_dispatch.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml index d192334..f6a34ae 100644 --- a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml +++ b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml @@ -32,16 +32,20 @@ jobs: run: | cd views_pipeline git clone https://github.com/prio-data/viewsforecasting.git ../viewsforecasting + git status # TODO: this step should be removed when merged to main - name: Checkout github_workflows branch in viewsforecasting run: | cd ../viewsforecasting + git status git checkout github_workflows + git status - name: Run Python script run: | cd views_pipeline + git status python documentation/catalogs/generate_links_to_querysets.py - name: Configure Git @@ -52,6 +56,7 @@ jobs: - name: Commit and Push Changes run: | cd views_pipeline + git status git add documentation/catalogs/cm_model_catalog.md git commit -m "Automated changes by GitHub Actions" git push https://${{ secrets.VIEWS_PIPELINE_ACCESS_TOKEN }}:x-oauth-basic@github.com/prio-data/views_pipeline.git create_cm_catalog_01 From 3557d005ed33ce4a106e24113c4d1397bb81c9e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Fri, 20 Sep 2024 11:21:13 +0200 Subject: [PATCH 20/25] debugging --- ...rigger_views_pipeline_cm_catalog_dispatch.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml index f6a34ae..1ff74eb 100644 --- a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml +++ b/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml @@ -30,17 +30,11 @@ jobs: - name: Clone viewsforecasting repository run: | - cd views_pipeline - git clone https://github.com/prio-data/viewsforecasting.git ../viewsforecasting - git status - - # TODO: this step should be removed when merged to main - - name: Checkout github_workflows branch in viewsforecasting - run: | - cd ../viewsforecasting - git status - git checkout github_workflows + git clone https://github.com/prio-data/viewsforecasting.git + cd viewsforecasting git status + git checkout github_workflows + # TODO: git checkout github_workflows should be removed when merged to main - name: Run Python script run: | @@ -58,7 +52,7 @@ jobs: cd views_pipeline git status git add documentation/catalogs/cm_model_catalog.md - git commit -m "Automated changes by GitHub Actions" + git commit -m "Automated changes by GitHub Actions" || echo "Nothing to commit" git push https://${{ secrets.VIEWS_PIPELINE_ACCESS_TOKEN }}:x-oauth-basic@github.com/prio-data/views_pipeline.git create_cm_catalog_01 From 1af733cdf26dfdb33c5802f8859ad93897430b08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Fri, 20 Sep 2024 14:26:35 +0200 Subject: [PATCH 21/25] final adjustments of the workflow --- ...atalog_dispatch.yml => update_views_pipeline_cm_catalog.yml} | 2 -- 1 file changed, 2 deletions(-) rename .github/workflows/{trigger_views_pipeline_cm_catalog_dispatch.yml => update_views_pipeline_cm_catalog.yml} (97%) diff --git a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml b/.github/workflows/update_views_pipeline_cm_catalog.yml similarity index 97% rename from .github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml rename to .github/workflows/update_views_pipeline_cm_catalog.yml index 1ff74eb..b353fa8 100644 --- a/.github/workflows/trigger_views_pipeline_cm_catalog_dispatch.yml +++ b/.github/workflows/update_views_pipeline_cm_catalog.yml @@ -32,7 +32,6 @@ jobs: run: | git clone https://github.com/prio-data/viewsforecasting.git cd viewsforecasting - git status git checkout github_workflows # TODO: git checkout github_workflows should be removed when merged to main @@ -50,7 +49,6 @@ jobs: - name: Commit and Push Changes run: | cd views_pipeline - git status git add documentation/catalogs/cm_model_catalog.md git commit -m "Automated changes by GitHub Actions" || echo "Nothing to commit" git push https://${{ secrets.VIEWS_PIPELINE_ACCESS_TOKEN }}:x-oauth-basic@github.com/prio-data/views_pipeline.git create_cm_catalog_01 From 561e4c0217322eee3428bc105d65b4a06221285a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Fri, 20 Sep 2024 14:28:20 +0200 Subject: [PATCH 22/25] test workflow: modifying pgm_querysets.py and cm_querysets.py --- Tools/cm_querysets.py | 6 ------ Tools/pgm_querysets.py | 2 ++ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Tools/cm_querysets.py b/Tools/cm_querysets.py index 3428e00..c736ffa 100644 --- a/Tools/cm_querysets.py +++ b/Tools/cm_querysets.py @@ -15,12 +15,6 @@ THIS IS SOME BLANK SPACE TO TEST THE GITHUB WORKFLOW - - - - - - ''' def get_cm_querysets(): diff --git a/Tools/pgm_querysets.py b/Tools/pgm_querysets.py index 1653537..5d13e99 100644 --- a/Tools/pgm_querysets.py +++ b/Tools/pgm_querysets.py @@ -10,6 +10,8 @@ from viewser import Queryset, Column ''' + + THIS IS SOME BLANK SPACE TO TEST THE GITHUB WORKFLOW From d8ab48ac01cb5c259d6a0e5cd7a84b1fee29b1a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Thu, 26 Sep 2024 13:59:54 +0200 Subject: [PATCH 23/25] adjust workflow after create_cm_catalog_01 was merged to main --- .github/workflows/update_views_pipeline_cm_catalog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_views_pipeline_cm_catalog.yml b/.github/workflows/update_views_pipeline_cm_catalog.yml index b353fa8..b0d360e 100644 --- a/.github/workflows/update_views_pipeline_cm_catalog.yml +++ b/.github/workflows/update_views_pipeline_cm_catalog.yml @@ -26,7 +26,7 @@ jobs: run: | git clone https://github.com/prio-data/views_pipeline.git cd views_pipeline - git checkout create_cm_catalog_01 + git status - name: Clone viewsforecasting repository run: | From caad297b433ab0577437c945b6ac583f75b5c70f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Thu, 26 Sep 2024 14:03:58 +0200 Subject: [PATCH 24/25] adjust workflow --- .github/workflows/update_views_pipeline_cm_catalog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_views_pipeline_cm_catalog.yml b/.github/workflows/update_views_pipeline_cm_catalog.yml index b0d360e..2671e63 100644 --- a/.github/workflows/update_views_pipeline_cm_catalog.yml +++ b/.github/workflows/update_views_pipeline_cm_catalog.yml @@ -51,7 +51,7 @@ jobs: cd views_pipeline git add documentation/catalogs/cm_model_catalog.md git commit -m "Automated changes by GitHub Actions" || echo "Nothing to commit" - git push https://${{ secrets.VIEWS_PIPELINE_ACCESS_TOKEN }}:x-oauth-basic@github.com/prio-data/views_pipeline.git create_cm_catalog_01 + git push https://${{ secrets.VIEWS_PIPELINE_ACCESS_TOKEN }}:x-oauth-basic@github.com/prio-data/views_pipeline.git From 13a1ce86d61ebf39deeff56904b5b92375c40e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borb=C3=A1la=20Farkas?= Date: Thu, 26 Sep 2024 14:07:04 +0200 Subject: [PATCH 25/25] test workflow: modifying pgm_querysets.py and cm_querysets.py --- Tools/cm_querysets.py | 2 ++ Tools/pgm_querysets.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Tools/cm_querysets.py b/Tools/cm_querysets.py index c736ffa..8c747ff 100644 --- a/Tools/cm_querysets.py +++ b/Tools/cm_querysets.py @@ -12,9 +12,11 @@ ''' + THIS IS SOME BLANK SPACE TO TEST THE GITHUB WORKFLOW + ''' def get_cm_querysets(): diff --git a/Tools/pgm_querysets.py b/Tools/pgm_querysets.py index 5d13e99..3c755a4 100644 --- a/Tools/pgm_querysets.py +++ b/Tools/pgm_querysets.py @@ -12,9 +12,11 @@ ''' + THIS IS SOME BLANK SPACE TO TEST THE GITHUB WORKFLOW + ''' def report(df): print()