From fb3c89fe8da112c5d119c9a11a269b10660edf4c Mon Sep 17 00:00:00 2001 From: hannesdiedrich Date: Wed, 18 Dec 2024 10:06:48 +0100 Subject: [PATCH 1/9] GSYE-818: Use default CDS from gsy-web for testimg the CDS parser --- .github/workflows/gsy-framework_ci.yaml | 2 + gsy_framework/default_cds_downloader.py | 39 ++ tests/fixtures/community_datasheet.xlsx | Bin 16686 -> 0 bytes .../test_community_datasheet_parser.py | 510 +++++++++++++----- tox.ini | 3 +- 5 files changed, 423 insertions(+), 131 deletions(-) create mode 100644 gsy_framework/default_cds_downloader.py delete mode 100644 tests/fixtures/community_datasheet.xlsx diff --git a/.github/workflows/gsy-framework_ci.yaml b/.github/workflows/gsy-framework_ci.yaml index 18dc1932..51e88f7f 100644 --- a/.github/workflows/gsy-framework_ci.yaml +++ b/.github/workflows/gsy-framework_ci.yaml @@ -14,6 +14,8 @@ jobs: - name: Install dependencies env: TOXENV: ci + GITHUB_ACCESS_TOKEN: ${{ secrets.GSYDEV_TOKEN }} + TARGET_BRANCH: ${{ github.ref }} run: | pip install tox==3.24.4 tox -e $TOXENV diff --git a/gsy_framework/default_cds_downloader.py b/gsy_framework/default_cds_downloader.py new file mode 100644 index 00000000..860f2f85 --- /dev/null +++ b/gsy_framework/default_cds_downloader.py @@ -0,0 +1,39 @@ +import os +import shutil +import tempfile + +import requests + + +class DefaultCDSDownloader: + """Handle CDS file download""" + + def __init__(self): + self.workdir = tempfile.mkdtemp() + self.cds_file_path = os.path.join(self.workdir, "CommunityDataSheet.xlsx") + + def download(self): + """Download cds file to temp dir""" + header = { + "Authorization": f"Bearer {os.environ['GITHUB_ACCESS_TOKEN']}", + "X-GitHub-Api-Version": "2022-11-28", + "Accept": "application/vnd.github.raw+json", + } + url = ( + f"https://api.github.com/repos/gridsingularity/gsy-web/contents/config/static/" + f"CommunityDataSheet.xlsx?ref={os.environ.get('TARGET_BRANCH', 'master')}" + ) + response = requests.get(url, headers=header) + if response.status_code == 200: + with open(self.cds_file_path, "wb") as file: + file.write(response.content) + return + + assert False, ( + f"Default CDS could not be downloaded because of: " + f"{response.status_code}; {response.json()}" + ) + + def cleanup(self): + """Remove temporary directory.""" + shutil.rmtree(self.workdir) diff --git a/tests/fixtures/community_datasheet.xlsx b/tests/fixtures/community_datasheet.xlsx deleted file mode 100644 index 3d25c623e93b5c9549269ccb3260e6ead4a081f9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16686 zcmb`u1yEkemp+WUy9Rf6mmtC2-QC?GxVyUr*Wj+fEx5b81rP8+X8t>w+22mpZhcMB z_4a*lKXA|Oevb4xvJ$``C;$);5C8%)mTCaMHR!j`I`&4E4s^8deMMZibT2(j(78t# z$OYm(N~YxJZN+M!Bn zp+N1V23|$qMqcdP=vc?{y!#Q^MdWP+Dea?W#D9!#ejNVd;TR(hb#N^uF$uVDaAF9+ z!yjy~rR2i+Vi>X)pmq|0WM`tBx8MWP79eG1!D20jhvUx6w538APvAT#E}8FH#NLJk zYZL_Kwr1qjJhFbC0EY=fFDiwYOt5!0h&J6AMev+3a+s2W+|s;fZ>#?UY^)6_fZoK> zLyE{tRPrnv6_-gzJX}5N=g1zitOPhjU>bAU*_#l?fdBwx|3@)lz1`tzN%x1OTx{$u z^lfY`XkD!=e@U%tx*u>^}y zSQ&h0sHOL1T?R(wly`u@O~k;1gkr}G3{t!@P1_ko8(zjmV_`P@2orqoCn}Y@74qvR zb*LVWXa0~~AQ5AQ0=Y-J3PvJ_4rbiR2t2jmFM~C4DP~|ZDyc&qxw^Mfa6_A4F8LNq ztvsTl!#X3$S0fR>Jv1HwryhQnyQi2KT?0&ha9cnvWWC zMtE=GwsME~6TNIOg)l%(q@P+ag^|%1wa1dsV2)svm9Y>;?~KTRl|V9UtVJD!X`zjM z+vUcwS8};CO<1^+)%6+lU7lkP{D=^M008%(|0YlPKjitlBqJ4;?bGQIyv|kV-5UXQ zLQWyao7k-x_tByeKN;8_x%X60+0awMy?3UFf6E1RM+ zb{;c;E9NQ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=A)T9QkjyF>}?kIM`)yU`{=1Rk83ntS~a<-20dcV#Dt@LJ2PGgE5TldRjTy? zeBaV97?Lb0Z(BN%B2@bc#y~+1;rPuiTst z?!FtXAm+npJME4rayL0NxzJ!WCGBp}#Mga3lB~pMPVLl430FJ{TC@Um9ZBQx6Forv z^R_Y;o-%KUiclBJ^epd55eTl0a=X!&ma+NK2P4<~3Xn@zC``7dYtmv)2RRI1IAEPG zjYHGd?!Lp+V}%R^3`29o1$Rto(tIt2^MGC^(BO++iE)xol|*Nir?=TUUC;E>5CW$K zReCveyPdBJFK=cqIE42IGNr;>^+@=?md?FJKK^%|Dd&yTyaZe!b@ZoF_An9?}Usi(g09S$V@zLMa4sM zmaqh1nP^%K>)VhlW|XPx0=ZIl7Wf(Tv?#2;hkBw=yx5Asgcm;nvL-Z_A4;r;_>C|P zo&2(1k>4N_5QEu9q%$W1ue))mWeJ!IGs6v>65RQKr45zu#^Ujy@!LQS2`{b2)^;fg zZxGF;-LniYjJ8wtOV-QC5+nF$&U~mX^!y9LxybBf?0WbI`Z63WHr?%f>#cp-`}W}?LKJi z+bX?-e1D^WKqvrz)foR?R{LIK{P*@-#qmEU{$4-&UUmCdBYXQ(|8ouQKXHDq_j|84 z{j0gW(bXHy@3p7@ocw!j+ Date: Wed, 18 Dec 2024 10:28:11 +0100 Subject: [PATCH 2/9] GSYE-818: Add ability to provide a gsy-web branch for downloading the correct CDS file --- .github/pull_request_template.md | 10 +++++ .github/workflows/gsy-framework_ci.yaml | 51 ++++++++++++++++--------- 2 files changed, 42 insertions(+), 19 deletions(-) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..209110cf --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,10 @@ +## Reason for the proposed changes + +Please describe what we want to achieve and why. + +## Proposed changes + +- + + +**GSY_WEB_BRANCH**=master diff --git a/.github/workflows/gsy-framework_ci.yaml b/.github/workflows/gsy-framework_ci.yaml index 51e88f7f..56fbb315 100644 --- a/.github/workflows/gsy-framework_ci.yaml +++ b/.github/workflows/gsy-framework_ci.yaml @@ -6,23 +6,36 @@ jobs: test-build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Install dependencies - env: - TOXENV: ci - GITHUB_ACCESS_TOKEN: ${{ secrets.GSYDEV_TOKEN }} - TARGET_BRANCH: ${{ github.ref }} - run: | - pip install tox==3.24.4 - tox -e $TOXENV + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Parse gsy-web branch + env: + prBody: ${{ steps.PR.outputs.pr_body }} + run: | + echo "::set-output name=PARSED_GSY_WEB_BRANCH::$(echo -e $prBody | sed -n 's/.*\*\*GSY_WEB_BRANCH\*\*=\([^ ]*\).*/\1/p')" + id: parse_gsy_web_branch + - name: validate parsed gsy web tests branch + env: + PARSED_GSY_WEB_BRANCH: ${{ steps.parse_gsy_web_branch.outputs.PARSED_GSY_WEB_BRANCH }} + run: | + echo "::set-output name=GSY_WEB_BRANCH::${PARSED_GSY_WEB_BRANCH:-master}" + id: validated_gsy_web_branch + - name: Install dependencies + env: + TOXENV: ci + GITHUB_ACCESS_TOKEN: ${{ secrets.GSYDEV_TOKEN }} + TARGET_BRANCH: ${{ github.ref }} + INTEGRATION_TESTS_BRANCH: ${{ steps.validated_gsy_web_branch.outputs.GSY_WEB_BRANCH }} + run: | + pip install tox==3.24.4 + tox -e $TOXENV - - name: Check coverage with Codecov - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN_GSY_FRAMEWORK }} - fail_ci_if_error: true - verbose: true + - name: Check coverage with Codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN_GSY_FRAMEWORK }} + fail_ci_if_error: true + verbose: true From 24c90c0d5f8f2ffd922be69a8ba27a2fd3c209e1 Mon Sep 17 00:00:00 2001 From: hannesdiedrich Date: Wed, 18 Dec 2024 10:36:56 +0100 Subject: [PATCH 3/9] GSYE-818: Fix parsing of gsy-web branch --- .github/workflows/gsy-framework_ci.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/gsy-framework_ci.yaml b/.github/workflows/gsy-framework_ci.yaml index 56fbb315..96e0d1e7 100644 --- a/.github/workflows/gsy-framework_ci.yaml +++ b/.github/workflows/gsy-framework_ci.yaml @@ -27,8 +27,7 @@ jobs: env: TOXENV: ci GITHUB_ACCESS_TOKEN: ${{ secrets.GSYDEV_TOKEN }} - TARGET_BRANCH: ${{ github.ref }} - INTEGRATION_TESTS_BRANCH: ${{ steps.validated_gsy_web_branch.outputs.GSY_WEB_BRANCH }} + TARGET_BRANCH: ${{ steps.validated_gsy_web_branch.outputs.GSY_WEB_BRANCH }} run: | pip install tox==3.24.4 tox -e $TOXENV From 035d94bede346bd9e7a1b212f1c4c02d8ac63c4c Mon Sep 17 00:00:00 2001 From: hannesdiedrich Date: Wed, 18 Dec 2024 10:49:12 +0100 Subject: [PATCH 4/9] GSYE-818: Fix parsing of gsy-web branch --- .github/workflows/gsy-framework_ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gsy-framework_ci.yaml b/.github/workflows/gsy-framework_ci.yaml index 96e0d1e7..1b8cf5fd 100644 --- a/.github/workflows/gsy-framework_ci.yaml +++ b/.github/workflows/gsy-framework_ci.yaml @@ -15,13 +15,13 @@ jobs: env: prBody: ${{ steps.PR.outputs.pr_body }} run: | - echo "::set-output name=PARSED_GSY_WEB_BRANCH::$(echo -e $prBody | sed -n 's/.*\*\*GSY_WEB_BRANCH\*\*=\([^ ]*\).*/\1/p')" + echo "PARSED_GSY_WEB_BRANCH=$(echo -e $prBody | sed -n 's/.*\*\*GSY_WEB_BRANCH\*\*=\([^ ]*\).*/\1/p')" id: parse_gsy_web_branch - name: validate parsed gsy web tests branch env: PARSED_GSY_WEB_BRANCH: ${{ steps.parse_gsy_web_branch.outputs.PARSED_GSY_WEB_BRANCH }} run: | - echo "::set-output name=GSY_WEB_BRANCH::${PARSED_GSY_WEB_BRANCH:-master}" + echo "GSY_WEB_BRANCH=${PARSED_GSY_WEB_BRANCH:-master}" id: validated_gsy_web_branch - name: Install dependencies env: From 978c863c5ee9958f2597d01b8ad562e66be7bfca Mon Sep 17 00:00:00 2001 From: hannesdiedrich Date: Wed, 18 Dec 2024 10:50:29 +0100 Subject: [PATCH 5/9] GSYE-818: Fix parsing of gsy-web branch --- .github/workflows/gsy-framework_ci.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/gsy-framework_ci.yaml b/.github/workflows/gsy-framework_ci.yaml index 1b8cf5fd..1a40afba 100644 --- a/.github/workflows/gsy-framework_ci.yaml +++ b/.github/workflows/gsy-framework_ci.yaml @@ -12,10 +12,8 @@ jobs: with: python-version: 3.8 - name: Parse gsy-web branch - env: - prBody: ${{ steps.PR.outputs.pr_body }} run: | - echo "PARSED_GSY_WEB_BRANCH=$(echo -e $prBody | sed -n 's/.*\*\*GSY_WEB_BRANCH\*\*=\([^ ]*\).*/\1/p')" + echo "PARSED_GSY_WEB_BRANCH=$(echo -e ${{ steps.PR.outputs.pr_body }} | sed -n 's/.*\*\*GSY_WEB_BRANCH\*\*=\([^ ]*\).*/\1/p')" id: parse_gsy_web_branch - name: validate parsed gsy web tests branch env: From 00f9ded5c8271be57a123ff29333ecef29aa7556 Mon Sep 17 00:00:00 2001 From: hannesdiedrich Date: Wed, 18 Dec 2024 10:53:59 +0100 Subject: [PATCH 6/9] GSYE-818: Fix parsing of gsy-web branch --- .github/workflows/gsy-framework_ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gsy-framework_ci.yaml b/.github/workflows/gsy-framework_ci.yaml index 1a40afba..2b6be85b 100644 --- a/.github/workflows/gsy-framework_ci.yaml +++ b/.github/workflows/gsy-framework_ci.yaml @@ -13,7 +13,7 @@ jobs: python-version: 3.8 - name: Parse gsy-web branch run: | - echo "PARSED_GSY_WEB_BRANCH=$(echo -e ${{ steps.PR.outputs.pr_body }} | sed -n 's/.*\*\*GSY_WEB_BRANCH\*\*=\([^ ]*\).*/\1/p')" + echo "PARSED_GSY_WEB_BRANCH=$(echo -e ${{ github.event.pull_request.body }} | sed -n 's/.*\*\*GSY_WEB_BRANCH\*\*=\([^ ]*\).*/\1/p')" id: parse_gsy_web_branch - name: validate parsed gsy web tests branch env: From 8ff07703d83ed9f204eec617ca1fbe90dcaf3a97 Mon Sep 17 00:00:00 2001 From: hannesdiedrich Date: Wed, 18 Dec 2024 10:56:42 +0100 Subject: [PATCH 7/9] GSYE-818: Fix parsing of gsy-web branch --- .github/workflows/gsy-framework_ci.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gsy-framework_ci.yaml b/.github/workflows/gsy-framework_ci.yaml index 2b6be85b..957710b1 100644 --- a/.github/workflows/gsy-framework_ci.yaml +++ b/.github/workflows/gsy-framework_ci.yaml @@ -12,8 +12,10 @@ jobs: with: python-version: 3.8 - name: Parse gsy-web branch + env: + prBody: ${{ github.event.pull_request.body }} run: | - echo "PARSED_GSY_WEB_BRANCH=$(echo -e ${{ github.event.pull_request.body }} | sed -n 's/.*\*\*GSY_WEB_BRANCH\*\*=\([^ ]*\).*/\1/p')" + echo "PARSED_GSY_WEB_BRANCH=$(echo -e $prBody | sed -n 's/.*\*\*GSY_WEB_BRANCH\*\*=\([^ ]*\).*/\1/p')" id: parse_gsy_web_branch - name: validate parsed gsy web tests branch env: From 8224f00d7d5d7d9df4654d19e9fefa05913aed59 Mon Sep 17 00:00:00 2001 From: hannesdiedrich Date: Wed, 18 Dec 2024 10:59:29 +0100 Subject: [PATCH 8/9] GSYE-818: Fix parsing of gsy-web branch --- .github/workflows/gsy-framework_ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gsy-framework_ci.yaml b/.github/workflows/gsy-framework_ci.yaml index 957710b1..8e5d281b 100644 --- a/.github/workflows/gsy-framework_ci.yaml +++ b/.github/workflows/gsy-framework_ci.yaml @@ -15,7 +15,7 @@ jobs: env: prBody: ${{ github.event.pull_request.body }} run: | - echo "PARSED_GSY_WEB_BRANCH=$(echo -e $prBody | sed -n 's/.*\*\*GSY_WEB_BRANCH\*\*=\([^ ]*\).*/\1/p')" + echo "PARSED_GSY_WEB_BRANCH=$(echo -e $prBody | sed -n 's/.*\*\*GSY_WEB_BRANCH\*\*=\([^ ]*\).*/\1/p')" >> $GITHUB_OUTPUT id: parse_gsy_web_branch - name: validate parsed gsy web tests branch env: From 43d575ad8752f7e1e183f9b90bae958254963f95 Mon Sep 17 00:00:00 2001 From: hannesdiedrich Date: Wed, 18 Dec 2024 11:00:40 +0100 Subject: [PATCH 9/9] GSYE-818: Fix parsing of gsy-web branch --- .github/workflows/gsy-framework_ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gsy-framework_ci.yaml b/.github/workflows/gsy-framework_ci.yaml index 8e5d281b..7bc618b3 100644 --- a/.github/workflows/gsy-framework_ci.yaml +++ b/.github/workflows/gsy-framework_ci.yaml @@ -21,7 +21,7 @@ jobs: env: PARSED_GSY_WEB_BRANCH: ${{ steps.parse_gsy_web_branch.outputs.PARSED_GSY_WEB_BRANCH }} run: | - echo "GSY_WEB_BRANCH=${PARSED_GSY_WEB_BRANCH:-master}" + echo "GSY_WEB_BRANCH=${PARSED_GSY_WEB_BRANCH:-master}" >> $GITHUB_OUTPUT id: validated_gsy_web_branch - name: Install dependencies env: