Skip to content

Commit 2938745

Browse files
committed
fix: site_generation.py doxygen html path
1 parent cddc222 commit 2938745

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

scripts/site_generation.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,20 @@
66
this script will generate html site for doxygen doc, coverage and other QA report/
77
88
adapted from EERA: https://github.com/ScottishCovidResponse/Covid19_EERAModel/blob/dev/scripts/site_generation.py
9-
with hand-crafted: flawfinder, simalrity, clang_tidy parsers
9+
with hand-crafted: flawfinder, similarity, clang_tidy parsers
10+
11+
All generated html file are located in repo_root/site/,
12+
so all other resource path pathes should be relative to repo_root/site/
1013
1114
Changelog:
1215
- coverage_report_folder by default is located in `build` folder
1316
- generalized by extract out `my_project_name` as a variable
1417
- this python script works with generate_site.sh, run in build folder for local test
1518
- github CI works in project root folder, while build folder must be called `build`
1619
20+
1721
Todo: flowfinder.html page is missing
22+
CI badge URL is hardcoded to this repo,
1823
1924
"""
2025

@@ -23,9 +28,9 @@
2328
import os.path
2429

2530
my_project_name = "parallel-preprocessor"
26-
if os.path.exists("src"): # CI mode
27-
coverage_report_folder = "build/{}_coverage/index.html".format(my_project_name)
28-
doxygen_html_index = "doxygen/html/index.html"
31+
if os.path.exists("src"): # CI mode. all pathes should be relative to repo_root/site/
32+
coverage_report_folder = "../build/{}_coverage/index.html".format(my_project_name)
33+
doxygen_html_index = "../doxygen/html/index.html"
2934
else: # local build test mode
3035
coverage_report_folder = "{}_coverage/index.html".format(my_project_name)
3136
doxygen_html_index = "doxygen/html/index.html"
@@ -258,16 +263,16 @@ def build_index(self):
258263
</thead>
259264
<tbody>
260265
<tr>
261-
<td>master</td>
262-
<td> <img src="https://github.com/ScottishCovidResponse/Covid19_EERAModel/workflows/Covid19EERAModel/badge.svg?branch=master&event=push" class="img-rounded" alt="Master Status"> </td>
266+
<td>master branch on UKAEA</td>
267+
<td> <img src="https://github.com/ukaea/parallel-preprocessor/workflows/ubuntu-macos/badge.svg?branch=master&event=push" class="img-rounded" alt="Master Status"> </td>
263268
</tr>
264269
<tr>
265-
<td>dev</td>
266-
<td> <img src="https://github.com/ScottishCovidResponse/Covid19_EERAModel/workflows/Covid19EERAModel/badge.svg?branch=dev&event=push" class="img-rounded" alt="Dev Status"> </td>
270+
<td>dev of Qingfeng Xia fork</td>
271+
<td> <img src="https://github.com/qingfengxia/parallel-preprocessor/workflows/ubuntu-macos/badge.svg?branch=dev&event=push" class="img-rounded" alt="Dev Status"> </td>
267272
</tr>
268273
<tr>
269274
<td>gh-pages</td>
270-
<td> <img src="https://github.com/ScottishCovidResponse/Covid19_EERAModel/workflows/Covid19EERAModel/badge.svg?branch=gh-pages&event=push" class="img-rounded" alt="GitHub Pages Status"> </td>
275+
<td> <img src="https://github.com/ukaea/parallel-preprocessor/workflows/ubuntu-macos/badge.svg?branch=gh-pages&event=push" class="img-rounded" alt="GitHub Pages Status"> </td>
271276
</tr>
272277
</tbody>
273278
</table>

0 commit comments

Comments
 (0)