From ca4192d6b13d8422d5ac9a8fecf65787548ad004 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 11 Sep 2024 07:56:40 +0200 Subject: [PATCH 1/3] pass project id to landing page creation --- ci/setup_pages.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ci/setup_pages.py b/ci/setup_pages.py index 30412f9870..988cab0674 100755 --- a/ci/setup_pages.py +++ b/ci/setup_pages.py @@ -49,6 +49,7 @@ JOBS_BASOP_REPO = [ "ivas-pytest-compare_ref-long-enc", "ivas-pytest-compare_ref-long-enc-lev+10", "ivas-pytest-compare_ref-long-enc-lev-10", + "complexity-stereo-in-ext-out", ] JOBS_FOR_PROJECT_ID = { @@ -77,7 +78,7 @@ def main(): index_html = PUBLIC_FOLDER.joinpath("index.html") if project_id == PROJECT_ID_FLOAT_REPO: - create_landing_page_float_repo(jobs, index_html) + create_landing_page(jobs, index_html, project_id) elif project_id == PROJECT_ID_BASOP_REPO: src = pathlib.Path("ci/basop-pages/basop_index.html").absolute() shutil.move(src, index_html) @@ -85,7 +86,7 @@ def main(): sys.exit(0) -def create_landing_page_float_repo(jobs, index_html): +def create_landing_page(jobs, index_html, project_id): # dynamically create the complexity links on the landing page link_html = list() link_html = ["") link_html_text = "\n".join(link_html) + if project_id == PROJECT_ID_FLOAT_REPO: + index_template = "index-pages.html" + elif project_id == PROJECT_ID_BASOP_REPO: + index_template = "basop-pages/basop_index.html" + index_pages_tmpl_path = ( - pathlib.Path(__file__).parent.joinpath("index-pages.html").absolute() + pathlib.Path(__file__).parent.joinpath(index_template).absolute() ) with open(index_pages_tmpl_path) as f: -- GitLab From 2c7b8b45a341e68ab9b5d0c5e3ee8ad477fc04da Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 11 Sep 2024 08:03:27 +0200 Subject: [PATCH 2/3] handle complexity jobs for basop repo --- ci/basop-pages/basop_index.html | 5 +++++ ci/setup_pages.py | 24 ++++++++++-------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/ci/basop-pages/basop_index.html b/ci/basop-pages/basop_index.html index c6490b5828..148decbd19 100644 --- a/ci/basop-pages/basop_index.html +++ b/ci/basop-pages/basop_index.html @@ -15,4 +15,9 @@
  • ivas-pytest-compare_ref-long-enc-lev+10
  • ivas-pytest-compare_ref-long-enc-lev-10
  • + +

    Complexity Reports

    + + {} + diff --git a/ci/setup_pages.py b/ci/setup_pages.py index 988cab0674..8d8870dec6 100755 --- a/ci/setup_pages.py +++ b/ci/setup_pages.py @@ -42,15 +42,15 @@ JOBS_FLOAT_REPO = { # "timeless" jobs (not complexity) "coverage-test-on-main-scheduled": "Coverage", } -JOBS_BASOP_REPO = [ - "ivas-pytest-compare_ref-long-dec", - "ivas-pytest-compare_ref-long-dec-lev+10", - "ivas-pytest-compare_ref-long-dec-lev-10", - "ivas-pytest-compare_ref-long-enc", - "ivas-pytest-compare_ref-long-enc-lev+10", - "ivas-pytest-compare_ref-long-enc-lev-10", - "complexity-stereo-in-ext-out", -] +JOBS_BASOP_REPO = { + "ivas-pytest-compare_ref-long-dec": "Pytest decoder compare to ref LTV", + "ivas-pytest-compare_ref-long-dec-lev+10": "Pytest decoder compare to ref LTV +10dB", + "ivas-pytest-compare_ref-long-dec-lev-10": "Pytest decoder compare to ref LTV -10dB", + "ivas-pytest-compare_ref-long-enc": "Pytest encoder compare to ref LTV", + "ivas-pytest-compare_ref-long-enc-lev+10": "Pytest encoder compare to ref LTV +10dB", + "ivas-pytest-compare_ref-long-enc-lev-10": "Pytest encoder compare to ref LTV -10dB", + "complexity-stereo-in-stereo-out": "Stereo in, Stereo out", +} JOBS_FOR_PROJECT_ID = { PROJECT_ID_FLOAT_REPO: JOBS_FLOAT_REPO, @@ -77,11 +77,7 @@ def main(): sys.exit(1) index_html = PUBLIC_FOLDER.joinpath("index.html") - if project_id == PROJECT_ID_FLOAT_REPO: - create_landing_page(jobs, index_html, project_id) - elif project_id == PROJECT_ID_BASOP_REPO: - src = pathlib.Path("ci/basop-pages/basop_index.html").absolute() - shutil.move(src, index_html) + create_landing_page(jobs, index_html, project_id) sys.exit(0) -- GitLab From c9735aca34ab3e96f7d45adc6c47476e0f6e1a09 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 11 Sep 2024 09:05:14 +0200 Subject: [PATCH 3/3] pass project_id into curl function --- ci/setup_pages.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/setup_pages.py b/ci/setup_pages.py index 8d8870dec6..77986464d9 100755 --- a/ci/setup_pages.py +++ b/ci/setup_pages.py @@ -132,7 +132,7 @@ def get_artifacts_for_jobs_and_return_num_failed( print(f"{job_id} - {job}") try: with TemporaryDirectory() as tmp_dir: - curl_for_artifacts(job_id, tmp_dir) + curl_for_artifacts(job_id, project_id, tmp_dir) tmp_dir = pathlib.Path(tmp_dir) @@ -149,12 +149,12 @@ def get_artifacts_for_jobs_and_return_num_failed( return failed_count -def curl_for_artifacts(job_id: int, exdir: str): +def curl_for_artifacts(job_id: int, project_id: int, exdir: str): cmd = [ "curl", "--request", "GET", - API_URL_BASE.format(os.environ["CI_PROJECT_ID"]) + f"/{job_id}/artifacts", + API_URL_BASE.format(project_id) + f"/{job_id}/artifacts", "--output", ARTIFACTS, ] -- GitLab