Skip to content

Commit df0892d

Browse files
authored
Merge branch 'main' into feat/plugins
2 parents fb96ede + 38d51a1 commit df0892d

File tree

292 files changed

+973
-760
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

292 files changed

+973
-760
lines changed

.ci/build_matrix.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ versions=(
99
# if added more "latest", change "$LATEST"
1010
'latest-ubuntu'
1111
'latest-ubuntu-student'
12+
'v25.2.0'
1213
'v25.1.0'
14+
'v25.1-ubuntu'
15+
'v25.1-ubuntu-student'
1316
'v24.2.0'
1417
'v24.2-ubuntu'
1518
'v24.2-ubuntu-student'

.ci/collect_mapdl_logs_locals.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
mkdir "$LOG_NAMES" && echo "Successfully generated directory $LOG_NAMES"
3+
4+
cp *.log ./"$LOG_NAMES"/ || echo "No log files could be found"
5+
cp *apdl.out ./"$LOG_NAMES"/ || echo "No APDL log files could be found"
6+
cp *pymapdl.apdl ./"$LOG_NAMES"/ || echo "No PYMAPDL APDL log files could be found"
7+
8+
9+
ls -la ./"$LOG_NAMES"
10+
11+
echo "Tar files..."
12+
tar cvzf ./"$LOG_NAMES".tgz ./"$LOG_NAMES" || echo "Failed to compress"
File renamed without changes.

.ci/display_logs_locals.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
#####
3+
# Displaying files
4+
FILE_PAT=./"$LOG_NAMES"/pymapdl.log
5+
FILE_DESCRIPTION="PyMAPDL log"
6+
7+
if compgen -G "$FILE_PAT" > /dev/null ;then for f in "$FILE_PAT"; do echo "::group:: $FILE_DESCRIPTION: $f" && cat "$f" && echo "::endgroup::" ; done; fi || echo "Failed to show $FILE_DESCRIPTION file"
8+
9+
#####
10+
FILE_PAT=./"$LOG_NAMES"/pymapdl.apdl
11+
FILE_DESCRIPTION="PyMAPDL APDL log"
12+
13+
if compgen -G "$FILE_PAT" > /dev/null ;then for f in "$FILE_PAT"; do echo "::group:: $FILE_DESCRIPTION: $f" && cat "$f" && echo "::endgroup::" ; done; fi || echo "Failed to show $FILE_DESCRIPTION file"
14+
15+
#####
16+
FILE_PAT=./"$LOG_NAMES"/apdl.out
17+
FILE_DESCRIPTION="MAPDL Output"
18+
19+
if compgen -G "$FILE_PAT" > /dev/null ;then for f in "$FILE_PAT"; do echo "::group:: $FILE_DESCRIPTION: $f" && cat "$f" && echo "::endgroup::" ; done; fi || echo "Failed to show $FILE_DESCRIPTION file"
File renamed without changes.

.ci/requirements_minimal.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pyfakefs==5.7.2
2+
pytest-cov==6.0.0
3+
pytest-random-order==1.1.1
4+
pytest-rerunfailures==15.0
5+
pytest-timeout==2.3.1
6+
pytest==8.3.4

.github/workflows/ci.yml

Lines changed: 72 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ env:
2424
PACKAGE_NAME: 'ansys-mapdl-core'
2525
PACKAGE_NAMESPACE: 'ansys.mapdl.core'
2626
DOCUMENTATION_CNAME: 'mapdl.docs.pyansys.com'
27-
LATEST_VERSION: "242"
27+
LATEST_VERSION: "252"
2828
MAPDL_IMAGE_VERSION_DOCS_BUILD: v24.2-ubuntu-student
2929
MEILISEARCH_API_KEY: ${{ secrets.MEILISEARCH_API_KEY }}
3030
MEILISEARCH_PUBLIC_API_KEY: ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }}
@@ -33,9 +33,10 @@ env:
3333
DPF_PORT: 21004
3434
MAPDL_PACKAGE: ghcr.io/ansys/mapdl
3535
ON_CI: True
36-
PYTEST_ARGUMENTS: '-vvv -rxXsa --color=yes --durations=10 --random-order --random-order-bucket=class --maxfail=10 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html --timeout=40'
36+
PYTEST_ARGUMENTS: '-vvv -rxXsa --color=yes --durations=10 --random-order --random-order-bucket=class --maxfail=10 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html --timeout=180'
3737

3838
BUILD_CHEATSHEET: True
39+
PYMAPDL_DEBUG_TESTING: True
3940

