Skip to content

Commit 055e39f

Browse files
committed
Fix verbosity
1 parent 5450323 commit 055e39f

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/ansys/dpf/core/documentation/generate_operators_doc.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,18 @@ def replace_operator_description(original_documentation: str, new_description: s
144144
)
145145

146146

147-
def update_operator_descriptions(docs_path: Path):
147+
def update_operator_descriptions(
148+
docs_path: Path,
149+
verbose: bool = False,
150+
):
148151
"""Update operator descriptions based on '*_upd.md' files in DPF documentation sources.
149152
150153
Parameters
151154
----------
152155
docs_path:
153156
Root path of the DPF documentation to update operator descriptions for.
157+
verbose:
158+
Whether to print progress information.
154159
155160
"""
156161
all_md_files = {}
@@ -186,9 +191,11 @@ def update_operator_descriptions(docs_path: Path):
186191
updated_content = replace_operator_description(base_content, new_description)
187192
with Path(base_path).open(mode="w", encoding="utf-8") as bf:
188193
bf.write(updated_content)
189-
print(f"Updated description for: {file_name}")
194+
if verbose:
195+
print(f"Updated description for: {file_name}")
190196
else:
191-
print(f"No operator description found in: {upd_path}")
197+
if verbose:
198+
print(f"No operator description found in: {upd_path}")
192199

193200

194201
def fetch_doc_info(server: dpf.AnyServerType, operator_name: str) -> dict:

0 commit comments

Comments
 (0)