Skip to content

Commit

Permalink
Merge branch 'fix/timeout-for-file-checking' of https://github.com/an…
Browse files Browse the repository at this point in the history
…sys/pymapdl into fix/timeout-for-file-checking
  • Loading branch information
germa89 committed Jan 8, 2025
2 parents b85cacb + 0030a08 commit 7ce46b2
Show file tree
Hide file tree
Showing 301 changed files with 1,294 additions and 911 deletions.
3 changes: 3 additions & 0 deletions .ci/build_matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ versions=(
# if added more "latest", change "$LATEST"
'latest-ubuntu'
'latest-ubuntu-student'
'v25.2.0'
'v25.1.0'
'v25.1-ubuntu'
'v25.1-ubuntu-student'
'v24.2.0'
'v24.2-ubuntu'
'v24.2-ubuntu-student'
Expand Down
12 changes: 12 additions & 0 deletions .ci/collect_mapdl_logs_locals.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

mkdir "$LOG_NAMES" && echo "Successfully generated directory $LOG_NAMES"

cp *.log ./"$LOG_NAMES"/ || echo "No log files could be found"
cp *apdl.out ./"$LOG_NAMES"/ || echo "No APDL log files could be found"
cp *pymapdl.apdl ./"$LOG_NAMES"/ || echo "No PYMAPDL APDL log files could be found"


ls -la ./"$LOG_NAMES"

echo "Tar files..."
tar cvzf ./"$LOG_NAMES".tgz ./"$LOG_NAMES" || echo "Failed to compress"
File renamed without changes.
19 changes: 19 additions & 0 deletions .ci/display_logs_locals.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

#####
# Displaying files
FILE_PAT=./"$LOG_NAMES"/pymapdl.log
FILE_DESCRIPTION="PyMAPDL log"

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_PAT=./"$LOG_NAMES"/pymapdl.apdl
FILE_DESCRIPTION="PyMAPDL APDL log"

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_PAT=./"$LOG_NAMES"/apdl.out
FILE_DESCRIPTION="MAPDL Output"

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.
6 changes: 6 additions & 0 deletions .ci/requirements_minimal.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pyfakefs==5.7.2
pytest-cov==6.0.0
pytest-random-order==1.1.1
pytest-rerunfailures==15.0
pytest-timeout==2.3.1
pytest==8.3.4
83 changes: 74 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ env:
PACKAGE_NAME: 'ansys-mapdl-core'
PACKAGE_NAMESPACE: 'ansys.mapdl.core'
DOCUMENTATION_CNAME: 'mapdl.docs.pyansys.com'
LATEST_VERSION: "242"
LATEST_VERSION: "252"
MAPDL_IMAGE_VERSION_DOCS_BUILD: v24.2-ubuntu-student
MEILISEARCH_API_KEY: ${{ secrets.MEILISEARCH_API_KEY }}
MEILISEARCH_PUBLIC_API_KEY: ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }}
Expand All @@ -33,9 +33,11 @@ env:
DPF_PORT: 21004
MAPDL_PACKAGE: ghcr.io/ansys/mapdl
ON_CI: True
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'
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'


BUILD_CHEATSHEET: True
PYMAPDL_DEBUG_TESTING: True

# Following env vars when changed will "reset" the mentioned cache,
# by changing the cache file name. It is rendered as ...-v%RESET_XXX%-...
Expand All @@ -62,7 +64,6 @@ permissions:

jobs:


update-changelog:
name: "Update CHANGELOG (on release)"
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
Expand Down Expand Up @@ -128,6 +129,7 @@ jobs:
library-name: ${{ env.PACKAGE_NAME }}
operating-system: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
whitelist-license-check: "attrs" # This has MIT license but fails the check

