3939@task (pre = [config .install , config .install_node ], aliases = ("libdocs" ,))
4040def build_libdocs (ctx ):
4141 """Generates library specification and documentation using ``docgen``"""
42- libspec_promise = shell .docgen (
42+ shell .docgen (
4343 ctx ,
4444 "rpaframework" ,
4545 "--no-patches" ,
4646 "--format libspec" ,
4747 "--output docs/source/libspec/" ,
4848 * DOCGEN_EXCLUDES ,
49- asynchronous = True ,
5049 )
51- html_promise = shell .docgen (
50+ shell .docgen (
5251 ctx ,
5352 "rpaframework" ,
54- "--template docs/source/template/libdoc/libdoc.html" ,
5553 "--format html" ,
5654 "--output docs/source/include/libdoc/" ,
5755 * DOCGEN_EXCLUDES ,
58- asynchronous = True ,
5956 )
60- json_promise = shell .docgen (
57+ shell .docgen (
6158 ctx ,
6259 "rpaframework" ,
6360 "--no-patches" ,
6461 "--format json-html" ,
6562 "--output docs/source/json/" ,
6663 * DOCGEN_EXCLUDES ,
67- asynchronous = True ,
6864 )
69- libspec_promise .join ()
70- html_promise .join ()
71- json_promise .join ()
7265 shutil .copy2 (
7366 "docs/source/template/iframeResizer.contentWindow.map" ,
7467 "docs/source/include/libdoc/" ,
@@ -79,6 +72,14 @@ def _check_documentation_build(run_result: Result):
7972 lines = f"{ run_result .stdout } \n { run_result .stderr } " .splitlines ()
8073 for line in lines :
8174 if any (trace in line for trace in FAILURE_TRACES ):
75+ # Skip known import warnings for optional packages during documentation build
76+ known_import_issues = [
77+ "failed to import class 'Hubspot.Hubspot'" ,
78+ "failed to import class 'Twitter.Twitter'" ,
79+ ]
80+ if any (issue in line for issue in known_import_issues ):
81+ print (f"WARNING: Skipping known import issue: { line } " )
82+ continue
8283 raise RuntimeError (line )
8384
8485
0 commit comments