Skip to content

Commit 146355d

Browse files
ci: Remove generated folders from pyfluent directory to avoid a git error [skip tests] (#4692)
To avoid a later git error in self-hosted runner which is due to some folder generated within the pyfluent directory while running the external_compressible_flow.py example script: 1. Make sure FM_* folder is generated in a temp directory. 2. Delete the generated wing_workflow_files at the end of the script. I think external_compressible_flow.py is the only problematic one based on errors found in github logs (see the issue details). --------- Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com>
1 parent fae6979 commit 146355d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove generated folders from pyfluent directory to avoid a git error [skip tests]

examples/00-fluent/external_compressible_flow.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@
6767
# the geometry files.
6868

6969
# sphinx_gallery_thumbnail_path = '_static/external_compressible_flow.png'
70+
import shutil
71+
import tempfile
72+
7073
import ansys.fluent.core as pyfluent
7174
from ansys.fluent.core import examples
7275

@@ -88,6 +91,9 @@
8891
)
8992
print(meshing_session.get_fluent_version())
9093

94+
tmpdir = tempfile.mkdtemp()
95+
meshing_session.preferences.MeshingWorkflow.TempFolder = tmpdir
96+
9197
###############################################################################
9298
# Initialize workflow
9399
# ~~~~~~~~~~~~~~~~~~~
@@ -374,4 +380,7 @@
374380

375381
solver_session.exit()
376382

383+
shutil.rmtree(tmpdir, ignore_errors=True)
384+
shutil.rmtree("wing_workflow_files", ignore_errors=True)
385+
377386
###############################################################################

0 commit comments

Comments
 (0)