Skip to content

Commit ed5c4b5

Browse files
committed
Merge branch 'main' into release/0.52
2 parents f1596eb + 63cc14a commit ed5c4b5

File tree

24 files changed

+5925
-5913
lines changed

24 files changed

+5925
-5913
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[flake8]
22
exclude = venv, __init__.py, build, doc/source/examples
3-
# To be added after refactoring code to be compliant: E501
3+
# To be added after refactoring code to be compliant: E501
44
select = W191, W291, W293, W391, E115, E117, E122, E124, E125, E225, E231, E301, E303, F401, F403
55
count = True
66
max-complexity = 10

.github/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ markComment: >
1717
# Comment to post when closing a stale issue. Set to `false` to disable
1818
closeComment: >
1919
Closed due to inactivity. Feel free to reopen if there is new information
20-
or interest.
20+
or interest.
2121
Thank you!

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
runs-on: ${{ matrix.os }}
8080
strategy:
8181
matrix:
82-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
82+
python-version: ['3.8', '3.9', '3.10', '3.11']
8383
os: [ubuntu-latest, windows-latest]
8484

8585
steps:
@@ -154,9 +154,9 @@ jobs:
154154
- uses: actions/checkout@v3
155155

156156
- name: Build wheels
157-
uses: pypa/cibuildwheel@v2.12.3
157+
uses: pypa/cibuildwheel@v2.13.0
158158
with:
159-
python-version: 3.7 - 3.11
159+
python-version: 3.8 - 3.11
160160

161161
- name: List generated wheels
162162
run: |
@@ -245,7 +245,7 @@ jobs:
245245
# - name: Display MAPDL Logs
246246
# if: always()
247247
# run: cat log.txt
248-
248+
249249
Release:
250250
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
251251
needs: [doc_build, build, mac_build]
@@ -274,6 +274,7 @@ jobs:
274274
- name: Release
275275
uses: softprops/action-gh-release@v1
276276
with:
277+
generate_release_notes: true
277278
files: |
278279
./**/*.whl
279280
./**/*.zip

.pre-commit-config.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,24 @@ repos:
3232
# additional_dependencies: [toml]
3333
# exclude: "tests/"
3434

35+
- repo: https://github.com/pre-commit/mirrors-clang-format
36+
rev: v14.0.6
37+
hooks:
38+
- id: clang-format
39+
files: |
40+
(?x)^(
41+
ansys/mapdl/reader/cython/[^_].*\.c.*
42+
)$
43+
3544
- repo: https://github.com/pre-commit/pre-commit-hooks
3645
rev: v4.4.0
3746
hooks:
3847
- id: check-merge-conflict
3948
- id: debug-statements
49+
- id: trailing-whitespace
50+
exclude: '.*\.(cdb|rst|dat)$'
4051

41-
# this validates our github workflow files
4252
- repo: https://github.com/python-jsonschema/check-jsonschema
43-
rev: 0.22.0
53+
rev: 0.23.1
4454
hooks:
4555
- id: check-github-workflows

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ object.
9090
filename = examples.hexarchivefile
9191
9292
# Read ansys archive file
93-
archive = pyansys.Archive(filename)
93+
archive = pymapdl_reader.Archive(filename)
9494
9595
# Print raw data from cdb
9696
for key in archive.raw:
@@ -135,7 +135,7 @@ from ANSYS.
135135
rstfile = examples.rstfile
136136
137137
# Create result object by loading the result file
138-
result = pyansys.read_binary(rstfile)
138+
result = pymapdl_reader.read_binary(rstfile)
139139
140140
# Beam natural frequencies
141141
freqs = result.time_values
@@ -253,7 +253,7 @@ the above example.
253253
from scipy import sparse
254254
255255
# load the full file
256-
fobj = pyansys.FullReader('file.full')
256+
fobj = pymapdl_reader.FullReader('file.full')
257257
dofref, k, m = fobj.load_km() # returns upper triangle only
258258
259259
# make k, m full, symmetric matrices

ansys/mapdl/reader/__init__.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,9 @@
2020
from . import _archive
2121

2222
# Setup data directory
23-
try:
24-
USER_DATA_PATH = appdirs.user_data_dir("ansys_mapdl_reader")
25-
if not os.path.exists(USER_DATA_PATH): # pragma: no cover
26-
os.makedirs(USER_DATA_PATH)
23+
USER_DATA_PATH = appdirs.user_data_dir(appname="ansys_mapdl_reader", appauthor="Ansys")
2724

28-
EXAMPLES_PATH = os.path.join(USER_DATA_PATH, "examples")
29-
if not os.path.exists(EXAMPLES_PATH): # pragma: no cover
30-
os.makedirs(EXAMPLES_PATH)
31-
32-
except: # pragma: no cover
33-
pass
25+
EXAMPLES_PATH = os.path.join(USER_DATA_PATH, "examples")
3426

3527
# set pyvista defaults
3628
_configure_pyvista()

ansys/mapdl/reader/cython/_archive.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def py_write_nblock(filename, const int [::1] node_id, int max_node_id,
4949
Double array of node coordinates
5050
5151
angles : np.ndarray, optional
52-
52+
5353
5454
"""
5555
# attach the stream to the python file
@@ -84,7 +84,7 @@ def py_write_nblock_float(filename, const int [::1] node_id, int max_node_id,
8484
Double array of node coordinates
8585
8686
angles : np.ndarray, optional
87-
87+
8888
"""
8989
# attach the stream to the python file
9090
cdef FILE* cfile = fopen(filename.encode(), mode.encode())

0 commit comments

Comments
 (0)