Belle II Software development
sphinx_full_release.py
1#!/usr/bin/env python3
2
3
10
11"""
12Create sphinx documentation for a full 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, skip_test_if_light
19
20
21if __name__ == "__main__":
22
23 skip_test_if_light()
24
25
26 ignorebackward = '_BACKWARD_BACKWARD_WARNING_H'
27
28 sphinx_output_dir = os.getenv("BELLE2_SPHINX_OUTPUTDIR")
29 check_error_free(
30 "b2code-sphinx-warnings", "sphinx", None,
31 lambda x:
32 re.findall(ignorebackward, x),
33 ["-o", sphinx_output_dir] if sphinx_output_dir else []
34 )