Skip to content

Commit 20a379e

Browse files
committed
merge with main; bump to v0.51.15
2 parents 502303f + d835194 commit 20a379e

Some content is hidden

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

69 files changed

+5412
-4314
lines changed

.ci/build_wheels.sh

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@ set -e -x
66
# build based on python version from args
77
PYTHON_VERSION="$1"
88
case $PYTHON_VERSION in
9-
2.7)
10-
PYBIN="/opt/python/cp27-cp27m/bin"
11-
;;
12-
3.5)
13-
PYBIN="/opt/python/cp35-cp35m/bin"
14-
;;
15-
3.6)
16-
PYBIN="/opt/python/cp36-cp36m/bin"
17-
;;
189
3.7)
1910
PYBIN="/opt/python/cp37-cp37m/bin"
2011
;;
@@ -31,8 +22,8 @@ esac
3122

3223
# build, don't install
3324
cd io
34-
"${PYBIN}/pip" install -r requirements_build.txt
35-
"${PYBIN}/python" setup.py bdist_wheel
25+
"${PYBIN}/pip" install build
26+
"${PYBIN}/python" -m build --wheel
3627
auditwheel repair dist/ansys_mapdl_reader*.whl
3728
rm -f dist/*
3829
mv wheelhouse/*manylinux* dist/

.codespellrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[codespell]
2+
skip = *.pyc,*.txt,*.gif,*.png,*.jpg,*.js,*.html,*.doctree,*.ttf,*.woff,*.woff2,*.eot,*.mp4,*.inv,*.pickle,*.ipynb,flycheck*,./.git/*,./.hypothesis/*,*.yml,./doc/build/*,./doc/images/*,./dist/*,*~,.hypothesis*,./doc/source/examples/*,*cover,*.dat,*.mac,\#*,build,./docker/mapdl/v*,./factory/*,./ansys/mapdl/core/mapdl_functions.py,PKG-INFO,*.mypy_cache/*,./docker/mapdl/*,./_unused/*
3+
ignore-words-list = delet,appen,parm,pres,wan,filname,ans,tread,wan,levl,mater,aadd,extrem,imagin,ist,nin,sord,struc,emiss,vise,sur,ect,ther,esy
4+
quiet-level = 3

.flake8

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[flake8]
2+
exclude = venv, __init__.py, build, doc/source/examples
3+
# To be added after refactoring code to be compliant: E501
4+
select = W191, W291, W293, W391, E115, E117, E122, E124, E125, E225, E231, E301, E303, F401, F403
5+
count = True
6+
max-complexity = 10
7+
max-line-length = 100
8+
statistics = True

.github/workflows/testing-and-deployment.yml

Lines changed: 43 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,31 @@ on:
1818
branches:
1919
- main
2020

21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.ref }}
23+
cancel-in-progress: true
24+
2125
jobs:
22-
check_style:
26+
stylecheck:
2327
name: Style Check
2428
runs-on: ubuntu-latest
25-
2629
steps:
2730
- uses: actions/checkout@v2
2831
- name: Setup Python
29-
uses: actions/setup-python@v2
32+
uses: actions/setup-python@v2.2.2
3033
with:
31-
python-version: 3.9
32-
- name: Style
33-
run: |
34-
pip install -r requirements_style.txt --disable-pip-version-check
35-
make
34+
python-version: '3.10'
35+
- name: Install pre-commit
36+
run: pip install pre-commit
37+
- name: Run pre-commit
38+
run: pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )
3639

3740
doc_build:
3841
name: Build Documentation
3942
runs-on: ubuntu-latest
4043

4144
steps:
42-
- uses: actions/checkout@v2
45+
- uses: actions/checkout@v3
4346

4447
- name: Setup Python
4548
uses: actions/setup-python@v2
@@ -55,23 +58,20 @@ jobs:
5558
5659
- name: Install ansys-mapdl-reader
5760
run: |
58-
pip install -r requirements_build.txt --disable-pip-version-check
59-
python setup.py bdist_wheel
60-
pip install dist/ansys*.whl --disable-pip-version-check
61+
pip install -e .
6162
cd tests/
6263
xvfb-run python -c "from ansys.mapdl import reader as pymapdl_reader; print(pymapdl_reader.Report())"
6364
6465
- name: Build Documentation
6566
run: |
66-
sudo apt install pandoc -qy
67+
sudo apt-get install zip pandoc -qy
6768
pip install -r requirements_docs.txt --disable-pip-version-check
6869
xvfb-run make -C doc html
69-
sudo apt install zip
7070
cd doc/build/html/
7171
zip ../../../${{ env.PACKAGE_NAME }}-HTML.zip ./*
7272
7373
- name: Upload
74-
uses: actions/upload-artifact@v2
74+
uses: actions/upload-artifact@v3
7575
with:
7676
name: ${{ env.PACKAGE_NAME }}-Documentation
7777
path: |
@@ -97,15 +97,15 @@ jobs:
9797
os: [ubuntu-latest, windows-latest]
9898

9999
steps:
100-
- uses: actions/checkout@v2
100+
- uses: actions/checkout@v3
101101

102102
- name: Set up Python ${{ matrix.python-version }}
103103
uses: actions/setup-python@v1
104104
with:
105105
python-version: ${{ matrix.python-version }}
106106

107107
- name: Linux pip cache
108-
uses: actions/cache@v2
108+
uses: actions/cache@v3
109109
if: ${{ runner.os == 'Linux' }}
110110
with:
111111
path: ~/.cache/pip
@@ -114,7 +114,7 @@ jobs:
114114
Python-${{ runner.os }}-${{ matrix.python-version }}
115115
116116
- name: Window pip cache
117-
uses: actions/cache@v2
117+
uses: actions/cache@v3
118118
if: ${{ runner.os == 'Windows' }}
119119
with:
120120
path: ~\AppData\Local\pip\Cache
@@ -136,10 +136,6 @@ jobs:
136136
quay.io/pypa/manylinux2014_x86_64 \
137137
/io/.ci/build_wheels.sh ${{ matrix.python-version }}
138138
139-
- name: Install VTK on Python 3.10
140-
if: matrix.python-version == '3.10'
141-
run: pip install --find-links https://wheels.pyvista.org/ vtk
142-
143139
- name: Build wheel on Windows
144140
if: ${{ runner.os == 'Windows' }}
145141
run: |
@@ -167,7 +163,7 @@ jobs:
167163
168164
- name: Get PyVista tools
169165
if: ${{ runner.os == 'Windows' }}
170-
uses: actions/checkout@v2
166+
uses: actions/checkout@v3
171167
with:
172168
repository: pyvista/gl-ci-helpers
173169
path: pyvista-tools
@@ -199,60 +195,35 @@ jobs:
199195
if: ${{ runner.os == 'Windows' }}
200196
run: pytest -v tests/ --durations=0
201197

198+
- uses: codecov/codecov-action@v2
199+
if: ${{ runner.os == 'Linux' && matrix.python-version == '3.9' }}
200+
name: 'Upload coverage to Codecov'
201+
202202
- name: Upload wheel
203-
uses: actions/upload-artifact@v2
203+
uses: actions/upload-artifact@v3
204204
with:
205205
name: ${{ env.PACKAGE_NAME }}-${{ runner.os }}-${{ matrix.python-version }}
206206
path: dist/
207207
retention-days: 7
208208

209-
# mac_build:
210-
# runs-on: macos-latest
211-
# name: Mac OS Unit Testing
212-
# strategy:
213-
# matrix:
214-
# python-version: ['3.8']
215-
216-
# steps:
217-
# - uses: actions/checkout@v2
218-
219-
# - name: Set up Python ${{ matrix.python-version }}
220-
# uses: actions/setup-python@v1
221-
# with:
222-
# python-version: ${{ matrix.python-version }}
223-
224-
# - name: Build wheels
225-
# uses: joerick/[email protected]
226-
# env:
227-
# CIBW_BEFORE_BUILD: pip install -r requirements_build.txt
228-
# CIBW_BUILD: cp38-macosx_x86_64
229-
230-
# - name: Build wheels
231-
# if: startsWith(github.event.ref, 'refs/tags')
232-
# uses: joerick/[email protected]
233-
# env:
234-
# CIBW_BEFORE_BUILD: pip install -r requirements_build.txt
235-
# CIBW_SKIP: pp* cp38-macosx_x86_64
236-
237-
# - name: Show files
238-
# run: ls -lh wheelhouse
239-
# shell: bash
240-
241-
# - name: Upload wheels
242-
# uses: actions/upload-artifact@v2
243-
# with:
244-
# path: wheelhouse/*.whl
245-
246-
# - name: Install wheel
247-
# run: |
248-
# pip install wheelhouse/*38*
249-
250-
# - name: Test
251-
# run: |
252-
# pip install -r requirements_test.txt
253-
# cd tests
254-
# pytest -v
209+
mac_build:
210+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
211+
name: Build wheels on MacOS
212+
runs-on: macos-latest
213+
214+
steps:
215+
- uses: actions/checkout@v3
216+
217+
- name: Build wheels
218+
uses: pypa/[email protected]
219+
220+
- name: List generated wheels
221+
run: |
222+
ls ./wheelhouse/*
255223
224+
- uses: actions/upload-artifact@v3
225+
with:
226+
path: ./wheelhouse/*.whl
256227

257228
pymapdl_tests:
258229
name: PyMAPDL Unit Testing
@@ -289,7 +260,7 @@ jobs:
289260
sudo apt install libgl1-mesa-glx xvfb
290261
291262
- name: Linux pip cache
292-
uses: actions/cache@v2
263+
uses: actions/cache@v3
293264
with:
294265
path: ~/.cache/pip
295266
key: Python-${{ runner.os }}-3.8-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements_*.txt') }}
@@ -336,7 +307,7 @@ jobs:
336307

337308
Release:
338309
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
339-
needs: [check_style, doc_build, build, pymapdl_tests] # , mac_build
310+
needs: [stylecheck, doc_build, build, pymapdl_tests, mac_build]
340311
runs-on: ubuntu-latest
341312
steps:
342313
- name: Set up Python

.pre-commit-config.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: 22.3.0
4+
hooks:
5+
- id: black
6+
7+
- repo: https://github.com/pycqa/isort
8+
rev: 5.10.1
9+
hooks:
10+
- id: isort
11+
args: [
12+
"--profile", "black",
13+
"--force-sort-within-sections",
14+
"--skip-glob", "*__init__.py",
15+
]
16+
- repo: https://gitlab.com/PyCQA/flake8
17+
rev: 3.9.2
18+
hooks:
19+
- id: flake8
20+
21+
- repo: https://github.com/codespell-project/codespell
22+
rev: v2.1.0
23+
hooks:
24+
- id: codespell
25+
26+
# add this eventually
27+
# - repo: https://github.com/pycqa/pydocstyle
28+
# rev: 6.1.1
29+
# hooks:
30+
# - id: pydocstyle
31+
# additional_dependencies: [toml]
32+
# exclude: "tests/"
33+
34+
- repo: https://github.com/pre-commit/pre-commit-hooks
35+
rev: v4.1.0
36+
hooks:
37+
- id: check-merge-conflict
38+
- id: debug-statements
39+
40+
# this validates our github workflow files
41+
- repo: https://github.com/python-jsonschema/check-jsonschema
42+
rev: 0.14.0
43+
hooks:
44+
- id: check-github-workflows

README.rst

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,32 @@
11
======================================================
22
PyMAPDL Reader - Legacy Binary and Archive File Reader
33
======================================================
4-
.. image:: https://badge.fury.io/py/ansys-mapdl-reader.svg
5-
:target: https://badge.fury.io/py/ansys-mapdl-reader
4+
|pyansys| |pypi| |PyPIact| |GH-CI| |codecov| |MIT| |black|
65

7-
.. image:: https://github.com/pyansys/pymapdl-reader/actions/workflows/testing-and-deployment.yml/badge.svg
6+
.. |pyansys| image:: https://img.shields.io/badge/Py-Ansys-ffc107.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABDklEQVQ4jWNgoDfg5mD8vE7q/3bpVyskbW0sMRUwofHD7Dh5OBkZGBgW7/3W2tZpa2tLQEOyOzeEsfumlK2tbVpaGj4N6jIs1lpsDAwMJ278sveMY2BgCA0NFRISwqkhyQ1q/Nyd3zg4OBgYGNjZ2ePi4rB5loGBhZnhxTLJ/9ulv26Q4uVk1NXV/f///////69du4Zdg78lx//t0v+3S88rFISInD59GqIH2esIJ8G9O2/XVwhjzpw5EAam1xkkBJn/bJX+v1365hxxuCAfH9+3b9/+////48cPuNehNsS7cDEzMTAwMMzb+Q2u4dOnT2vWrMHu9ZtzxP9vl/69RVpCkBlZ3N7enoDXBwEAAA+YYitOilMVAAAAAElFTkSuQmCC
7+
:target: https://docs.pyansys.com/
8+
:alt: PyAnsys
9+
10+
.. |pypi| image:: https://img.shields.io/pypi/v/ansys-mapdl-reader.svg?logo=python&logoColor=white
11+
:target: https://pypi.org/project/ansys-mapdl-reader/
12+
13+
.. |PyPIact| image:: https://img.shields.io/pypi/dm/ansys-mapdl-reader.svg?label=PyPI%20downloads
14+
:target: https://pypi.org/project/ansys-mapdl-reader/
15+
16+
.. |codecov| image:: https://codecov.io/gh/pyansys/pymapdl-reader/branch/main/graph/badge.svg
17+
:target: https://codecov.io/gh/pyansys/pymapdl-reader
18+
19+
.. |GH-CI| image:: https://github.com/pyansys/pymapdl-reader/actions/workflows/testing-and-deployment.yml/badge.svg
820
:target: https://github.com/pyansys/pymapdl-reader/actions/workflows/testing-and-deployment.yml
921

22+
.. |MIT| image:: https://img.shields.io/badge/License-MIT-yellow.svg
23+
:target: https://opensource.org/licenses/MIT
24+
25+
.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=flat
26+
:target: https://github.com/psf/black
27+
:alt: black
28+
29+
1030
This is the legacy module for reading in binary and ASCII files
1131
generated from MAPDL.
1232

@@ -29,13 +49,13 @@ Please see the `PyMAPDL-Reader Documentation
2949

3050
.. note::
3151

32-
This module will likely change or be depreciated in the future.
52+
This module may be depreciated in the future.
3353

3454
You are encouraged to use the new Data Processing Framework (DPF)
35-
modules at `DPF-Core <https://github.com/pyansys/DPF-Core>`_ and
36-
`DPF-Post <https://github.com/pyansys/DPF-Post>`_ as they provide a
37-
modern interface to ANSYS result files using a client/server
38-
interface using the same software used within ANSYS Workbench, but
55+
modules at `PyDPF-Core <https://github.com/pyansys/pydpf-core>`_ and
56+
`PyDPF-Post <https://github.com/pyansys/pydpf-post>`_ as they provide a
57+
modern interface to Ansys result files using a client/server
58+
interface using the same software used within Ansys Workbench, but
3959
via a Python client.
4060

4161

@@ -48,6 +68,7 @@ Installation through pip::
4868
You can also visit `pymapdl-reader <https://github.com/pyansys/pymapdl-reader>`_
4969
to download the source or releases from GitHub.
5070

71+
5172
Python 3.10 Extra Instructions
5273
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5374

@@ -294,8 +315,6 @@ you will need to install your own C++ compiler. We recommend:
294315
a. Navigate to the project's top level (the same directory as this README)
295316
b. run ``pip install -e .``
296317
297-
To get the package up and running.
298-
299318
300319
License and Acknowledgments
301320
---------------------------

0 commit comments

Comments
 (0)