diff --git a/.github/workflows/testing-and-deployment.yml b/.github/workflows/testing-and-deployment.yml index b17d868f..2c0bd9a9 100644 --- a/.github/workflows/testing-and-deployment.yml +++ b/.github/workflows/testing-and-deployment.yml @@ -1,4 +1,4 @@ -name: GH Actions +name: Actions # repo specific gh actions env: @@ -29,6 +29,7 @@ jobs: run: | pip install -r requirements_style.txt --disable-pip-version-check make + doc_build: name: Build Documentation runs-on: ubuntu-latest @@ -47,6 +48,7 @@ jobs: sudo apt-get install libgl1-mesa-glx xvfb pip install pyvista xvfb-run python -c "import pyvista; print(pyvista.Report())" + - name: Install ansys-mapdl-reader run: | pip install -r requirements_build.txt --disable-pip-version-check @@ -54,6 +56,7 @@ jobs: pip install dist/ansys*.whl --disable-pip-version-check cd tests/ xvfb-run python -c "from ansys.mapdl import reader as pymapdl_reader; print(pymapdl_reader.Report())" + - name: Build Documentation run: | sudo apt install pandoc -qy @@ -62,6 +65,7 @@ jobs: sudo apt install zip cd doc/build/html/ zip ../../../${{ env.PACKAGE_NAME }}-HTML.zip ./* + - name: Upload uses: actions/upload-artifact@v2 with: @@ -85,7 +89,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ['3.6', '3.7', '3.8', '3.9', '3.10'] + python-version: ['3.7', '3.8', '3.9', '3.10'] os: [ubuntu-latest, windows-latest] steps: diff --git a/ansys/mapdl/reader/rst.py b/ansys/mapdl/reader/rst.py index 9e8bac3e..528a6da3 100644 --- a/ansys/mapdl/reader/rst.py +++ b/ansys/mapdl/reader/rst.py @@ -3,6 +3,7 @@ Used: .../ansys/customize/include/fdresu.inc """ +import os from collections.abc import Iterable, Sequence import time import warnings @@ -2841,7 +2842,16 @@ def q_callback(): """exit when user wants to leave""" self._animating = False + def exit_callback(plotter, RenderWindowInteractor, event): + """exit when user wants to leave""" + self._animating = False + plotter.close() + plotter.add_key_event("q", q_callback) + if os.name == 'nt': + # Adding closing window callback + plotter.iren.add_observer(vtk.vtkCommand.ExitEvent, + lambda render, event: exit_callback(plotter, render, event)) first_loop = True cached_normals = [None for _ in range(n_frames)] diff --git a/setup.py b/setup.py index 50501038..a9d697ef 100644 --- a/setup.py +++ b/setup.py @@ -180,7 +180,7 @@ def compiler_name(): language='c++'), ], - python_requires='>=3.6.*', + python_requires='>=3.7.*', keywords='vtk MAPDL ANSYS cdb full rst', package_data={'ansys.mapdl.reader.examples': ['TetBeam.cdb', 'HexBeam.cdb',