- name: "Importing library"
run: |
Expand Down Expand Up @@ -336,7 +338,7 @@ jobs:
MAPDL_INSTANCE: MAPDL_0
LOG_NAMES: logs-build-docs
run: |
.ci/collect_mapdl_logs.sh
.ci/collect_mapdl_logs_remote.sh
- name: "Upload logs to GitHub"
if: always()
Expand All @@ -351,7 +353,7 @@ jobs:
MAPDL_INSTANCE: MAPDL_0
LOG_NAMES: logs-build-docs
run: |
.ci/display_logs.sh
.ci/display_logs_remote.sh
build-test-remote-matrix:
name: "Build remote test matrix"
Expand Down Expand Up @@ -576,7 +578,7 @@ jobs:
MAPDL_INSTANCE: MAPDL_0
LOG_NAMES: logs-remote-${{ matrix.mapdl-version }}
run: |
.ci/collect_mapdl_logs.sh
.ci/collect_mapdl_logs_remote.sh
- name: "Upload logs to GitHub"
if: always()
Expand All @@ -591,7 +593,7 @@ jobs:
MAPDL_INSTANCE: MAPDL_0
LOG_NAMES: logs-remote-${{ matrix.mapdl-version }}
run: |
.ci/display_logs.sh
.ci/display_logs_remote.sh
build-test-local-minimal-matrix:
name: "Build test matrix for minimal and local"
Expand Down Expand Up @@ -713,6 +715,27 @@ jobs:
--reset_only_failed --add_missing_images \
--cov-report=xml:${{ matrix.mapdl-version }}-local.xml
- name: "Collect logs on failure"
if: always()
env:
LOG_NAMES: logs-local-${{ matrix.mapdl-version }}
run: |
.ci/collect_mapdl_logs_locals.sh
- name: "Upload logs to GitHub"
if: always()
uses: actions/upload-artifact@master
with:
name: logs-local-${{ matrix.mapdl-version }}.tgz
path: ./logs-local-${{ matrix.mapdl-version }}.tgz

- name: "Display files structure"
if: always()
env:
LOG_NAMES: logs-local-${{ matrix.mapdl-version }}
run: |
.ci/display_logs_locals.sh
- name: "Adding the directory as safe directory for later step"
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
Expand Down Expand Up @@ -821,7 +844,7 @@ jobs:
- name: "Unit testing requirements installation"
run: |
python -m pip install pytest pytest-rerunfailures pytest-cov pytest-random-order pyfakefs pytest-timeout
python -m pip install -r .ci/requirements_minimal.txt
- name: "Unit testing"
env:
Expand Down Expand Up @@ -850,6 +873,27 @@ jobs:
${{ env.PYTEST_ARGUMENTS }} \
--cov-report=xml:${{ matrix.mapdl-version }}-minimal.xml
- name: "Collect logs on failure"
if: always()
env:
LOG_NAMES: logs-minimal-${{ matrix.mapdl-version }}
run: |
.ci/collect_mapdl_logs_locals.sh
- name: "Upload logs to GitHub"
if: always()
uses: actions/upload-artifact@master
with:
name: logs-minimal-${{ matrix.mapdl-version }}.tgz
path: ./logs-minimal-${{ matrix.mapdl-version }}.tgz

- name: "Display files structure"
if: always()
env:
LOG_NAMES: logs-minimal-${{ matrix.mapdl-version }}
run: |
.ci/display_logs_locals.sh
- uses: codecov/codecov-action@v5
name: "Upload coverage to Codecov"
with:
Expand Down Expand Up @@ -929,7 +973,7 @@ jobs:
- name: "Unit testing requirements installation"
run: |
python -m pip install pytest pytest-rerunfailures pytest-cov pytest-random-order pyfakefs pytest-timeout
python -m pip install -r .ci/requirements_minimal.txt
- name: "Unit testing"
env:
Expand Down Expand Up @@ -958,6 +1002,27 @@ jobs:
${{ env.PYTEST_ARGUMENTS }} \
--cov-report=xml:${{ matrix.mapdl-version }}-minimal-console.xml
- name: "Collect logs on failure"
if: always()
env:
LOG_NAMES: logs-minimal-console-${{ matrix.mapdl-version }}
run: |
.ci/collect_mapdl_logs_locals.sh
- name: "Upload logs to GitHub"
if: always()
uses: actions/upload-artifact@master
with:
name: logs-minimal-console-${{ matrix.mapdl-version }}.tgz
path: ./logs-minimal-console-${{ matrix.mapdl-version }}.tgz

