Skip to content

Commit 873a8a5

Browse files
authored
fix: command issues (#374)
1 parent 1785d7b commit 873a8a5

38 files changed

+1882
-619
lines changed

.github/workflows/autodoc_cicd.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ env:
1616
RESET_PIP_CACHE_2: 1
1717
RESET_AUTOSUMMARY_CACHE_2: 1
1818
RESET_DOC_BUILD_CACHE_2: 1
19+
MAIN_PYTHON_VERSION: '3.12'
1920

2021

2122
jobs:
@@ -29,7 +30,7 @@ jobs:
2930
- name: "Setup Python"
3031
uses: actions/setup-python@v5
3132
with:
32-
python-version: ${{ inputs.MAIN_PYTHON_VERSION }}
33+
python-version: ${{ env.MAIN_PYTHON_VERSION }}
3334

3435
- name: "Cache pip"
3536
uses: actions/cache@v4
@@ -80,7 +81,7 @@ jobs:
8081
- name: PyAnsys code style checks
8182
uses: ansys/actions/code-style@v8
8283
with:
83-
python-version: ${{ inputs.MAIN_PYTHON_VERSION }}
84+
python-version: ${{ env.MAIN_PYTHON_VERSION }}
8485
use-python-cache: false
8586

8687

@@ -98,9 +99,9 @@ jobs:
9899
uses: actions/cache@v4
99100
with:
100101
path: ~/.cache/pip
101-
key: Python-pyconverter-generatedcommands-v${{ env.RESET_PIP_CACHE_2 }}-${{ inputs.MAIN_PYTHON_VERSION }}-${{ hashFiles('pyproject.toml') }}
102+
key: Python-pyconverter-generatedcommands-v${{ env.RESET_PIP_CACHE_2 }}-${{ env.MAIN_PYTHON_VERSION }}-${{ hashFiles('pyproject.toml') }}
102103
restore-keys: |
103-
Python-pyconverter-generatedcommands-v${{ env.RESET_PIP_CACHE_2 }}-${{ inputs.MAIN_PYTHON_VERSION }}
104+
Python-pyconverter-generatedcommands-v${{ env.RESET_PIP_CACHE_2 }}-${{ env.MAIN_PYTHON_VERSION }}
104105
105106
- name: "Install pyconverter-generatedcommands"
106107
run: |
@@ -130,7 +131,7 @@ jobs:
130131
- name: "Run Ansys documentation building action"
131132
uses: ansys/actions/doc-build@v8
132133
with:
133-
python-version: ${{ inputs.MAIN_PYTHON_VERSION }}
134+
python-version: ${{ env.MAIN_PYTHON_VERSION }}
134135
checkout: false
135136
sphinxopts: -j auto
136137
check-links: false

.github/workflows/ci_cd.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ jobs:
4848
with:
4949
token: ${{ secrets.GITHUB_TOKEN }}
5050

51-
smoke-tests:
51+
52+
smoke-tests: # Needs to be re-enabled prior to release
5253
name: Build and Smoke tests (Linux)
5354
runs-on: ubuntu-latest
5455
needs: [code-style]
@@ -59,10 +60,9 @@ jobs:
5960

6061
steps:
6162
- name: Build wheelhouse and perform smoke test
62-
uses: ansys/actions/build-wheelhouse@v8
63+
uses: ansys/actions/build-wheelhouse@v10
6364
with:
6465
library-name: ${{ env.PACKAGE_NAME }}
65-
library-namespace: ${{ env.PACKAGE_NAMESPACE }}
6666
operating-system: ${{ runner.os }}
6767
python-version: ${{ matrix.python-version }}
6868

@@ -83,15 +83,14 @@ jobs:
8383
uses: ansys/actions/build-wheelhouse@v8
8484
with:
8585
library-name: ${{ env.PACKAGE_NAME }}
86-
library-namespace: ${{ env.PACKAGE_NAMESPACE }}
8786
operating-system: ${{ matrix.os }}
8887
python-version: ${{ matrix.python-version }}
8988

9089

9190
build-test:
9291
name: "Build and unit testing"
9392
runs-on: ubuntu-latest
94-
needs: [smoke-tests]
93+
# needs: [smoke-tests]
9594

9695
steps:
9796
- name: "Install Git and checkout project"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,3 +165,4 @@ cython_debug/
165165
helper/
166166
package/
167167
_autosummary/
168+
args.txt

.pre-commit-config.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ repos:
3434
- id: debug-statements
3535

3636
- repo: https://github.com/ansys/pre-commit-hooks
37-
rev: v0.2.8 # `strings.properties` needs to be manually updated
37+
rev: v0.5.1
3838
hooks:
39-
- id: add-license-headers
39+
- id: add-license-headers
40+
args:
41+
- --start_year=2023
4042

4143
# this validates our github workflow files
4244
- repo: https://github.com/python-jsonschema/check-jsonschema

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 ANSYS, Inc. All rights reserved.
3+
Copyright (c) 2023 - 2025 ANSYS, Inc. All rights reserved.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

_package/.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ repos:
4949
hooks:
5050
- id: flake8
5151

52-
- repo: https://github.com/codespell-project/codespell
53-
rev: v2.3.0
54-
hooks:
55-
- id: codespell
56-
args: ["--toml", "pyproject.toml"]
57-
additional_dependencies: ["tomli"]
52+
# - repo: https://github.com/codespell-project/codespell
53+
# rev: v2.3.0
54+
# hooks:
55+
# - id: codespell
56+
# args: ["--toml", "pyproject.toml"]
57+
# additional_dependencies: ["tomli"]
5858

5959
# - repo: https://github.com/pycqa/pydocstyle
6060
# rev: 6.1.1

_package/doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ clean:
2525
pdf:
2626
@$(SPHINXBUILD) -M latex "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2727
cd $(BUILDDIR)/latex && latexmk -r latexmkrc -pdf *.tex -interaction=nonstopmode || true
28-
(test -f $(BUILDDIR)/latex/pyconverter-generatedcommands-Documentation-*.pdf && echo pdf exists) || exit 1
28+
(test -f $(BUILDDIR)/latex/pyconverter-generatedcommands-documentation-*.pdf && echo pdf exists) || exit 1

_package/doc/make.bat

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,16 @@ goto end
5757
:help
5858
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
5959

60+
:pdf
61+
%SPHINXBUILD% -M latex %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
62+
cd "%BUILDDIR%\latex"
63+
for %%f in (*.tex) do (
64+
pdflatex "%%f" --interaction=nonstopmode)
65+
if NOT EXIST pyconverter-generatedcommands-documentation.pdf (
66+
Echo "no pdf generated!"
67+
exit /b 1)
68+
Echo "pdf generated!"
69+
goto end
70+
6071
:end
6172
popd

_package/doc/source/conf.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@
6565
# "grpc": ("https://grpc.github.io/grpc/python/", None),
6666
}
6767

