diff --git a/ci/basop-pages/basop_index.html b/ci/basop-pages/basop_index.html index c6490b5828bdd45ad2d47fdf3bc5c66aae6127b7..148decbd1932a9e0bda68bf5d96f45d4dc3b6050 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 30412f98708aa49c4334b75dda2faf658348528f..77986464d9b3f14e1ba769af757615af5b11f124 100755 --- a/ci/setup_pages.py +++ b/ci/setup_pages.py @@ -42,14 +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", -] +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, @@ -76,16 +77,12 @@ def main(): sys.exit(1) index_html = PUBLIC_FOLDER.joinpath("index.html") - if project_id == PROJECT_ID_FLOAT_REPO: - create_landing_page_float_repo(jobs, index_html) - 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) -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: @@ -130,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) @@ -147,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, ]