Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#330)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 23.9.1 → 23.10.1](psf/black@23.9.1...23.10.1)
- [github.com/codespell-project/codespell: v2.2.5 → v2.2.6](codespell-project/codespell@v2.2.5...v2.2.6)
- [github.com/pre-commit/mirrors-clang-format: v16.0.6 → v17.0.4](pre-commit/mirrors-clang-format@v16.0.6...v17.0.4)
- [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0](pre-commit/pre-commit-hooks@v4.4.0...v4.5.0)
- [github.com/python-jsonschema/check-jsonschema: 0.26.3 → 0.27.1](python-jsonschema/check-jsonschema@0.26.3...0.27.1)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix spelling issues in codespell

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alex Kaszynski <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and akaszynski authored Nov 9, 2023
1 parent 602aca9 commit f702100
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .codespellrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[codespell]
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/*
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
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,poin
quiet-level = 3
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 23.11.0
hooks:
- id: black

Expand All @@ -20,7 +20,7 @@ repos:
- id: flake8

- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
rev: v2.2.6
hooks:
- id: codespell

Expand All @@ -33,7 +33,7 @@ repos:
# exclude: "tests/"

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.6
rev: v17.0.4
hooks:
- id: clang-format
files: |
Expand All @@ -42,14 +42,14 @@ repos:
)$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-merge-conflict
- id: debug-statements
- id: trailing-whitespace
exclude: '.*\.(cdb|rst|dat)$'

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.26.3
rev: 0.27.1
hooks:
- id: check-github-workflows
2 changes: 1 addition & 1 deletion ansys/mapdl/reader/cyclic_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def plot(self, **kwargs):
def _add_cyclic_properties(self):
"""Add cyclic properties"""

# idenfity the sector based on number of elements in master sector
# identity the sector based on number of elements in master sector
cs_els = self._resultheader["csEls"]
mask = self.quadgrid.cell_data["ansys_elem_num"] <= cs_els

Expand Down
2 changes: 1 addition & 1 deletion ansys/mapdl/reader/cython/_binary_reader.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,7 @@ def midside_mask(uint8 [::1] celltypes, index_type [::1] cells,


def euler_cart_to_cyl(double [:, ::1] stress, double [::1] angles):
"""Convert stress tensors from cartesian to cyclindrical.
"""Convert stress tensors from Cartesian to cylindrical.
Equations from
https://github.com/jrwrigh/cart2cyl_notes/blob/master/main.pdf
Expand Down
2 changes: 1 addition & 1 deletion ansys/mapdl/reader/cython/parsefull.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ int read_array(int **rows, int **cols, double **data, int *rref, int *cref,
// Read entire matrix to memory
int nread = neqn * 24 + nterm * 12;
char *raw = (char *)malloc(nread * sizeof(char));
fseek(ptr, (fileloc)*4, SEEK_SET);
fseek(ptr, (fileloc) * 4, SEEK_SET);
fread(raw, sizeof(char), nread, ptr);

for (i = 0; i < neqn; ++i) {
Expand Down
2 changes: 1 addition & 1 deletion ansys/mapdl/reader/emat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""PyMAPDL-reader Element matricies file reader.
"""PyMAPDL-reader Element matrices file reader.
This header is straight out of fdemat.inc and can be found within the
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: MacOS",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down
8 changes: 7 additions & 1 deletion tests/archive/test_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
from ansys.mapdl import reader as pymapdl_reader
from ansys.mapdl.reader import _archive, archive, examples

try:
from pyvista import ImageData
except ImportError: # backwards compatibility
from pyvista import UniformGrid as ImageData


LINEAR_CELL_TYPES = [
CellType.TETRA,
CellType.PYRAMID,
Expand Down Expand Up @@ -201,7 +207,7 @@ def test_writehex(tmpdir, hex_archive):

def test_write_voxel(tmpdir):
filename = str(tmpdir.join("tmp.cdb"))
grid = pv.UniformGrid(dimensions=(10, 10, 10))
grid = ImageData(dimensions=(10, 10, 10))
pymapdl_reader.save_as_archive(filename, grid)

archive = pymapdl_reader.Archive(filename)
Expand Down

0 comments on commit f702100

Please sign in to comment.