Belle II Software development
sphinx_light_release.py
1#!/usr/bin/env python3
2
3
10
11"""
12Create sphinx documentation for a light release and make sure that there are no warnings.
13However, a few warnings can not easily be omitted and are therefore accepted for now.
14"""
15
16import os
17import re
18from b2test_utils import check_error_free
19
20
21if __name__ == "__main__":
22
23
24 ignorebackward = '_BACKWARD_BACKWARD_WARNING_H'
25
27 ignoreonlinebook = 'online_book'
28
29 ignoreaddtriggersimulation = 'add_trigger_simulation'
30
31 ignoreaddsimulation = 'add_simulation'
32
33 ignoreaddreconstruction = 'add_reconstruction'
34
35 ignoreaddcdstoutput = 'add_cdst_output'
36
37 ignorevalidationtools = 'validation_tools'
38
39 ignoreincludeproblem = 'Problems with "include" directive path'
40
41 ignoretrackmatching = 'trk_matching'
42
43 ignoretrackingeventtimeextraction = 'tracking_eventtimeextraction'
44
45 sphinx_output_dir = os.getenv("BELLE2_SPHINX_LIGHT_OUTPUTDIR")
46 check_error_free(
47 "b2code-sphinx-warnings", "sphinx", None,
48 lambda x:
49 re.findall(ignorebackward, x) or
50 re.findall(ignoreaddsimulation, x) or
51 re.findall(ignoreaddtriggersimulation, x) or
52 re.findall(ignoreaddreconstruction, x) or
53 re.findall(ignoreaddcdstoutput, x) or
54 re.findall(ignorevalidationtools, x) or
55 re.findall(ignoreincludeproblem, x) or
56 re.findall(ignoreonlinebook, x) or
57 re.findall(ignoretrackmatching, x) or
58 re.findall(ignoretrackingeventtimeextraction, x),
59 ['--light'] + ["-o", sphinx_output_dir] if sphinx_output_dir else []
60 )