Skip to content

Commit 329b011

Browse files
akaszynskiansys-akaszynsjazztekk
authored
Update to ansys.mapdl.core (#329)
* initial module refactor for core * rename module * merge with mapdl_grpc * merge with mapdl_grpc * add back in mapdl math * get initial tests to run * chiping away at the tests * added math, tests, grpc * finalize tests add back in reader tests * move over docs * patch pool * pymapdl.reader --> ansys-mapdl-reader * update pipeline * add github actions * fix install requires for ansys.mapdl.reader * patch spelling and fix setup * patch setup.py * updated docs * additional updates to documentation * additional doc updates * final doc fixes * update doc requirements * add back in corba interface * patch setup for scipy * remove benchmark temp files * add in corba and update twine * patch multi-mode testing * revert changes to corba * using alternate method for selecting tests * general improvements (#330) * general improvements * fix spelling error direcly --> directly Co-authored-by: Alex Kaszynski <[email protected]> * update doc build * add console and corba testing * fix spelling * patch deployment * use env var for github pages target * add condition to avoid similtanious merges * Update ci-build.yml Co-authored-by: Alexander Kaszynski <[email protected]> Co-authored-by: jazztekk <[email protected]>
1 parent d0b4e20 commit 329b011

File tree

646 files changed

+163980
-121746
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

646 files changed

+163980
-121746
lines changed

.ci/azure-pipelines.yml

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# azure pipelines build and test ansys-mapdl-core
2+
3+
variables:
4+
ALLOW_PLOTTING: true
5+
package_name: ansys-mapdl-core
6+
SHELLOPTS: 'errexit:pipefail'
7+
8+
trigger:
9+
branches:
10+
include:
11+
- '*'
12+
exclude:
13+
- gh-pages
14+
tags:
15+
include:
16+
- '*'
17+
18+
jobs:
19+
- job: Linux
20+
variables:
21+
python.version: '3.7' # due to VTK 8.1.2 requirement for docbuild
22+
DISPLAY: ':99.0'
23+
MAPDL_IMAGE: 'docker.pkg.github.com/pyansys/pymapdl/mapdl:v21.1.0'
24+
PYMAPDL_PORT: 32771 # default of 50052 does not work on azure devops
25+
PYMAPDL_START_INSTANCE: FALSE
26+
PYANSYS_OFF_SCREEN: True
27+
pool:
28+
vmImage: 'ubuntu-20.04'
29+
steps:
30+
- task: UsePythonVersion@0
31+
inputs:
32+
versionSpec: '$(python.version)'
33+
displayName: 'Use Python $(python.version)'
34+
35+
- script: |
36+
uname -a
37+
displayName: Display kernel version
38+
39+
- script: |
40+
.ci/setup_headless_display.sh
41+
pip install -r .ci/requirements_test_xvfb.txt
42+
python .ci/display_test.py
43+
displayName: Install and start a virtual framebuffer
44+
45+
- script: |
46+
pip install -r requirements_build.txt
47+
python setup.py bdist_wheel
48+
pip install dist/ansys*.whl
49+
python -c "from ansys.mapdl import core as pymapdl; print(pymapdl.Report())"
50+
displayName: Build, install, and validate installation of ansys-mapdl-core
51+
52+
- script: |
53+
set -ex
54+
echo $(GH_PAT) | docker login -u $(GH_USERNAME) --password-stdin docker.pkg.github.com
55+
docker pull $(MAPDL_IMAGE)
56+
docker run -e ANSYSLMD_LICENSE_FILE=1055@$(LICENSE_SERVER) --restart always --name mapdl -p $(PYMAPDL_PORT):50052 $(MAPDL_IMAGE) -smp > log.txt &
57+
grep -q 'Server listening on' <(timeout 60 tail -f log.txt)
58+
python -c "from ansys.mapdl.core import launch_mapdl; print(launch_mapdl())"
59+
displayName: Pull, launch, and validate MAPDL service
60+
61+
- script: |
62+
pip install -r requirements_test.txt
63+
pip install pytest-azurepipelines
64+
pytest -v --junitxml=junit/test-results.xml --cov --cov-report=xml --cov-report=html
65+
displayName: 'Test Core API'
66+
67+
- script: |
68+
cat log.txt
69+
displayName: 'Display MAPDL Logs'
70+
condition: always()
71+
72+
- script: |
73+
pip install twine
74+
python setup.py sdist
75+
twine upload --skip-existing dist/*
76+
displayName: 'Upload to PyPi when tagged'
77+
condition: contains(variables['Build.SourceBranch'], 'refs/tags/')
78+
env:
79+
TWINE_USERNAME: __token__
80+
TWINE_PASSWORD: $(PYPI_TOKEN)
81+
TWINE_REPOSITORY_URL: "https://upload.pypi.org/legacy/"
82+
83+
84+
# - job: Windows
85+
# strategy:
86+
# matrix:
87+
# Python36:
88+
# python.version: '3.6'
89+
# Python37:
90+
# python.version: '3.7'
91+
# Python38:
92+
# python.version: '3.8'
93+
# pool:
94+
# vmImage: 'vs2017-win2016'
95+
# steps:
96+
# - task: UsePythonVersion@0
97+
# inputs:
98+
# versionSpec: $(python.version)
99+
# addToPath: true
100+
# - powershell: |
101+
# powershell .ci/install_opengl.ps1
102+
# displayName: 'Install OpenGL'
103+
# - template: .ci/build_wheel.yml
104+
# - template: .ci/install_pyansys.yml
105+
# - template: .ci/unit_testing.yml
106+
# - template: .ci/azure-publish-dist.yml
107+
108+
109+
# - job: macOS
110+
# strategy:
111+
# matrix:
112+
# Python36:
113+
# python.version: '3.6'
114+
# Python37:
115+
# python.version: '3.7'
116+
# Python38:
117+
# python.version: '3.8'
118+
# pool:
119+
# vmImage: 'macOS-10.15'
120+
# steps:
121+
# - script: .ci/macos-install-python.sh '$(python.version)'
122+
# displayName: Install Python
123+
# - template: .ci/build_wheel.yml
124+
# - template: .ci/install_pyansys.yml
125+
# - template: .ci/unit_testing_allow_error.yml
126+
# - template: .ci/azure-publish-dist.yml

.ci/azure-publish-dist.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.ci/build_documentation.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.ci/build_wheel.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.ci/build_wheels.sh

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
"""Quickly quickly check if VTK off screen plotting works."""
1+
"""Quickly check if VTK off screen plotting works."""
22
import pyvista
3-
import sys
43
from pyvista.plotting import system_supports_plotting
54

65
print('system_supports_plotting', system_supports_plotting())
76
pyvista.OFF_SCREEN = True
8-
sphere = pyvista.Sphere()
9-
pyvista.plot(sphere)
7+
pyvista.plot(pyvista.Sphere())

.ci/install_opengl.ps1

Lines changed: 0 additions & 51 deletions
This file was deleted.

.ci/install_pyansys.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.ci/macos-install-python.sh

Lines changed: 0 additions & 43 deletions
This file was deleted.

.ci/requirements_test_xvfb.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pyvista>=0.27.2

0 commit comments

Comments
 (0)