Loading ci/setup_pages.py +15 −6 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ JOBS_BASOP_REPO = { Job("ivas-pytest-mld-long-dec", 2), } JOBS_FOR_PROJECT_ID = {49: JOBS_FLOAT_REPO, 77: JOBS_BASOP_REPO} JOBS_FOR_PROJECT_ID = {PROJECT_ID_FLOAT_REPO: JOBS_FLOAT_REPO, PROJECT_ID_BASOP_REPO: JOBS_BASOP_REPO} ARTIFACTS = "artifacts.zip" API_URL_BASE = "https://forge.3gpp.org/rep/api/v4/projects/{}/jobs" Loading Loading @@ -64,8 +64,11 @@ def setup_pages(project_id: int): if project_id == PROJECT_ID_FLOAT_REPO: pathlib.Path("ci/index-pages.html").rename(index_html) elif project_id == PROJECT_ID_BASOP_REPO: mld_file = pathlib.Path(PUBLIC_FOLDER.joinpath("mld.csv")) html_table_from_csv_file(mld_file, index_html) mld_files = [f for f in PUBLIC_FOLDER.iterdir() if f.suffix == ".csv"] # just to check that there are two files with open(index_html, "w") as f: for mld_f in mld_files: f.write(mld_f.name) else: raise ValueError(f"Invalid project ID: '{project_id}'") Loading Loading @@ -117,6 +120,12 @@ def get_artifacts_for_jobs_and_return_num_failed( curl_for_artifacts(job_id, str(tmp_dir)) for artifact in tmp_dir.iterdir(): # this is only needed until the new naming of the csv files is on main if project_id == PROJECT_ID_BASOP_REPO: tmp_dir.joinpath(artifact).rename( PUBLIC_FOLDER.joinpath(artifact.name + f"-id_{job_id}") ) else: tmp_dir.joinpath(artifact).rename( PUBLIC_FOLDER.joinpath(artifact) ) Loading Loading
ci/setup_pages.py +15 −6 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ JOBS_BASOP_REPO = { Job("ivas-pytest-mld-long-dec", 2), } JOBS_FOR_PROJECT_ID = {49: JOBS_FLOAT_REPO, 77: JOBS_BASOP_REPO} JOBS_FOR_PROJECT_ID = {PROJECT_ID_FLOAT_REPO: JOBS_FLOAT_REPO, PROJECT_ID_BASOP_REPO: JOBS_BASOP_REPO} ARTIFACTS = "artifacts.zip" API_URL_BASE = "https://forge.3gpp.org/rep/api/v4/projects/{}/jobs" Loading Loading @@ -64,8 +64,11 @@ def setup_pages(project_id: int): if project_id == PROJECT_ID_FLOAT_REPO: pathlib.Path("ci/index-pages.html").rename(index_html) elif project_id == PROJECT_ID_BASOP_REPO: mld_file = pathlib.Path(PUBLIC_FOLDER.joinpath("mld.csv")) html_table_from_csv_file(mld_file, index_html) mld_files = [f for f in PUBLIC_FOLDER.iterdir() if f.suffix == ".csv"] # just to check that there are two files with open(index_html, "w") as f: for mld_f in mld_files: f.write(mld_f.name) else: raise ValueError(f"Invalid project ID: '{project_id}'") Loading Loading @@ -117,6 +120,12 @@ def get_artifacts_for_jobs_and_return_num_failed( curl_for_artifacts(job_id, str(tmp_dir)) for artifact in tmp_dir.iterdir(): # this is only needed until the new naming of the csv files is on main if project_id == PROJECT_ID_BASOP_REPO: tmp_dir.joinpath(artifact).rename( PUBLIC_FOLDER.joinpath(artifact.name + f"-id_{job_id}") ) else: tmp_dir.joinpath(artifact).rename( PUBLIC_FOLDER.joinpath(artifact) ) Loading