Skip to content

Commit

Permalink
fix: nightly dev doc import fix (#2747)
Browse files Browse the repository at this point in the history
* fix: nightly dev doc import fix

* fix: nightly dev doc import fix 1

* fix: nightly dev doc import fix 2
  • Loading branch information
hpohekar authored Apr 30, 2024
1 parent 4610ee0 commit e614ea2
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions doc/datamodel_rstgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
def generate_meshing_datamodels():
"""Generate meshing datamodel RST files."""
meshing_datamodel_roots = []
available_datamodels = []
meshing_datamodels = [
"meshing",
"MeshingUtilities",
Expand All @@ -17,25 +18,36 @@ def generate_meshing_datamodels():
"workflow",
]
for meshing_datamodel in meshing_datamodels:
datamodel = importlib.import_module(
f"ansys.fluent.core.{_get_file_or_folder(mode='meshing', is_datamodel=True)}.{meshing_datamodel}"
)
meshing_datamodel_roots.append(datamodel.Root)
_write_datamodel_index_doc(meshing_datamodels, "meshing")
try:
datamodel = importlib.import_module(
f"ansys.fluent.core.{_get_file_or_folder(mode='meshing', is_datamodel=True)}.{meshing_datamodel}"
)
if datamodel:
meshing_datamodel_roots.append(datamodel.Root)
available_datamodels.append(meshing_datamodel)
except ModuleNotFoundError:
pass
_write_datamodel_index_doc(available_datamodels, "meshing")
for root in meshing_datamodel_roots:
generate(main_menu=root, mode="meshing", is_datamodel=True)


def generate_solver_datamodels():
"""Generate solver datamodel RST files."""
solver_datamodel_roots = []
available_datamodels = []
solver_datamodels = ["flicing", "preferences", "solverworkflow", "workflow"]
for solver_datamodel in solver_datamodels:
datamodel = importlib.import_module(
f"ansys.fluent.core.{_get_file_or_folder(mode='solver', is_datamodel=True)}.{solver_datamodel}"
)
solver_datamodel_roots.append(datamodel.Root)
_write_datamodel_index_doc(solver_datamodels, "solver")
try:
datamodel = importlib.import_module(
f"ansys.fluent.core.{_get_file_or_folder(mode='solver', is_datamodel=True)}.{solver_datamodel}"
)
if datamodel:
solver_datamodel_roots.append(datamodel.Root)
available_datamodels.append(solver_datamodel)
except ModuleNotFoundError:
pass
_write_datamodel_index_doc(available_datamodels, "solver")
for root in solver_datamodel_roots:
generate(main_menu=root, mode="solver", is_datamodel=True)

Expand Down

0 comments on commit e614ea2

Please sign in to comment.