From 63a8bcc46669dd7b70afbcab0cbcfb448eac152d Mon Sep 17 00:00:00 2001 From: antoineMerleEUM Date: Wed, 29 May 2024 09:27:37 +0000 Subject: [PATCH 1/8] first try to create action for github actions --- .github/workflows/main.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..04236e80 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,30 @@ +name: CI + +on: [ push , pull_request ] + +jobs: + make_xml: + runs-on: ubuntu-latest + + steps: + - name: checkout + uses: actions/checkout@v2 + with: + ref: ${{ github.ref }} + - name: create xml files and push + run: | + python scripts/create_master_lists.py + ls xml + git config --global user.email "efucile@wmo.int" + git config --global user.name "Enrico Fucile" + git branch + # Use of status --pocelain to check if files have been changed or not + # If changes commit and push + if [[ `git status --porcelain` ]]; then + git add . + git commit -m "xml,txt files" -a + git push + # if not, only print a message saying not commit + else + echo "No changes to commit" + fi \ No newline at end of file From 976cea0e0b8724dbbdbbb0d0c3ce7c47ed396392 Mon Sep 17 00:00:00 2001 From: antoineMerleEUM Date: Wed, 29 May 2024 09:30:46 +0000 Subject: [PATCH 2/8] install the missing deps dictoxml --- .github/workflows/main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 04236e80..d6e7fc27 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,8 +12,10 @@ jobs: with: ref: ${{ github.ref }} - name: create xml files and push - run: | - python scripts/create_master_lists.py + run: | + apt-get install -y python3-pip + pip3 install dicttoxml + python3 scripts/create_master_lists.py ls xml git config --global user.email "efucile@wmo.int" git config --global user.name "Enrico Fucile" From 04804159220f96275ba82052e0cfc6079b00b726 Mon Sep 17 00:00:00 2001 From: antoineMerleEUM Date: Wed, 29 May 2024 09:31:33 +0000 Subject: [PATCH 3/8] sudo --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d6e7fc27..9c77b3ac 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: ref: ${{ github.ref }} - name: create xml files and push run: | - apt-get install -y python3-pip + sudo apt-get install -y python3-pip pip3 install dicttoxml python3 scripts/create_master_lists.py ls xml From 8638c6da6df5957ed101bd5a07fc281af646a7d5 Mon Sep 17 00:00:00 2001 From: Enrico Fucile Date: Wed, 29 May 2024 09:31:53 +0000 Subject: [PATCH 4/8] xml,txt files --- txt/Template.txt | 6 +++--- xml/CodeFlag.xml | 2 +- xml/Template.xml | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/txt/Template.txt b/txt/Template.txt index 3d218e75..70cf49c7 100644 --- a/txt/Template.txt +++ b/txt/Template.txt @@ -3656,9 +3656,9 @@ Product definition template 4.124 - Analysis or forecast at a horizontal level o "Product definition template 4.127 - Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for radionuclides",54,Type of second fixed surface,(see Code table 4.5),,4.5,,Operational "Product definition template 4.127 - Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for radionuclides",55,Scale factor of second fixed surface,,,,,Operational "Product definition template 4.127 - Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for radionuclides",56-59,Scaled value of second fixed surface,,,,,Operational -"Product definition template 4.127 - Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for radionuclides",60,Type of ensemble forecast,(See Code table 4.6),,4.6,, -"Product definition template 4.127 - Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for radionuclides",61,Perturbation Number,,,,, -"Product definition template 4.127 - Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for radionuclides",62,Number of forecasts in ensemble,,,,, +"Product definition template 4.127 - Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for radionuclides",60,Type of ensemble forecast,(See Code table 4.6),,4.6,,Operational +"Product definition template 4.127 - Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for radionuclides",61,Perturbation Number,,,,,Operational +"Product definition template 4.127 - Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for radionuclides",62,Number of forecasts in ensemble,,,,,Operational "Product definition template 4.127 - Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for radionuclides",63-64,Year of end of overall time interval,,,,,Operational "Product definition template 4.127 - Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for radionuclides",65,Month of end of overall time interval,,,,,Operational "Product definition template 4.127 - Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for radionuclides",66,Day of end of overall time interval,,,,,Operational diff --git a/xml/CodeFlag.xml b/xml/CodeFlag.xml index 69dcd642..553e44ea 100644 --- a/xml/CodeFlag.xml +++ b/xml/CodeFlag.xml @@ -1,5 +1,5 @@ - + Code table 0.0 - Discipline of processed data in the GRIB message, number of GRIB Master table 0 diff --git a/xml/Template.xml b/xml/Template.xml index 1189cf42..0f35c4da 100644 --- a/xml/Template.xml +++ b/xml/Template.xml @@ -1,5 +1,5 @@ - + Identification template 1.0 - calendar definition 24 @@ -36578,7 +36578,7 @@ 4.6 - + Operational Product definition template 4.127 - Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for radionuclides @@ -36588,7 +36588,7 @@ - + Operational Product definition template 4.127 - Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for radionuclides @@ -36598,7 +36598,7 @@ - + Operational Product definition template 4.127 - Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for radionuclides From d8767e9e6f813c81da644fbf030fa436121a539b Mon Sep 17 00:00:00 2001 From: antoineMerleEUM Date: Tue, 4 Jun 2024 12:03:28 +0200 Subject: [PATCH 5/8] Fix push Add permissions to push --- .github/workflows/main.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9c77b3ac..14a95056 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,13 +2,16 @@ name: CI on: [ push , pull_request ] +permissions: + contents: write + jobs: make_xml: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: ${{ github.ref }} - name: create xml files and push @@ -29,4 +32,4 @@ jobs: # if not, only print a message saying not commit else echo "No changes to commit" - fi \ No newline at end of file + fi From e50da1a4e6df97982bd2e980a2801a91b0ae9b23 Mon Sep 17 00:00:00 2001 From: Enrico Fucile Date: Tue, 4 Jun 2024 10:03:46 +0000 Subject: [PATCH 6/8] xml,txt files --- xml/CodeFlag.xml | 2 +- xml/Template.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xml/CodeFlag.xml b/xml/CodeFlag.xml index 553e44ea..46b2a13b 100644 --- a/xml/CodeFlag.xml +++ b/xml/CodeFlag.xml @@ -1,5 +1,5 @@ - + Code table 0.0 - Discipline of processed data in the GRIB message, number of GRIB Master table 0 diff --git a/xml/Template.xml b/xml/Template.xml index 0f35c4da..3b446ced 100644 --- a/xml/Template.xml +++ b/xml/Template.xml @@ -1,5 +1,5 @@ - + Identification template 1.0 - calendar definition 24 From 51f1d6a2ee62e34b305efc392f87c5f46b19ad97 Mon Sep 17 00:00:00 2001 From: antoineMerleEUM Date: Tue, 4 Jun 2024 12:10:42 +0200 Subject: [PATCH 7/8] push only on push --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 14a95056..7b096f81 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,6 @@ name: CI -on: [ push , pull_request ] +on: [ push ] permissions: contents: write @@ -8,7 +8,6 @@ permissions: jobs: make_xml: runs-on: ubuntu-latest - steps: - name: checkout uses: actions/checkout@v3 From abeb1c1c77c373ada80b4346767bd39c1a9c601a Mon Sep 17 00:00:00 2001 From: Enrico Fucile Date: Tue, 4 Jun 2024 10:11:02 +0000 Subject: [PATCH 8/8] xml,txt files --- xml/CodeFlag.xml | 2 +- xml/Template.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xml/CodeFlag.xml b/xml/CodeFlag.xml index 46b2a13b..05b5bde1 100644 --- a/xml/CodeFlag.xml +++ b/xml/CodeFlag.xml @@ -1,5 +1,5 @@ - + Code table 0.0 - Discipline of processed data in the GRIB message, number of GRIB Master table 0 diff --git a/xml/Template.xml b/xml/Template.xml index 3b446ced..ed76ad33 100644 --- a/xml/Template.xml +++ b/xml/Template.xml @@ -1,5 +1,5 @@ - + Identification template 1.0 - calendar definition 24