Skip to content

Commit

Permalink
Merge branch 'main' into release/0.52
Browse files Browse the repository at this point in the history
  • Loading branch information
akaszynski committed Jun 10, 2023
2 parents f1596eb + 63cc14a commit ed5c4b5
Show file tree
Hide file tree
Showing 24 changed files with 5,925 additions and 5,913 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[flake8]
exclude = venv, __init__.py, build, doc/source/examples
# To be added after refactoring code to be compliant: E501
# To be added after refactoring code to be compliant: E501
select = W191, W291, W293, W391, E115, E117, E122, E124, E125, E225, E231, E301, E303, F401, F403
count = True
max-complexity = 10
Expand Down
2 changes: 1 addition & 1 deletion .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ markComment: >
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
Closed due to inactivity. Feel free to reopen if there is new information
or interest.
or interest.
Thank you!
9 changes: 5 additions & 4 deletions .github/workflows/testing-and-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11']
os: [ubuntu-latest, windows-latest]

steps:
Expand Down Expand Up @@ -154,9 +154,9 @@ jobs:
- uses: actions/checkout@v3

- name: Build wheels
uses: pypa/cibuildwheel@v2.12.3
uses: pypa/cibuildwheel@v2.13.0
with:
python-version: 3.7 - 3.11
python-version: 3.8 - 3.11

- name: List generated wheels
run: |
Expand Down Expand Up @@ -245,7 +245,7 @@ jobs:
# - name: Display MAPDL Logs
# if: always()
# run: cat log.txt

Release:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
needs: [doc_build, build, mac_build]
Expand Down Expand Up @@ -274,6 +274,7 @@ jobs:
- name: Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: |
./**/*.whl
./**/*.zip
Expand Down
14 changes: 12 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,24 @@ repos:
# additional_dependencies: [toml]
# exclude: "tests/"

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v14.0.6
hooks:
- id: clang-format
files: |
(?x)^(
ansys/mapdl/reader/cython/[^_].*\.c.*
)$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: debug-statements
- id: trailing-whitespace
exclude: '.*\.(cdb|rst|dat)$'

# this validates our github workflow files
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.22.0
rev: 0.23.1
hooks:
- id: check-github-workflows
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ object.
filename = examples.hexarchivefile
# Read ansys archive file
archive = pyansys.Archive(filename)
archive = pymapdl_reader.Archive(filename)
# Print raw data from cdb
for key in archive.raw:
Expand Down Expand Up @@ -135,7 +135,7 @@ from ANSYS.
rstfile = examples.rstfile
# Create result object by loading the result file
result = pyansys.read_binary(rstfile)
result = pymapdl_reader.read_binary(rstfile)
# Beam natural frequencies
freqs = result.time_values
Expand Down Expand Up @@ -253,7 +253,7 @@ the above example.
from scipy import sparse
# load the full file
fobj = pyansys.FullReader('file.full')
fobj = pymapdl_reader.FullReader('file.full')
dofref, k, m = fobj.load_km() # returns upper triangle only
# make k, m full, symmetric matrices
Expand Down
12 changes: 2 additions & 10 deletions ansys/mapdl/reader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,9 @@
from . import _archive

# Setup data directory
try:
USER_DATA_PATH = appdirs.user_data_dir("ansys_mapdl_reader")
if not os.path.exists(USER_DATA_PATH): # pragma: no cover
os.makedirs(USER_DATA_PATH)
USER_DATA_PATH = appdirs.user_data_dir(appname="ansys_mapdl_reader", appauthor="Ansys")

EXAMPLES_PATH = os.path.join(USER_DATA_PATH, "examples")
if not os.path.exists(EXAMPLES_PATH): # pragma: no cover
os.makedirs(EXAMPLES_PATH)

except: # pragma: no cover
pass
EXAMPLES_PATH = os.path.join(USER_DATA_PATH, "examples")

# set pyvista defaults
_configure_pyvista()
4 changes: 2 additions & 2 deletions ansys/mapdl/reader/cython/_archive.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def py_write_nblock(filename, const int [::1] node_id, int max_node_id,
Double array of node coordinates
angles : np.ndarray, optional
"""
# attach the stream to the python file
Expand Down Expand Up @@ -84,7 +84,7 @@ def py_write_nblock_float(filename, const int [::1] node_id, int max_node_id,
Double array of node coordinates
angles : np.ndarray, optional
"""
# attach the stream to the python file
cdef FILE* cfile = fopen(filename.encode(), mode.encode())
Expand Down
Loading

0 comments on commit ed5c4b5

Please sign in to comment.