68+
suppress_warnings = [
69+
"misc.highlighting_failure", # Suppress highlighting failures
70+
]
71+
6872
# Copy button customization ---------------------------------------------------
6973
# exclude traditional Python prompts from the copied code
7074
copybutton_prompt_text = r">>> ?|\.\.\. "
@@ -77,7 +81,7 @@
7781
numpydoc_validation_checks = {
7882
"GL06", # Found unknown section
7983
"GL07", # Sections are in the wrong order.
80-
"GL08", # The object does not have a docstring
84+
# "GL08", # The object does not have a docstring
8185
"GL09", # Deprecation warning should precede extended summary
8286
"GL10", # reST directives {directives} must be followed by two colons
8387
"SS01", # No summary found
@@ -98,7 +102,7 @@
98102
latex_documents = [
99103
(
100104
master_doc,
101-
f"{project}-Documentation-{__version__}.tex",
105+
f"{project}-documentation-{__version__}.tex",
102106
f"{project} Documentation",
103107
author,
104108
"manual",

config.yaml

Lines changed: 55 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1+
project_name: PyConverter-GeneratedCommands # Name of the project
2+
13
library_name_structured: # Future name of the library
24
- pyconverter
35
- generatedcommands
46

5-
subfolder:
7+
subfolders:
68
- subfolder
79
- subsubfolder
810

911
new_package_name: package
1012

13+
image_folder_path: ../images/_commands
14+
1115
rules:
1216
"/": slash
1317
"*": star
@@ -18,21 +22,60 @@ specific_command_mapping:
1822
"/INQUIRE": inquire
1923

2024
ignored_commands:
21-
- "*VWR"
22-
- "*MWR"
23-
- "C***"
24-
- "*CFO"
25-
- "*CRE"
26-
- "*END"
27-
- "/EOF"
25+
# Non-available commands - PyMAPDL user guide
2826
- "*ASK"
29-
- "*IF"
27+
- "*VEDIT"
28+
- "/ERASE"
29+
- "ERASE"
30+
- "HELP"
31+
- "HELPDISP"
32+
- "NOERASE"
33+
- "*CYCLE"
34+
- "*DO"
35+
- "*DOWHILE"
3036
- "*ELSE"
31-
- "CMAT"
32-
- "*REP"
37+
- "*ELSEIF"
38+
- "*ENDDO"
39+
- "*ENDIF"
40+
- "*GO"
41+
- "*IF"
42+
- "*REPEAT"
3343
- "*RETURN"
34-
- "LSRE"
44+
- "*DEL"
45+
- "/BATCH"
46+
- "/EOF"
47+
- "UNDO"
48+
# Additional commands to ignore
49+
- "C***"
50+
- "/DIRECTORY" # Defined in ``mapdl_core.py``
51+
- "*XPL" # Defined in ``mapdl_grpc.py``
52+
- "PLOT"
53+
- "/EXIT" # Defined in ``mapdl_core.py``
54+
55+
comments:
56+
- msg: 'This command must be run using :func:`non_interactive <ansys.mapdl.core.Mapdl.non_interactive>`.
57+
58+
Please visit `Unsupported Interactive Commands <https://mapdl.docs.pyansys.com/version/stable/user_guide/mapdl.html#unsupported-interactive-commands>`_
59+
60+
for further information.'
61+
type: "warning"
62+
commands:
63+
- "*CREATE"
64+
- "CFOPEN"
65+
- "CFCLOSE"
66+
- "*VWRITE"
67+
- "*MWRITE"
68+
- "LSWRITE"
69+
- "LSREAD"
3570

71+
- msg: 'Starting with PyMAPDL v0.66.0, you can use "P" as a second argument to select entities interactively. A window pops up
72+
73+
allowing you to select, unselect, add or reselect entities depending on the first argument ``type_``. An array with
74+
75+
the ids of new selection is returned when the window is closed.'
76+
type: "note"
77+
commands:
78+
- "ASEL"
3679

3780
specific_classes:
3881
2D to 3D Analysis: Analysis 2D to 3D

0 commit comments

Comments
 (0)