Skip to content

feat: using dpf instead of reader in "results" module #1300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 340 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
340 commits
Select commit Hold shift + click to select a range
749ef51
chore: merge remote-tracking branch 'origin/main' into feat/using-dpf…
germa89 Jun 2, 2025
32f6635
feat: add PYMAPDL_ADDITIONAL_SWITCHES to pytest report header
germa89 Jun 10, 2025
212cdff
feat: add material properties retrieval to result and corresponding t…
germa89 Jun 10, 2025
35413ae
chore: merge remote-tracking branch 'origin/main' into feat/using-dpf…
germa89 Jun 10, 2025
099f123
chore: adding changelog file 1300.miscellaneous.md [dependabot-skip]
pyansys-ci-bot Jun 10, 2025
2e62ab1
feat: add element_lookup, and notimplemented methods. update tests fo…
germa89 Jun 11, 2025
b97e932
chore: merge branch 'feat/using-dpf-for-results' of https://github.co…
germa89 Jun 11, 2025
efe9be5
feat: reducing line length that gets printed in the pytest summary
germa89 Jun 11, 2025
d6fa8f6
feat: adding node and element components attributes and their tests
germa89 Jun 11, 2025
cd957fb
fix: typo
germa89 Jun 11, 2025
81cee0f
Merge branch 'main' into feat/using-dpf-for-results
germa89 Jun 11, 2025
1650933
refactor: remove test for non-local result download
germa89 Jun 11, 2025
88c35d5
refactor: partial codacy clean up
germa89 Jun 11, 2025
76e043c
refactor: using 'get_fields' instead of the MATERIAL_PROPERTIES
germa89 Jun 12, 2025
5138a84
feat: adding class switch using 'use_reader_backend'.
germa89 Jun 12, 2025
d69e7a0
fix: unit tests by using the DPFResult class apart from mapdl.result
germa89 Jun 13, 2025
310b80c
fix: update remote processing logic to handle CICD versions
germa89 Jun 13, 2025
f740019
feat: add TEST_DPF_BACKEND environment variable to control DPF test e…
germa89 Jun 13, 2025
77a273e
chore: merge remote-tracking branch 'origin/main' into feat/using-dpf…
germa89 Jun 13, 2025
78f3b3d
chore: adding changelog file 1300.maintenance.md [dependabot-skip]
pyansys-ci-bot Jun 13, 2025
f43d40c
chore: update test_result.py documentation and comments for clarity
germa89 Jun 13, 2025
4494513
fix: correct conditional syntax in build_matrix.sh for remote processing
germa89 Jun 13, 2025
05df447
Merge branch 'feat/using-dpf-for-results' of https://github.com/ansys…
germa89 Jun 13, 2025
2f814eb
fix: update patch decorator to use version_from_path for consistency
germa89 Jun 13, 2025
4c7645a
chore: update test_result.py documentation for improved clarity
germa89 Jun 13, 2025
41ff1a0
fix: update patch decorator to use autospec and side_effect for versi…
germa89 Jun 13, 2025
d7797d7
chore: merge remote-tracking branch 'origin/main' into feat/using-dpf…
germa89 Jun 16, 2025
2159ff4
chore: merge remote-tracking branch 'origin/main' into feat/using-dpf…
germa89 Jun 16, 2025
1daf7e4
fix: add DPF backend testing for CICD MAPDL version in workflows
germa89 Jun 16, 2025
312be6e
fix: some codacy issues
germa89 Jun 17, 2025
74b1d37
chore: merge remote-tracking branch 'origin/main' into feat/using-dpf…
germa89 Jun 17, 2025
f256b23
fix: strip whitespace from downloaded raw object in MapdlGrpc class
germa89 Jun 17, 2025
08c9d13
refactor: moving parse ip to misc
germa89 Jun 17, 2025
96c8524
feat: returning float in inquire if possible.
germa89 Jun 17, 2025
104a6fd
feat: adding method to check if MAPDL and DPF server are on the same …
germa89 Jun 17, 2025
c6f5f2e
feat: check if DPF is remote based on comparing IPs.
germa89 Jun 17, 2025
99367d7
feat: allow returning bool in 'mapdl.inquire'
germa89 Jun 17, 2025
3b98eed
feat: returning full path of RST file always, even on remote
germa89 Jun 17, 2025
a7a66c7
feat: clean up RST attributes
germa89 Jun 17, 2025
b36ccaa
fix: pytest error printing
germa89 Jun 17, 2025
bd387ef
feat: download RST file to temporary directory in test fixture
Jun 17, 2025
c36d6cf
fix: correct platform attribute reference in file path construction
Jun 17, 2025
88240c3
fix: streamline connection logic in DPFResult class
Jun 17, 2025
f5ae558
ci: auto fixes from pre-commit.com hooks.
pre-commit-ci[bot] Jun 17, 2025
ad6e9e8
refactor: remove unused import and clean up xfail reason formatting
Jun 17, 2025
d97b9d2
chore: merge remote-tracking branch 'origin/main' into feat/using-dpf…
Jun 17, 2025
ad5ad30
Apply suggestions from code review
germa89 Jun 18, 2025
400db37
fix: handle non-interactive mode in _MapdlCommandExtended class
Jun 18, 2025
33a7188
fix: correct assignment syntax in DPFResult class
Jun 18, 2025
a1b1f2a
ci: auto fixes from pre-commit.com hooks.
pre-commit-ci[bot] Jun 18, 2025
7282669
junk: empty commit to trigger CICD
Jun 18, 2025
f21bbf2
fix: enhance DPFResult class with temporary directory handling and sa…
Jun 18, 2025
8c4444e
fix: refactor Example class to use properties for example_name and ap…
Jun 18, 2025
977eb94
fix: skip cyclic test due to DPF segfault issue
germa89 Jun 18, 2025
59ac804
fix: update skip decorator for cyclic test to use pytest.mark.skip
Jun 18, 2025
957be2a
fix: add debug logging for DPF server IP and executable checks in DPF…
germa89 Jun 18, 2025
8954c34
fix: update test-remote workflow for improved compatibility with GitH…
germa89 Jun 19, 2025
b63307b
fix: bind DPF port for CICD version in start_mapdl.sh
germa89 Jun 19, 2025
3652a05
fix: add second DPF port for MAPDL pool testing in test-remote workflow
germa89 Jun 19, 2025
89bfc2b
fix: improving logging and delaying server connection to the first usage
germa89 Jun 19, 2025
a17f98b
fix: not existing attribute _is_remote
germa89 Jun 19, 2025
3a85827
fix: add logging for docker ps output and move log files in collect_m…
germa89 Jun 19, 2025
0b1b30f
chore: merge remote-tracking branch 'origin/main' into feat/using-dpf…
germa89 Jun 19, 2025
e9cb9ed
fix: quote DPF_ARG variable in docker run command for proper handling
germa89 Jun 19, 2025
359eedb
refactor: remove unnecessary import of pytest in test_result.py
germa89 Jun 19, 2025
2b52c57
fix: import parse_ip_route in result.py to resolve missing function i…
germa89 Jun 19, 2025
4886d22
refactor: remove redundant import of _HAS_DPF in mapdl_core.py
germa89 Jun 19, 2025
bcabb8e
refactor: comment out unused old attributes in DPFResult class
germa89 Jun 19, 2025
75452f4
fix: simplify exception handling in validate function in test_result.py
germa89 Jun 19, 2025
7020a6e
fix: add docker ps command to log running containers in test-remote.yml
germa89 Jun 19, 2025
27cb122
fix: update DPF port binding logic in start_mapdl.sh
germa89 Jun 19, 2025
7abb286
feat: adding docker ps output
germa89 Jun 20, 2025
b76cebb
fix: log DPF_ARG and DB_INT_PORT when binding DPF port in start_mapdl.sh
germa89 Jun 20, 2025
3433a44
fix: ensure DPF_ARG is correctly expanded in docker run command in st…
germa89 Jun 20, 2025
f427e90
fix: correct variable expansion for LICENSE_SERVER and DB_INT_PORT in…
germa89 Jun 20, 2025
aa0cb46
fix: update file-name format for remote and local mapdl versions in C…
germa89 Jun 20, 2025
deac590
chore: merge remote-tracking branch 'origin/main' into feat/using-dpf…
germa89 Jun 20, 2025
d832587
fix: correct syntax for conditional check on MAPDL_VERSION in start_m…
germa89 Jun 20, 2025
6f4e65b
fix: update DPF_PORT and DPF_PORT2 values in test-remote.yml
germa89 Jun 20, 2025
ebbbb2f
fix: enhance start_mapdl.sh script with detailed usage instructions a…
germa89 Jun 20, 2025
b8d7173
fix: enable docker image pull in start_mapdl.sh script
germa89 Jun 20, 2025
a1a47a8
fix: correct syntax for environment variable in docker command in sta…
germa89 Jun 20, 2025
c99948e
fix: remove health check command from docker run in start_mapdl.sh
germa89 Jun 20, 2025
fcfbf41
fix: simplify docker command entrypoint and instance name syntax in s…
germa89 Jun 20, 2025
540b476
fix: add docker ps and process listing commands to log collection script
germa89 Jun 20, 2025
50b0481
refactor: adding more logging
germa89 Jun 20, 2025
e0bec34
fix: correct log file naming and improve log collection in collect_ma…
germa89 Jun 20, 2025
c3c5f3c
fix: streamline log collection process by removing unnecessary log moves
germa89 Jun 20, 2025
381f971
fix: add docker ps command to log collection scripts for better proce…
germa89 Jun 20, 2025
04d2d57
fix: ensure proper variable usage and improve logging for DPF server …
germa89 Jun 20, 2025
2661755
fix: add docker ps command for better visibility before starting DPF …
germa89 Jun 20, 2025
38ff0b5
fix: reorder DPF server startup steps for improved execution flow
germa89 Jun 20, 2025
7ac2043
fix: comment out specific node assertions in test for clarity and fut…
germa89 Jun 23, 2025
55fd609
fix: reduce maxfail in pytest arguments for improved test stability
germa89 Jun 23, 2025
ec77ca9
refactor: use an env var for the variable
germa89 Jun 23, 2025
f37c55b
fix: update DPF server port in workflow for compatibility
germa89 Jun 25, 2025
abd7cd9
chore: merge remote-tracking branch 'origin/main' into feat/using-dpf…
germa89 Jun 25, 2025
3b6f3d1
build: restrict vtk version to <9.5.0 for compatibility
germa89 Jun 25, 2025
0e87aab
chore: adding changelog file 1300.dependencies.md [dependabot-skip]
pyansys-ci-bot Jun 25, 2025
f9bf708
fix: increase maxfail limit in pytest arguments for better test resil…
germa89 Jun 25, 2025
a08f3b4
Merge branch 'main' into feat/using-dpf-for-results
germa89 Jun 25, 2025
4164699
chore: adding changelog file 1300.maintenance.md [dependabot-skip]
pyansys-ci-bot Jun 25, 2025
473e8e0
chore: merge branch 'feat/using-dpf-for-results' of https://github.co…
germa89 Jun 25, 2025
f7e2fe3
test: skip compatibility_element_stress tests due to Python segmentat…
germa89 Jun 25, 2025
e13c9f3
fix: update DPF port handling in start_mapdl.sh and test-remote.yml f…
germa89 Jun 25, 2025
fc39a43
chore: merge remote-tracking branch 'origin/main' into feat/using-dpf…
germa89 Jun 26, 2025
c3c70d2
chore: merge remote-tracking branch 'origin/main' into feat/using-dpf…
germa89 Jun 27, 2025
161d982
chore: merge remote-tracking branch 'origin/main' into feat/using-dpf…
germa89 Jun 27, 2025
c35eb19
refactor: attempt to cache DPF ip.
germa89 Jun 27, 2025
5f26bb9
feat: resolve IP address in DPFResult connection method
germa89 Jun 30, 2025
688d4a3
refactor: improve DPF test skipping logic for clarity
germa89 Jun 30, 2025
c7963ba
feat: add random order seed to pytest for consistent test results
germa89 Jun 30, 2025
dbab240
fix: allow module-level skipping for DPF tests when backend is not en…
germa89 Jun 30, 2025
c7331fb
Merge branch 'main' into feat/using-dpf-for-results
germa89 Jul 1, 2025
bb382a8
refactor: remove random order seed from pytest command in test workflow
germa89 Jul 1, 2025
2efcf1b
Merge branch 'feat/using-dpf-for-results' of https://github.com/ansys…
germa89 Jul 1, 2025
db9d650
Merge branch 'main' into feat/using-dpf-for-results
germa89 Jul 1, 2025
a3b2f88
ci: update Quarto version from 1.6.43 to 1.7.32 in documentation buil…
germa89 Jul 1, 2025
17d5b53
chore: adding changelog file 4062.fixed.md [dependabot-skip]
pyansys-ci-bot Jul 1, 2025
318541d
ci: enhance documentation build logging and error reporting
germa89 Jul 1, 2025
e395046
Merge branch 'fix/quarto-doc-build' of https://github.com/ansys/pymap…
germa89 Jul 1, 2025
7581164
ci: enhance error handling in documentation build process
germa89 Jul 1, 2025
f7c338b
ci: add error handling for Quarto PDF rendering in documentation build
germa89 Jul 1, 2025
9d8df48
ci: add logging for Quarto PDF rendering in documentation build
germa89 Jul 1, 2025
138d4d3
ci: improve error logging for cheat sheet PDF rendering in documentat…
germa89 Jul 1, 2025
713b106
ci: disable cheatsheet PDF build by default and remove error handling…
germa89 Jul 1, 2025
7102076
chore: adding changelog file 4062.fixed.md [dependabot-skip]
pyansys-ci-bot Jul 1, 2025
8a0f5ea
Merge branch 'fix/quarto-doc-build' into feat/using-dpf-for-results
germa89 Jul 1, 2025
4bf2208
test: uncomment skip condition for compatibility element stress tests
germa89 Jul 2, 2025
9a2bb93
Merge branch 'main' into feat/using-dpf-for-results
germa89 Jul 2, 2025
73244b6
Merge branch 'main' into feat/using-dpf-for-results
germa89 Jul 2, 2025
458b520
Merge branch 'main' into feat/using-dpf-for-results
germa89 Jul 2, 2025
7943d5e
Merge branch 'main' into feat/using-dpf-for-results
germa89 Jul 2, 2025
72b4998
Merge branch 'main' into feat/using-dpf-for-results
germa89 Jul 2, 2025
21a63c7
fix: add curl installation to minimal and full OS package setups
germa89 Jul 2, 2025
aea6942
chore: adding changelog file 4070.fixed.md [dependabot-skip]
pyansys-ci-bot Jul 2, 2025
f1210f4
Merge branch 'feat/using-dpf-for-results' of https://github.com/ansys…
germa89 Jul 2, 2025
0960bf5
refactor: rename get_ip to get_local_ip and update usage in DPFResult…
germa89 Jul 2, 2025
e766d5e
test: add validation for invalid inputs in parse_step_substep and ele…
germa89 Jul 2, 2025
b72e65b
fix: using only one flag to upload to codecov
germa89 Jul 2, 2025
bc9d6ae
Merge branch 'ci/fix-coverage-upload' into feat/using-dpf-for-results
germa89 Jul 2, 2025
fdb376a
refactor: clean up comments and improve type annotations in DPFResult…
germa89 Jul 2, 2025
0391cf1
test: parameterize invalid input tests for parse_step_substep method
germa89 Jul 2, 2025
ec35ada
chore: empty commit to trigger CICD
germa89 Jul 2, 2025
b10293c
delete: remove obsolete test_dpf.py file
germa89 Jul 2, 2025
f7b4533
fix: codacy errors
germa89 Jul 2, 2025
e937da0
chore: avoid random ordering
germa89 Jul 2, 2025
00bbb06
feat: add step to print number of restarts in the main container
germa89 Jul 2, 2025
1a7384b
fix: add random-order-seed to pytest arguments for consistent test re…
germa89 Jul 2, 2025
70eb56c
Merge branch 'main' into feat/using-dpf-for-results
germa89 Jul 2, 2025
d7abf9a
feat: enhance logging by adding DPF logs collection and updating envi…
germa89 Jul 3, 2025
a434107
Merge branch 'feat/using-dpf-for-results' of https://github.com/ansys…
germa89 Jul 3, 2025
77feba9
feat: add conditional execution for restart count logging in test wor…
germa89 Jul 3, 2025
b3425f3
fix: update DPF_DB path to ensure proper directory format for logging
germa89 Jul 3, 2025
eb9578f
feat: create directory for DPF logs before starting DPF server
germa89 Jul 3, 2025
ed92273
fix: update DPF argument variable for Docker command in start_mapdl.sh
germa89 Jul 3, 2025
a3717ba
chore: empty commit to trigger CICD
germa89 Jul 3, 2025
c5d1d50
refactor: remove inheritance from Result in DPFResult class and comme…
germa89 Jul 3, 2025
3428edc
test: solve and exit
germa89 Jul 3, 2025
af0ffce
refactor: update reader and result fixtures to use temporary director…
germa89 Jul 4, 2025
39a19a0
test: add mapdl.post1() calls to compatibility tests for nodal and el…
germa89 Jul 4, 2025
b807489
chore: merge remote-tracking branch 'origin/main' into feat/using-dpf…
germa89 Jul 7, 2025
06d34dc
refactor: enhance result handling in tests by using temporary directo…
germa89 Jul 7, 2025
d786b6f
refactor: remove unnecessary temporary directory creation in result f…
germa89 Jul 7, 2025
c18c254
fix: ensure RST file exists after saving in DPF result setup
germa89 Jul 7, 2025
eb1855f
feat: adding option to specify file already on the server.
germa89 Jul 7, 2025
8c5b2a2
feat: add example name for VM37 Solid Static Plastic test
germa89 Jul 7, 2025
1bcf5c8
refactor: reorganize imports in test_result.py for clarity
germa89 Jul 7, 2025
fa6447e
feat: add option to stop after the first solve in TestStaticThermocou…
germa89 Jul 7, 2025
cdf8887
fix: increase maxfail limit in pytest arguments for better test resil…
germa89 Jul 7, 2025
afcaf4e
feat: add nsets property to DPFResult class for improved metadata access
germa89 Jul 7, 2025
180edff
fix: update skip reason for DPF grpc connection issue and remove comm…
germa89 Jul 7, 2025
3d63a39
feat: add regex import for enhanced string manipulation capabilities
germa89 Jul 7, 2025
6e07783
Merge branch 'main' into feat/using-dpf-for-results
germa89 Jul 8, 2025
bca91de
feat: add result type test to validate output based on installed reader
germa89 Jul 8, 2025
999bdb7
refactor: remove commented-out methods in DPFResult class for cleaner…
germa89 Jul 8, 2025
e86f132
test: skip result type test if DPF backend is not set
germa89 Jul 8, 2025
a7f45c4
feat: add entrypoint script for DPF server setup and modify start_map…
germa89 Jul 9, 2025
4dda534
refactor: remove DPF server startup from the same container as MAPDL …
germa89 Jul 9, 2025
1965eab
fix: add quotes around DATAPROCESSING_DEBUG variable for consistency
germa89 Jul 9, 2025
8cc2cfc
fix: update health check command in start_mapdl.sh for improved relia…
germa89 Jul 9, 2025
0844f12
fix: remove health check command from docker run in start_mapdl.sh
germa89 Jul 9, 2025
448f295
fix: fix permissions and correct string comparison operator for RUN_D…
germa89 Jul 9, 2025
3f5805c
fix: correct entrypoint script path in docker command in start_mapdl.sh
germa89 Jul 9, 2025
ebb6550
fix: update RUN_DPF_SERVER initialization and entrypoint script path …
germa89 Jul 9, 2025
41ee006
fix: update entrypoint script path to use bind mount in start_mapdl.sh
germa89 Jul 9, 2025
13f9c01
fix: correct condition for RUN_DPF_SERVER initialization and add miss…
germa89 Jul 9, 2025
1e6da4f
fix: update DPF port internal variable and improve environment variab…
germa89 Jul 9, 2025
7cdd4c8
fix: update DPF server initialization logic in start_mapdl.sh and tes…
germa89 Jul 9, 2025
fc10016
fix: enhance restart count logging for MAPDL containers in test-remot…
germa89 Jul 9, 2025
b697079
fix: comment out DPF Debug directory setup in entrypoint.sh
germa89 Jul 9, 2025
27dfebe
fix: update MAPDL execution parameters in entrypoint.sh
germa89 Jul 9, 2025
e25f51b
fix: update runner environment for test-remote job to use public-ubun…
germa89 Jul 9, 2025
d1dd754
fix: update package installation in test-remote.yml to use libgl1 and…
germa89 Jul 9, 2025
05b6a7f
fix: add shebang to entrypoint.sh for proper script execution
germa89 Jul 9, 2025
34c7c4e
chore: merge remote-tracking branch 'origin/main' into feat/using-dpf…
germa89 Jul 9, 2025
365dcc7
fix: quote DPF server startup command for proper execution
germa89 Jul 9, 2025
0563053
fix: remove redundant restart count logging from test workflow
germa89 Jul 10, 2025
fac9de0
fix: rename log_test_start to log_test and enhance functionality for …
germa89 Jul 10, 2025
ed47cef
fix: override DISTRIBUTED_MODE to 'dmp' for CICD version in start_map…
germa89 Jul 10, 2025
756c37c
fix: enhance DPF connection logging with detailed server information
germa89 Jul 10, 2025
2b30b36
fix: set environment variables for root execution in entrypoint script
germa89 Jul 10, 2025
4285f7c
fix: add test result file to pytest logging for better traceability
germa89 Jul 10, 2025
523c827
fix: enhance logging in MAPDL connection and DPF result handling for …
germa89 Jul 10, 2025
f24b7a5
fix: remove redundant log file argument in pytest command
germa89 Jul 10, 2025
4e90651
fix: disable debug logging for cache reset in MeshGrpc class
germa89 Jul 10, 2025
f490b51
fix: skip distributed test for future resolution
germa89 Jul 10, 2025
482e6d8
Merge branch 'main' into feat/using-dpf-for-results
germa89 Jul 10, 2025
c42d6ac
Merge branch 'feat/using-dpf-for-results' of https://github.com/ansys…
germa89 Jul 10, 2025
d89c942
fix: include test result file in pytest logging
germa89 Jul 11, 2025
cfc80a3
chore: merge remote-tracking branch 'origin/main' into feat/using-dpf…
germa89 Jul 11, 2025
d9e11d1
fix: using str instead of PurePosixPath in dpf.Model initialization
germa89 Jul 11, 2025
fa46100
fix: remove filtering in pytest command
germa89 Jul 11, 2025
e5b497d
fix: pass MAPDL logger to DPFResult initialization and update logging…
germa89 Jul 11, 2025
d7f19d3
Merge branch 'main' into feat/using-dpf-for-results
germa89 Jul 11, 2025
ac37a54
fix: skip cleanup loggers test to prevent unwanted logger removal
germa89 Jul 11, 2025
c2f3c84
fix: import DPFResult in the appropriate locations for proper functio…
germa89 Jul 11, 2025
b8b2e29
Merge branch 'feat/using-dpf-for-results' of https://github.com/ansys…
germa89 Jul 11, 2025
eedd444
fix: ensure proper termination of APDL code by adding newline before …
germa89 Jul 12, 2025
edbb4f9
fix: replace "QAEND" with "!QAEND" in vm_code and remove redundant ig…
germa89 Jul 12, 2025
4292a8c
fix: skip broken test for Electro-Thermal-Compliant Microactuator
germa89 Jul 12, 2025
42072a3
fix: update skip message for broken Electro-Thermal-Compliant Microac…
germa89 Jul 12, 2025
208b36f
fix: remove assertion for '/EXIT' command in APDL code preparation
germa89 Jul 12, 2025
af72bbc
fix: remove redundant replacement of "QAEND" in vm_code
germa89 Jul 12, 2025
401eaf8
fix: reorganize imports and add dependency check for ansys-mapdl-read…
germa89 Jul 12, 2025
96c8983
Apply suggestions from code review
germa89 Jul 14, 2025
30f58a8
Apply suggestions from code review
germa89 Jul 14, 2025
1efa7f5
feat: enhance log_test functionality and add test_dpf_backend functio…
germa89 Jul 14, 2025
206b195
chore: adding changelog file 4097.miscellaneous.md [dependabot-skip]
pyansys-ci-bot Jul 14, 2025
5e80675
refactor: rename logging functions for clarity and consistency
germa89 Jul 14, 2025
7d73e51
feat: enhance logging scripts and add DPF server support in CI workflows
germa89 Jul 14, 2025
889ab62
chore: adding changelog file 4098.miscellaneous.md [dependabot-skip]
pyansys-ci-bot Jul 14, 2025
91ba059
refactor: enhance sys method type hints and clean up return value
germa89 Jul 14, 2025
8935698
chore: adding changelog file 4099.miscellaneous.md [dependabot-skip]
pyansys-ci-bot Jul 14, 2025
2a58f3c
refactor: remove unused DPF Debug directory setup from entrypoint script
germa89 Jul 14, 2025
94b0c60
chore: merge branch 'fix/removing-new-line-from-sys' into feat/using-…
germa89 Jul 14, 2025
f0f02c6
chore: merge branch 'ci/using-entrypoint-for-starting-mapdl' into fea…
germa89 Jul 14, 2025
c86d258
chore: merge branch 'maint/improving-testing-logging' into feat/using…
germa89 Jul 14, 2025
1d033cb
Update src/ansys/mapdl/core/mapdl_grpc.py
germa89 Jul 14, 2025
2e5921c
ci: auto fixes from pre-commit.com hooks.
pre-commit-ci[bot] Jul 14, 2025
b559d5e
Merge branch 'main' into fix/removing-new-line-from-sys
germa89 Jul 14, 2025
6d270fc
fix: correct logic for removing trailing newline character
germa89 Jul 14, 2025
a9ae1f4
chore: merge branch 'fix/removing-new-line-from-sys' into feat/using-…
germa89 Jul 14, 2025
17c7cb7
chore: merge remote-tracking branch 'origin/main' into feat/using-dpf…
germa89 Jul 14, 2025
ffb9895
Apply suggestions from code review
germa89 Jul 14, 2025
65d8840
ci: auto fixes from pre-commit.com hooks.
pre-commit-ci[bot] Jul 14, 2025
514105d
Merge branch 'main' into feat/using-dpf-for-results
germa89 Jul 14, 2025
5d12154
fix: streamline DPF upload logic for remote RST handling
germa89 Jul 14, 2025
375466a
Merge branch 'feat/using-dpf-for-results' of https://github.com/ansys…
germa89 Jul 14, 2025
0829f58
refactor: remove unused variable in DPFResult class
germa89 Jul 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .ci/collect_mapdl_logs_locals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ echo "Copying the log files..."
mv ./*.log ./"$LOG_NAMES"/ || echo "No log files could be found"
mv ./*apdl.out ./"$LOG_NAMES"/ || echo "No APDL log files could be found"
mv ./*pymapdl.apdl ./"$LOG_NAMES"/ || echo "No PYMAPDL APDL log files could be found"
mv /home/mapdl/dpf_logs ./"$LOG_NAMES"/ || echo "No DPF log files could be found"

echo "Copying the profiling files..."
mkdir -p ./"$LOG_NAMES"/prof
Expand Down
1 change: 1 addition & 0 deletions .ci/collect_mapdl_logs_remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ echo "Collecting MAPDL logs..."
(docker exec "$MAPDL_INSTANCE" /bin/bash -c "if compgen -G '$FILE*.log' > /dev/null ;then mv -f /file*.log /mapdl_logs && echo 'Successfully moved log files.'; fi") || echo "Failed to move the 'log' files into a local file"
(docker exec "$MAPDL_INSTANCE" /bin/bash -c "if compgen -G '$WDIR*.crash' > /dev/null ;then mv -f $WDIR*.crash /mapdl_logs && echo 'Successfully moved crash files.'; fi") || echo "Failed to move the 'crash' files into a local file"

docker cp "$MAPDL_INSTANCE":/home/mapdl/dpf_logs ./"$LOG_NAMES"/ || echo "Failed to copy the 'dpf_logs' files into a local directory"
docker cp "$MAPDL_INSTANCE":/mapdl_logs/. ./"$LOG_NAMES"/. || echo "Failed to copy the 'log-build-docs' files into a local directory"

####
Expand Down
29 changes: 29 additions & 0 deletions .ci/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
export OMPI_ALLOW_RUN_AS_ROOT=1
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1

if [ -z "${VERSION}" ]; then
echo "VERSION environment variable is not set. Please set it to the desired Ansys version."
exit 1
fi

RUN_DPF_SERVER=${RUN_DPF_SERVER:-false}

if [ -n "${ANSYS_DPF_ACCEPT_LA}" ]; then
if [ "${ANSYS_DPF_ACCEPT_LA}" == "Y" ]; then
RUN_DPF_SERVER=true
fi
fi

echo "RUN_DPF_SERVER: $RUN_DPF_SERVER"

if [ "$RUN_DPF_SERVER" == "true" ]; then
echo "Starting DPF server..."
"/ansys_inc/v${VERSION}/aisol/bin/linx64/Ans.Dpf.Grpc.sh" --port "${DPF_PORT_INTERNAL}" > log_dpf.log &
echo "DPF server started."
fi

echo "Starting MAPDL..."
echo "Using executable path: ${EXEC_PATH}"

$EXEC_PATH -grpc -dir /jobs -"${DISTRIBUTED_MODE}" -np 2 -db -6000 -m -6000 -
28 changes: 22 additions & 6 deletions .ci/start_mapdl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,24 @@ fi;

if [[ $MAPDL_VERSION == *"cicd"* ]] ; then
echo "It is a CICD version, binding DPF port too"
export DPF_ARG="-p ${DPF_PORT}:50055"
if [ "$RUN_DPF_SERVER" == "true" ]; then
echo "RUN_DPF_SERVER is set to true, starting DPF server"
export DPF_ON="-e ANSYS_DPF_ACCEPT_LA=Y"
fi

export DPF_PORT_INTERNAL=50055
export DPF_PORT_ARG="-p ${DPF_PORT}:${DPF_PORT_INTERNAL}"
export DB_INT_PORT=50056

echo "DPF_ARG: $DPF_ARG"
echo "DPF_PORT_ARG: $DPF_PORT_ARG"
echo "DB_INT_PORT: $DB_INT_PORT"

echo "Overriding DISTRIBUTED_MODE to 'dmp' for CICD version"
export DISTRIBUTED_MODE="dmp"
else
export DPF_ARG=""
export DPF_PORT_ARG=""
export DB_INT_PORT=50055
export DPF_ON=""
fi;

echo "EXEC_PATH: $EXEC_PATH"
Expand All @@ -90,17 +100,23 @@ run \
--health-start-period=10s \
-e ANSYSLMD_LICENSE_FILE=1055@${LICENSE_SERVER} \
-e ANSYS_LOCK="OFF" \
${DPF_ON} \
-p ${PYMAPDL_PORT}:50052 \
-p ${PYMAPDL_DB_PORT}:${DB_INT_PORT} \
${DPF_ARG} \
${DPF_PORT_ARG} \
-e VERSION=${VERSION} \
-e DPF_PORT_INTERNAL=${DPF_PORT_INTERNAL} \
-e EXEC_PATH=${EXEC_PATH} \
-e DISTRIBUTED_MODE=${DISTRIBUTED_MODE} \
--shm-size=2gb \
-e I_MPI_SHM_LMT=shm \
-e P_SCHEMA="$P_SCHEMA" \
-e P_SCHEMA=${P_SCHEMA} \
-w /jobs \
-u=0:0 \
--memory=6656MB \
--memory-swap=16896MB \
${MAPDL_IMAGE} ${EXEC_PATH} -grpc -dir /jobs -${DISTRIBUTED_MODE} -np 2 -db -5000 -m -5000 -
--mount type=bind,src=${PWD}/.ci/entrypoint.sh,dst=/entrypoint.sh \
${MAPDL_IMAGE} /entrypoint.sh
_EOT_
)

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ jobs:
PYTEST_ARGUMENTS: '-vvv -ra --color=yes --durations=30 --random-order --random-order-bucket=class --maxfail=10 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html --timeout=180 --profile-svg --profile --report-log-exclude-logs-on-passed-tests --strict-markers'
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
DATAPROCESSING_DEBUG: /home/mapdl/dpf_logs

container:
image: "${{ inputs.package-registry }}:${{ inputs.mapdl-version }}"
Expand Down
23 changes: 8 additions & 15 deletions .github/workflows/test-remote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ jobs:
PYMAPDL_DB_PORT2: 21003 # default won't work on GitHub runners
DPF_DOCKER_IMAGE: ghcr.io/ansys/mapdl:v25.2-rocky-dpf-standalone
DPF_PORT: 21014
DPF_PORT_INTERNAL: 50055 # Internal port for DPF server
DPF_PORT2: 21015
DPF_START_SERVER: False
HAS_DPF: True
TEST_DPF_BACKEND: false
PYTEST_ARGUMENTS: '-vvv -ra --color=yes --durations=30 --random-order --random-order-bucket=class --maxfail=5 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html --timeout=180 --profile-svg --profile --report-log-exclude-logs-on-passed-tests --strict-markers'
PYTEST_ARGUMENTS: '-vvv -ra --color=yes --durations=30 --random-order --random-order-bucket=class --maxfail=10 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html --timeout=180 --profile-svg --profile --report-log-exclude-logs-on-passed-tests --strict-markers --random-order-seed=650199'
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PYTEST_ARGUMENTS: '-vvv -ra --color=yes --durations=30 --random-order --random-order-bucket=class --maxfail=10 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html --timeout=180 --profile-svg --profile --report-log-exclude-logs-on-passed-tests --strict-markers --random-order-seed=650199'
PYTEST_ARGUMENTS: '-vvv -ra --color=yes --durations=30 --random-order --random-order-bucket=class --maxfail=10 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html --timeout=180 --profile-svg --profile --report-log-exclude-logs-on-passed-tests --strict-markers'

MAPDL_PACKAGE: ghcr.io/ansys/mapdl

steps:
Expand Down Expand Up @@ -149,13 +150,16 @@ jobs:
MAPDL_VERSION: ${{ inputs.mapdl-version }}
DISTRIBUTED_MODE: ${{ steps.distributed_mode.outputs.distributed_mode }}
MAPDL_PACKAGE: ${{ env.MAPDL_PACKAGE }}
DPF_PORT_INTERNAL: ${{ env.DPF_PORT_INTERNAL }}
shell: bash
run: |
echo "Launching first MAPDL instance..."
export INSTANCE_NAME=MAPDL_0
export RUN_DPF_SERVER=true
.ci/start_mapdl.sh &> mapdl_launch_0.log & export DOCKER_PID_0=$!

echo "Launching a second instance for MAPDL pool testing..."
export RUN_DPF_SERVER=false
export PYMAPDL_PORT=${{ env.PYMAPDL_PORT2 }}
export PYMAPDL_DB_PORT=${{ env.PYMAPDL_DB_PORT2 }}
export INSTANCE_NAME=MAPDL_1
Expand Down Expand Up @@ -222,17 +226,6 @@ jobs:
run: |
python -m pip install .[tests]

- name: "Start DPF server on same container as MAPDL"
if: ${{ steps.ubuntu_check.outputs.ON_SAME_CONTAINER == 'true' }}
shell: bash
env:
MAPDL_INSTANCE: "MAPDL_0"
DPF_PORT: "${{ env.DPF_PORT }}"
run: |
docker ps
echo "Starting DPF server on same MAPDL container: ${MAPDL_INSTANCE}"
docker exec ${MAPDL_INSTANCE} /bin/bash -c "/ansys_inc/v252/aisol/bin/linx64/Ans.Dpf.Grpc.sh --port 50055 &" > log_dpf.log &

- name: "Waiting for the services to be up"
shell: bash
env:
Expand Down Expand Up @@ -265,14 +258,14 @@ jobs:
--log-file-level="DEBUG"

- name: "Print amount of restarts"
if: always()
run: |
N_RESTART=$(docker inspect --format '{{ .RestartCount }}' MAPDL_0)
echo "Number of restarts in MAPDL_0 container: $N_RESTART"
echo "Number of restarts in the MAPDL_0 container: $N_RESTART"
N_RESTART=$(docker inspect --format '{{ .RestartCount }}' MAPDL_1)
echo "Number of restarts in MAPDL_1 container: $N_RESTART"
echo "Number of restarts in the MAPDL_1 container: $N_RESTART"

- name: "Upload pytest reports to GitHub"
if: always()
uses: actions/upload-artifact@v4.6.2
with:
name: "reports-${{ inputs.file-name }}"
Expand Down
1 change: 1 addition & 0 deletions doc/changelog.d/1300.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Feat: using dpf instead of reader in "results" module
1 change: 1 addition & 0 deletions doc/changelog.d/4098.miscellaneous.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Feat: using entrypoint to start mapdl
5 changes: 3 additions & 2 deletions src/ansys/mapdl/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,14 @@
# Import related globals
_HAS_ATP: bool = is_installed("ansys.tools.path")
_HAS_CLICK: bool = is_installed("click")
_HAS_PIM: bool = is_installed("ansys.platform.instancemanagement")
_HAS_DPF: bool = is_installed("ansys.dpf.core")
_HAS_MATPLOTLIB: bool = is_installed("matplotlib")
_HAS_PANDAS: bool = is_installed("pandas")
_HAS_PIM: bool = is_installed("ansys.platform.instancemanagement")
_HAS_PYANSYS_REPORT: bool = is_installed("ansys.tools.report")
_HAS_PYVISTA: bool = is_installed("pyvista")
_HAS_REQUESTS: bool = is_installed("requests")
_HAS_TQDM: bool = is_installed("tqdm")
_HAS_MATPLOTLIB: bool = is_installed("matplotlib")
_HAS_VISUALIZER: bool = (
is_installed("ansys.tools.visualization_interface") and _HAS_MATPLOTLIB
)
Expand Down
1 change: 1 addition & 0 deletions src/ansys/mapdl/core/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ def version_from_path(*args: Any, **kwargs: Any) -> int | None:
"just_launch",
"on_pool",
"graphics_backend",
"use_reader_backend",
]

ON_WSL = os.name == "posix" and (
Expand Down
41 changes: 32 additions & 9 deletions src/ansys/mapdl/core/mapdl_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

from ansys.mapdl import core as pymapdl
from ansys.mapdl.core import LOG as logger
from ansys.mapdl.core import _HAS_VISUALIZER
from ansys.mapdl.core import _HAS_DPF, _HAS_VISUALIZER
from ansys.mapdl.core.commands import (
CMD_BC_LISTING,
CMD_LISTING,
Expand Down Expand Up @@ -88,6 +88,9 @@
from ansys.mapdl.core.solution import Solution
from ansys.mapdl.core.xpl import ansXpl

if _HAS_DPF:
from ansys.mapdl.core.reader import DPFResult

from ansys.mapdl.core.post import PostProcessing

MAX_PARAM_CHARS = 32
Expand Down Expand Up @@ -211,6 +214,7 @@
"start_instance",
"start_timeout",
"timeout",
"use_reader_backend",
]


Expand Down Expand Up @@ -264,7 +268,7 @@
local: bool = True,
print_com: bool = False,
file_type_for_plots: VALID_FILE_TYPE_FOR_PLOT_LITERAL = "PNG",
**start_parm,
**start_parm: dict[str, Any],
):
"""Initialize connection with MAPDL."""
self._show_matplotlib_figures = True # for testing
Expand All @@ -285,6 +289,7 @@
self._version = None # cached version
self._mute = False
self._save_selection_obj = None
self._use_reader_backend: bool = start_parm.pop("use_reader_backend", True)

if _HAS_VISUALIZER:
if graphics_backend is not None: # pragma: no cover
Expand Down Expand Up @@ -362,6 +367,9 @@

self._info = Information(self)

# DPF
self._dpf_result: "DPFResult | None" = None

def _after_run(self, _command: str) -> None:
pass

Expand Down Expand Up @@ -1072,7 +1080,11 @@
@property
@requires_package("ansys.mapdl.reader", softerror=True)
def result(self):
"""Binary interface to the result file using :class:`ansys.mapdl.reader.rst.Result`.
"""Binary interface to the result file using ``ansys-dpf-core`` or
``ansys-mapdl-reader``.

If `ansys-dpf-core` is not installed, then a :class:`ansys.mapdl.reader.rst.Result`
object is returned.

Returns
-------
Expand Down Expand Up @@ -1106,12 +1118,21 @@
NSL : Nodal displacements
RF : Nodal reaction forces
"""
if _HAS_DPF and not self._use_reader_backend:
from ansys.mapdl.core.reader import DPFResult

Check warning on line 1122 in src/ansys/mapdl/core/mapdl_core.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/mapdl/core/mapdl_core.py#L1122

Added line #L1122 was not covered by tests

if self._dpf_result is None:

Check warning on line 1124 in src/ansys/mapdl/core/mapdl_core.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/mapdl/core/mapdl_core.py#L1124

Added line #L1124 was not covered by tests
# create a DPFResult object
self._dpf_result = DPFResult(None, mapdl=self, logger=self._log)

Check warning on line 1126 in src/ansys/mapdl/core/mapdl_core.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/mapdl/core/mapdl_core.py#L1126

Added line #L1126 was not covered by tests

return self._dpf_result

Check warning on line 1128 in src/ansys/mapdl/core/mapdl_core.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/mapdl/core/mapdl_core.py#L1128

Added line #L1128 was not covered by tests

from ansys.mapdl.reader import read_binary
from ansys.mapdl.reader.rst import Result

if not self._local:
# download to temporary directory
save_path = os.path.join(tempfile.gettempdir())
save_path = tempfile.mkdtemp(suffix=f"ansys_tmp_{random_string()}")

Check warning on line 1135 in src/ansys/mapdl/core/mapdl_core.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/mapdl/core/mapdl_core.py#L1135

Added line #L1135 was not covered by tests
result_path = self.download_result(save_path)
else:
if self._distributed_result_file and self._result_file:
Expand Down Expand Up @@ -1141,10 +1162,12 @@
else:
result_path = self._result_file

if result_path is None:
raise FileNotFoundError("No result file(s) at %s" % self.directory)
if not os.path.isfile(result_path):
raise FileNotFoundError("No results found at %s" % result_path)
if result_path is None or not os.path.isfile(result_path):
raise FileNotFoundError(

Check warning on line 1166 in src/ansys/mapdl/core/mapdl_core.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/mapdl/core/mapdl_core.py#L1166

Added line #L1166 was not covered by tests
f"No result file(s) at {self.directory or result_path}. "
"Check that there is at least one RST file in the working directory "
f"'{self.directory}, or solve an MAPDL model to generate one."
)

return read_binary(result_path)

Expand Down Expand Up @@ -1299,7 +1322,7 @@
if os.path.isfile(filename):
return filename
else:
return f"{filename}.{ext}"
return self.directory / f"{filename}.{ext}"

Check warning on line 1325 in src/ansys/mapdl/core/mapdl_core.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/mapdl/core/mapdl_core.py#L1325

Added line #L1325 was not covered by tests

def _wrap_listing_functions(self):
# Wrapping LISTING FUNCTIONS.
Expand Down
18 changes: 18 additions & 0 deletions src/ansys/mapdl/core/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,24 @@
return False


def get_local_ip():
"""Get the local IP address of this machine.

It uses a socket to determine the local IP address, if fails, it returns local IP.
"""
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.settimeout(0)
try:

Check warning on line 116 in src/ansys/mapdl/core/misc.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/mapdl/core/misc.py#L114-L116

Added lines #L114 - L116 were not covered by tests
# doesn't even have to be reachable
s.connect(("10.254.254.254", 1))
ip = s.getsockname()[0]
except Exception:
ip = "127.0.0.1"

Check warning on line 121 in src/ansys/mapdl/core/misc.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/mapdl/core/misc.py#L118-L121

Added lines #L118 - L121 were not covered by tests
finally:
s.close()
return ip

Check warning on line 124 in src/ansys/mapdl/core/misc.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/mapdl/core/misc.py#L123-L124

Added lines #L123 - L124 were not covered by tests


def random_string(stringLength: int = 10, letters: str = string.ascii_lowercase) -> str:
"""Generate a random string of fixed length"""
import secrets
Expand Down
23 changes: 23 additions & 0 deletions src/ansys/mapdl/core/reader/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from .result import DPFResult

Check warning on line 23 in src/ansys/mapdl/core/reader/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/mapdl/core/reader/__init__.py#L23

Added line #L23 was not covered by tests
Loading
Loading