@@ -15,29 +15,38 @@ Functions
1515.. autoapisummary ::
1616
1717 docbuild.cli.cmd_metadata.metaprocess.get_deliverable_from_doctype
18+ docbuild.cli.cmd_metadata.metaprocess.collect_files_flat
1819 docbuild.cli.cmd_metadata.metaprocess.process_deliverable
20+ docbuild.cli.cmd_metadata.metaprocess.update_repositories
1921 docbuild.cli.cmd_metadata.metaprocess.process_doctype
22+ docbuild.cli.cmd_metadata.metaprocess.store_productdocset_json
2023 docbuild.cli.cmd_metadata.metaprocess.process
2124
2225
2326Module Contents
2427---------------
2528
26- .. py :function :: get_deliverable_from_doctype(root: lxml.etree._ElementTree, context: docbuild.cli.context.DocBuildContext, doctype: docbuild.models.doctype.Doctype) -> list[docbuild.models.deliverable.Deliverable]
29+ .. py :function :: get_deliverable_from_doctype(root: lxml.etree._ElementTree, doctype: docbuild.models.doctype.Doctype) -> list[docbuild.models.deliverable.Deliverable]
2730
2831 Get deliverable from doctype.
2932
3033 :param root: The stitched XML node containing configuration.
31- :param context: The DocBuildContext containing environment configuration.
3234 :param doctype: The Doctype object to process.
3335 :return: A list of deliverables for the given doctype.
3436
3537
38+ .. py :function :: collect_files_flat(doctypes: collections.abc.Sequence[docbuild.models.doctype.Doctype], basedir: pathlib.Path | str ) -> collections.abc.Generator[tuple[docbuild.models.doctype.Doctype, str , list[pathlib.Path]], Any, None ]
39+
40+ Group files by (Product, Docset).
41+
42+ Yields (Doctype, Docset, List[Path]) using a flattened iteration strategy.
43+
44+
3645.. py :function :: process_deliverable(deliverable: docbuild.models.deliverable.Deliverable, * , repo_dir: pathlib.Path, temp_repo_dir: pathlib.Path, base_cache_dir: pathlib.Path, meta_cache_dir: pathlib.Path, dapstmpl: str ) -> bool
3746 :async:
3847
3948
40- Process a single deliverable.
49+ Process a single deliverable asynchronously .
4150
4251 This function creates a temporary clone of the deliverable's repository,
4352 checks out the correct branch, and then executes the DAPS command to
@@ -58,7 +67,17 @@ Module Contents
5867 :raises ValueError: If required configuration paths are missing.
5968
6069
61- .. py :function :: process_doctype(root: lxml.etree._ElementTree, context: docbuild.cli.context.DocBuildContext, doctype: docbuild.models.doctype.Doctype) -> bool
70+ .. py :function :: update_repositories(deliverables: list[docbuild.models.deliverable.Deliverable], bare_repo_dir: pathlib.Path) -> bool
71+ :async:
72+
73+
74+ Update all Git repositories associated with the deliverables.
75+
76+ :param deliverables: A list of Deliverable objects.
77+ :param bare_repo_dir: The root directory for storing permanent bare clones.
78+
79+
80+ .. py :function :: process_doctype(root: lxml.etree._ElementTree, context: docbuild.cli.context.DocBuildContext, doctype: docbuild.models.doctype.Doctype, * , exitfirst: bool = False , skip_repo_update: bool = False ) -> list[docbuild.models.deliverable.Deliverable]
6281 :async:
6382
6483
@@ -67,16 +86,29 @@ Module Contents
6786 :param root: The stitched XML node containing configuration.
6887 :param context: The DocBuildContext containing environment configuration.
6988 :param doctypes: A tuple of Doctype objects to process.
89+ :param exitfirst: If True, stop processing on the first failure.
90+ :return: True if all files passed validation, False otherwise
91+
92+
93+ .. py :function :: store_productdocset_json(context: docbuild.cli.context.DocBuildContext, doctypes: collections.abc.Sequence[docbuild.models.doctype.Doctype], stitchnode: lxml.etree._ElementTree) -> None
94+
95+ Collect all JSON file for product/docset and create a single file.
96+
97+ :param context: Beschreibung
98+ :param doctypes: Beschreibung
99+ :param stitchnode: Beschreibung
70100
71101
72- .. py :function :: process(context: docbuild.cli.context.DocBuildContext, doctypes: tuple [docbuild.models.doctype.Doctype]) -> int
102+ .. py :function :: process(context: docbuild.cli.context.DocBuildContext, doctypes: collections.abc.Sequence [docbuild.models.doctype.Doctype] | None , * , exitfirst: bool = False , skip_repo_update: bool = False ) -> int
73103 :async:
74104
75105
76106 Asynchronous function to process metadata retrieval.
77107
78108 :param context: The DocBuildContext containing environment configuration.
79- :param xmlfiles: A tuple or iterator of XML file paths to validate.
109+ :param doctype: A Doctype object to process.
110+ :param exitfirst: If True, stop processing on the first failure.
111+ :param skip_repo_update: If True, skip updating Git repositories before processing.
80112 :raises ValueError: If no envconfig is found or if paths are not
81113 configured correctly.
82114 :return: 0 if all files passed validation, 1 if any failures occurred.
0 commit comments