4041
# Following env vars when changed will "reset" the mentioned cache,
4142
# by changing the cache file name. It is rendered as ...-v%RESET_XXX%-...
@@ -337,7 +338,7 @@ jobs:
337338
MAPDL_INSTANCE: MAPDL_0
338339
LOG_NAMES: logs-build-docs
339340
run: |
340-
.ci/collect_mapdl_logs.sh
341+
.ci/collect_mapdl_logs_remote.sh
341342
342343
- name: "Upload logs to GitHub"
343344
if: always()
@@ -352,7 +353,7 @@ jobs:
352353
MAPDL_INSTANCE: MAPDL_0
353354
LOG_NAMES: logs-build-docs
354355
run: |
355-
.ci/display_logs.sh
356+
.ci/display_logs_remote.sh
356357
357358
build-test-remote-matrix:
358359
name: "Build remote test matrix"
@@ -577,7 +578,7 @@ jobs:
577578
MAPDL_INSTANCE: MAPDL_0
578579
LOG_NAMES: logs-remote-${{ matrix.mapdl-version }}
579580
run: |
580-
.ci/collect_mapdl_logs.sh
581+
.ci/collect_mapdl_logs_remote.sh
581582
582583
- name: "Upload logs to GitHub"
583584
if: always()
@@ -592,7 +593,7 @@ jobs:
592593
MAPDL_INSTANCE: MAPDL_0
593594
LOG_NAMES: logs-remote-${{ matrix.mapdl-version }}
594595
run: |
595-
.ci/display_logs.sh
596+
.ci/display_logs_remote.sh
596597
597598
build-test-local-minimal-matrix:
598599
name: "Build test matrix for minimal and local"
@@ -714,6 +715,27 @@ jobs:
714715
--reset_only_failed --add_missing_images \
715716
--cov-report=xml:${{ matrix.mapdl-version }}-local.xml
716717
718+
- name: "Collect logs on failure"
719+
if: always()
720+
env:
721+
LOG_NAMES: logs-local-${{ matrix.mapdl-version }}
722+
run: |
723+
.ci/collect_mapdl_logs_locals.sh
724+
725+
- name: "Upload logs to GitHub"
726+
if: always()
727+
uses: actions/upload-artifact@master
728+
with:
729+
name: logs-local-${{ matrix.mapdl-version }}.tgz
730+
path: ./logs-local-${{ matrix.mapdl-version }}.tgz
731+
732+
- name: "Display files structure"
733+
if: always()
734+
env:
735+
LOG_NAMES: logs-local-${{ matrix.mapdl-version }}
736+
run: |
737+
.ci/display_logs_locals.sh
738+
717739
- name: "Adding the directory as safe directory for later step"
718740
run: |
719741
git config --global --add safe.directory $GITHUB_WORKSPACE
@@ -822,7 +844,7 @@ jobs:
822844
823845
- name: "Unit testing requirements installation"
824846
run: |
825-
python -m pip install pytest pytest-rerunfailures pytest-cov pytest-random-order pyfakefs pytest-timeout
847+
python -m pip install -r .ci/requirements_minimal.txt
826848
827849
- name: "Unit testing"
828850
env:
@@ -851,6 +873,27 @@ jobs:
851873
${{ env.PYTEST_ARGUMENTS }} \
852874
--cov-report=xml:${{ matrix.mapdl-version }}-minimal.xml
853875
876+
- name: "Collect logs on failure"
877+
if: always()
878+
env:
879+
LOG_NAMES: logs-minimal-${{ matrix.mapdl-version }}
880+
run: |
881+
.ci/collect_mapdl_logs_locals.sh
882+
883+
- name: "Upload logs to GitHub"
884+
if: always()
885+
uses: actions/upload-artifact@master
886+
with:
887+
name: logs-minimal-${{ matrix.mapdl-version }}.tgz
888+
path: ./logs-minimal-${{ matrix.mapdl-version }}.tgz
889+
890+
- name: "Display files structure"
891+
if: always()
892+
env:
893+
LOG_NAMES: logs-minimal-${{ matrix.mapdl-version }}
894+
run: |
895+
.ci/display_logs_locals.sh
896+
854897
- uses: codecov/codecov-action@v5
855898
name: "Upload coverage to Codecov"
856899
with:
@@ -930,7 +973,7 @@ jobs:
930973
931974
- name: "Unit testing requirements installation"
932975
run: |
933-
python -m pip install pytest pytest-rerunfailures pytest-cov pytest-random-order pyfakefs pytest-timeout
976+
python -m pip install -r .ci/requirements_minimal.txt
934977
935978
- name: "Unit testing"
936979
env:
@@ -959,6 +1002,27 @@ jobs:
9591002
${{ env.PYTEST_ARGUMENTS }} \
9601003
--cov-report=xml:${{ matrix.mapdl-version }}-minimal-console.xml
9611004
1005+
- name: "Collect logs on failure"
1006+
if: always()
1007+
env:
1008+
LOG_NAMES: logs-minimal-console-${{ matrix.mapdl-version }}
1009+
run: |
1010+
.ci/collect_mapdl_logs_locals.sh
1011+
1012+
- name: "Upload logs to GitHub"
1013+
if: always()
1014+
uses: actions/upload-artifact@master
1015+
with:
1016+
name: logs-minimal-console-${{ matrix.mapdl-version }}.tgz
1017+
path: ./logs-minimal-console-${{ matrix.mapdl-version }}.tgz
1018+
1019+
- name: "Display files structure"
1020+
if: always()
1021+
env:
1022+
LOG_NAMES: logs-minimal-console-${{ matrix.mapdl-version }}
1023+
run: |
1024+
.ci/display_logs_locals.sh
1025+
9621026
- uses: codecov/codecov-action@v5
9631027
name: "Upload coverage to Codecov"
9641028
with:

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) 2016 - 2024 ANSYS, Inc. and/or its affiliates.
3+
Copyright (c) 2016 - 2025 ANSYS, Inc. and/or its affiliates.
44

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

doc/changelog.d/3569.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
refactor: annotate pymapdl part 1

doc/changelog.d/3594.maintenance.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
feat: activate debug mode on testing using `PYMAPDL_DEBUG_TESTING` envvar

0 commit comments

Comments
 (0)