- name: "Display files structure"
if: always()
env:
LOG_NAMES: logs-minimal-console-${{ matrix.mapdl-version }}
run: |
.ci/display_logs_locals.sh
- uses: codecov/codecov-action@v5
name: "Upload coverage to Codecov"
with:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2016 - 2024 ANSYS, Inc. and/or its affiliates.
Copyright (c) 2016 - 2025 ANSYS, Inc. and/or its affiliates.

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
Expand Down
2 changes: 1 addition & 1 deletion doc/changelog.d/3247.fixed.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fix: not deleting temporary file when ``remove_temp_dir_on_exit``=True
fix: not deleting temporary file when ``remove_temp_dir_on_exit`` =True
1 change: 1 addition & 0 deletions doc/changelog.d/3569.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
refactor: annotate pymapdl part 1
1 change: 1 addition & 0 deletions doc/changelog.d/3577.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
refactor: small improvements to test settings
1 change: 1 addition & 0 deletions doc/changelog.d/3594.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
feat: activate debug mode on testing using `PYMAPDL_DEBUG_TESTING` envvar
1 change: 1 addition & 0 deletions doc/changelog.d/3624.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ci: temporary skipping attrs license check
1 change: 1 addition & 0 deletions doc/changelog.d/3626.dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ci: adding ubuntu 251 and 252
1 change: 1 addition & 0 deletions doc/changelog.d/3630.dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build: bump pyfakefs from 5.7.2 to 5.7.3
1 change: 1 addition & 0 deletions doc/changelog.d/3631.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
refactor: Iterate over the dictionary directly instead of using .keys().
1 change: 1 addition & 0 deletions doc/changelog.d/3632.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build: bump the minimal group across 1 directory with 2 updates
1 change: 1 addition & 0 deletions doc/changelog.d/3633.dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build: bump the core group across 1 directory with 3 updates
1 change: 1 addition & 0 deletions doc/changelog.d/3636.miscellaneous.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
feat: node/element selection commands returning selected ids
1 change: 1 addition & 0 deletions doc/changelog.d/3637.documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
feat: update copyright year
1 change: 1 addition & 0 deletions doc/changelog.d/3638.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ci: fix safety issue
1 change: 1 addition & 0 deletions doc/changelog.d/3640.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix: changelog
1 change: 1 addition & 0 deletions doc/changelog.d/3642.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix: timeout for file checking
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
2 changes: 1 addition & 1 deletion doc/source/examples/extended_examples/executable/rotor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
2 changes: 1 addition & 1 deletion doc/source/examples/extended_examples/gui/gui_app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
2 changes: 1 addition & 1 deletion doc/source/examples/extended_examples/hpc/ml_ga_beam.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
2 changes: 1 addition & 1 deletion examples/00-mapdl-examples/2d_plate_with_a_hole.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
2 changes: 1 addition & 1 deletion examples/00-mapdl-examples/2d_pressure_vessel.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
2 changes: 1 addition & 1 deletion examples/00-mapdl-examples/3d_notch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
2 changes: 1 addition & 1 deletion examples/00-mapdl-examples/3d_plate_thermal.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
2 changes: 1 addition & 1 deletion examples/00-mapdl-examples/acoustic_analysis.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
2 changes: 1 addition & 1 deletion examples/00-mapdl-examples/basic_dpf_example.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
2 changes: 1 addition & 1 deletion examples/00-mapdl-examples/bracket_static.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
2 changes: 1 addition & 1 deletion examples/00-mapdl-examples/contact_elements.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
2 changes: 1 addition & 1 deletion examples/00-mapdl-examples/cyclic_analysis.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
2 changes: 1 addition & 1 deletion examples/00-mapdl-examples/cyclic_static.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2016 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
Loading

0 comments on commit 7ce46b2

Please sign in to comment.