|
6 | 6 | this script will generate html site for doxygen doc, coverage and other QA report/ |
7 | 7 |
|
8 | 8 | 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/ |
10 | 13 |
|
11 | 14 | Changelog: |
12 | 15 | - coverage_report_folder by default is located in `build` folder |
13 | 16 | - generalized by extract out `my_project_name` as a variable |
14 | 17 | - this python script works with generate_site.sh, run in build folder for local test |
15 | 18 | - github CI works in project root folder, while build folder must be called `build` |
16 | 19 |
|
| 20 | +
|
17 | 21 | Todo: flowfinder.html page is missing |
| 22 | + CI badge URL is hardcoded to this repo, |
18 | 23 |
|
19 | 24 | """ |
20 | 25 |
|
|
23 | 28 | import os.path |
24 | 29 |
|
25 | 30 | 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" |
29 | 34 | else: # local build test mode |
30 | 35 | coverage_report_folder = "{}_coverage/index.html".format(my_project_name) |
31 | 36 | doxygen_html_index = "doxygen/html/index.html" |
@@ -258,16 +263,16 @@ def build_index(self): |
258 | 263 | </thead> |
259 | 264 | <tbody> |
260 | 265 | <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> |
263 | 268 | </tr> |
264 | 269 | <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> |
267 | 272 | </tr> |
268 | 273 | <tr> |
269 | 274 | <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> |
271 | 276 | </tr> |
272 | 277 | </tbody> |
273 | 278 | </table> |
|
0 commit comments