Simplify doc build
germa89 opened this issue · comments
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:
def spawn_mapdl_instance(app, docname, source):
app._mapdl = launch_mapdl() # it should account for local and remote.
def kill_mapdl_instance(app, exception):
app._mapdl.exit()
def setup(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.
Reference: https://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx-core-events