You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# otherwise, connect to the existing gallery instance if available
elifGALLERY_INSTANCE[0] isnotNone:
mapdl=MapdlGrpc(
ip=GALLERY_INSTANCE[0]["ip"],
port=GALLERY_INSTANCE[0]["port"],
cleanup_on_exit=False,
loglevel=loglevel,
set_no_abort=set_no_abort,
use_vtk=use_vtk,
**start_parm,
)
ifclear_on_connect:
mapdl.clear()
returnmapdl
This does not need to be in the library.
We can just use Sphinx events to spawn an MAPDL instance.
The pseudo code is as follow:
defspawn_mapdl_instance(app, docname, source):
app._mapdl=launch_mapdl() # it should account for local and remote.defkill_mapdl_instance(app, exception):
app._mapdl.exit()
defsetup(app):
app.connect('builder-inited', spawn_mapdl_instance)
app.connect('build-finished', kill_mapdl_instance)
This way, we can remove the mentioned code from the library itself. It has been long irritating my eyes.
There is a chunk of code which seems unnecesary:
pymapdl/src/ansys/mapdl/core/launcher.py
Lines 1576 to 1604 in 3f16bf6
This does not need to be in the library.
We can just use Sphinx events to spawn an MAPDL instance.
The pseudo code is as follow:
This way, we can remove the mentioned code from the library itself. It has been long irritating my eyes.
Reference: https://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx-core-events
The text was updated successfully, but these errors were encountered: