Skip to content

Commit

Permalink
Merge branch 'main' into release/0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
dipinknair committed Jan 8, 2025
2 parents aad456e + 9ab4288 commit 4703c55
Show file tree
Hide file tree
Showing 89 changed files with 236 additions and 164 deletions.
54 changes: 28 additions & 26 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ on:
revn:
type: choice
options:
- '252'
- '251'
- '242'
- '241'
- '232'
description: 'The Mechanical revision number to run tests on.'
default: '242' #stable version is 242, must match $stable_container
schedule:
Expand All @@ -33,10 +35,10 @@ env:
DOCKER_MECH_CONTAINER_NAME: mechanical
PACKAGE_NAME: ansys-mechanical-core
DOCUMENTATION_CNAME: mechanical.docs.pyansys.com
MAIN_PYTHON_VERSION: '3.10'
MAIN_PYTHON_VERSION: '3.13'
# DEV_REVN & its Docker image are used in scheduled or registry package runs
DEV_REVN: '251'
DEV_DOCKER_IMAGE_VERSION: '25.1_candidate'
STABLE_REVN: '242'
DEV_REVN: '252'
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }}

Expand Down Expand Up @@ -106,7 +108,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']
should-release:
- ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }}
exclude:
Expand All @@ -124,39 +126,41 @@ jobs:
name: Save variations of revn
runs-on: ubuntu-latest
outputs:
# ghcr.io/ansys/mechanical:24.2.0
stable_container: ${{ steps.save-versions.outputs.stable_container }}
# '242' or '251'
test_revn: '${{ steps.save-versions.outputs.test_revn }}'
# ghcr.io/ansys/mechanical:24.2.0 or ghcr.io/ansys/mechanical:25.1.0
test_container: ${{ steps.save-versions.outputs.test_container }}
# '24.2.0' or '25.1.0'
test_docker_image_version: '${{ steps.save-versions.outputs.test_docker_image_version }}'
steps:
- id: save-versions
run: |
if ${{ github.event_name == 'schedule' }}; then
# 251
echo "test_revn=${{ env.DEV_REVN}}" >> $GITHUB_OUTPUT
# ghcr.io/ansys/mechanical:24.2_candidate
echo "test_container=${{ env.DOCKER_PACKAGE }}:${{ env.DEV_DOCKER_IMAGE_VERSION }}" >> $GITHUB_OUTPUT
# 25.1_candidate
echo "test_docker_image_version=${{ env.DEV_DOCKER_IMAGE_VERSION }}" >> $GITHUB_OUTPUT
test_mech_revn=${{ env.DEV_REVN}}
test_mech_image_version=${test_mech_revn:0:2}.${test_mech_revn:2}_candidate
echo "test_container=${{ env.DOCKER_PACKAGE }}:$test_mech_image_version" >> $GITHUB_OUTPUT
echo "test_docker_image_version=$test_mech_image_version" >> $GITHUB_OUTPUT
else
if [[ -z "${{inputs.revn}}" ]]; then
export mech_revn=242
mech_revn=${{ env.STABLE_REVN }}
else
export mech_revn=${{inputs.revn}}
mech_revn=${{inputs.revn}}
fi
export mech_image_version=${mech_revn:0:2}.${mech_revn:2}.0
echo "test_revn=$mech_revn" >> $GITHUB_OUTPUT
# ghcr.io/ansys/mechanical:24.2.0
echo "test_container=${{ env.DOCKER_PACKAGE }}:$mech_image_version" >> $GITHUB_OUTPUT
# 24.2.0
echo "test_docker_image_version=$mech_image_version" >> $GITHUB_OUTPUT
fi
echo "stable_container=${{ env.DOCKER_PACKAGE }}:24.2.0" >> $GITHUB_OUTPUT
stable_mech_revn=${{ env.STABLE_REVN }}
stable_mech_image_version=${mech_revn:0:2}.${mech_revn:2}.0
echo "stable_container=${{ env.DOCKER_PACKAGE }}:$stable_mech_image_version" >> $GITHUB_OUTPUT
echo $GITHUB_OUTPUT
# --- Help ----
# schedule nightly uses DEV_REVN candidate
# PRs and merges use STABLE_REVN
# Workflow dispatch can use any revision number
config-matrix:
runs-on: ubuntu-latest
Expand All @@ -166,9 +170,7 @@ jobs:
steps:
- id: set-matrix
run: |
# Run all stable mechanical versions release tags
# For nightly scheduled runs use pre-release (25.1_candidate)
# For pull requests and merges use latest stable version (242)
# if a tag(release) is pushed, test all versions
if ${{ github.event_name == 'push' }} && ${{ contains(github.ref, 'refs/tags') }}; then
echo "matrix={\"mechanical-version\":['23.2.0', '24.1.0', '24.2.0'],\"experimental\":[false]}" >> $GITHUB_OUTPUT
else
Expand All @@ -184,8 +186,8 @@ jobs:
run: |
sudo apt update
sudo apt install bc -y
CONTAINER_VERSION=$(echo "${{ needs.revn-variations.outputs.test_docker_image_version }}" | grep -o -E '[0-9]+(\.[0-9]+)?' | head -n 1)
if (( $(echo "$CONTAINER_VERSION > 24.2" | bc -l) )); then
container_version=$(echo "${{ needs.revn-variations.outputs.test_docker_image_version }}" | grep -o -E '[0-9]+(\.[0-9]+)?' | head -n 1)
if (( $(echo "$container_version > 24.2" | bc -l) )); then
echo "container_stable_exit=true" >> $GITHUB_OUTPUT
else
echo "container_stable_exit=false" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -292,7 +294,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -365,7 +367,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -435,7 +437,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v4
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) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
Copyright (c) 2022 - 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
1 change: 1 addition & 0 deletions doc/changelog.d/1007.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Option to ignore lock file on open
1 change: 1 addition & 0 deletions doc/changelog.d/1008.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bump the doc group with 3 updates
1 change: 1 addition & 0 deletions doc/changelog.d/1009.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bump psutil from 6.1.0 to 6.1.1
1 change: 1 addition & 0 deletions doc/changelog.d/1011.miscellaneous.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove f-string without placeholders and specify exception type.
1 change: 1 addition & 0 deletions doc/changelog.d/1014.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update license headers for 2025
1 change: 1 addition & 0 deletions doc/changelog.d/1015.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bump ``ansys-mechanical-stubs`` to 0.1.5 and add typehint to DataModel
1 change: 1 addition & 0 deletions doc/changelog.d/1016.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Follow pythonic standard for comparison to None.
1 change: 1 addition & 0 deletions doc/changelog.d/1020.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bump grpcio from 1.68.1 to 1.69.0 in the core group
1 change: 1 addition & 0 deletions doc/changelog.d/1021.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bump sphinx-autodoc-typehints from 2.5.0 to 3.0.0
1 change: 1 addition & 0 deletions doc/changelog.d/1022.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add project directory property
1 change: 1 addition & 0 deletions doc/changelog.d/1023.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update ngihtly for pre-release version
1 change: 1 addition & 0 deletions doc/changelog.d/1026.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Process return code
1 change: 1 addition & 0 deletions doc/changelog.d/1029.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Process return code
1 change: 1 addition & 0 deletions doc/changelog.d/1030.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Background App initialization
1 change: 1 addition & 0 deletions doc/changelog.d/997.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Support python 3.13
4 changes: 2 additions & 2 deletions doc/source/getting_started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Install the package
-------------------

The latest ``ansys.mechanical.core`` package supports Python 3.10 through
Python 3.12 on Windows, Linux, and Mac.
Python 3.13 on Windows, Linux, and Mac.

You should consider installing PyMechanical in a virtual environment.
For more information, see Python's
Expand All @@ -35,7 +35,7 @@ machine architecture from the `Releases page <https://github.com/ansys/pymechani
of the PyMechanical repository.

Each wheelhouse archive contains all the Python wheels necessary to install
PyMechanical from scratch on Windows and Linux for Python 3.10 through Python 3.12. You can install
PyMechanical from scratch on Windows and Linux for Python 3.10 through Python 3.13. You can install
a wheelhouse archive on an isolated system with a fresh Python installation or on a
virtual environment.

Expand Down
2 changes: 1 addition & 1 deletion examples/embedding_n_remote/embedding_remote.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
19 changes: 11 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"ansys-api-mechanical==0.1.2",
"ansys-mechanical-env==0.1.8",
"ansys-mechanical-stubs==0.1.4",
"ansys-mechanical-stubs==0.1.5",
"ansys-platform-instancemanagement>=1.0.1",
"ansys-pythonnet>=3.1.0rc2",
"ansys-tools-path>=0.3.1",
Expand All @@ -36,7 +37,7 @@ dependencies = [
"clr-loader==0.2.7.post0",
"grpcio>=1.30.0",
"protobuf>=3.12.2,<6",
"psutil==6.1.0",
"psutil==6.1.1",
"tqdm>=4.45.0",
"requests>=2,<3",
]
Expand All @@ -53,28 +54,28 @@ tests = [
"pytest==8.3.4",
"pytest-cov==6.0.0",
"pytest-print==1.0.2",
"psutil==6.1.0"
"psutil==6.1.1"
]
doc = [
"sphinx==8.1.3",
"ansys-sphinx-theme[autoapi]==1.2.3",
"grpcio==1.68.1",
"ansys-sphinx-theme[autoapi]==1.2.4",
"grpcio==1.69.0",
"imageio-ffmpeg==0.5.1",
"imageio==2.36.1",
"jupyter_sphinx==0.5.3",
"jupyterlab>=3.2.8",
"matplotlib==3.10.0",
"numpy==2.2.0",
"numpy==2.2.1",
"numpydoc==1.8.0",
"pandas==2.2.3",
"panel==1.5.4",
"panel==1.5.5",
"plotly==5.24.1",
"pypandoc==1.14",
"pytest-sphinx==0.6.3",
"pythreejs==2.4.2",
"pyvista>=0.39.1",
"sphinx-autobuild==2024.10.3",
"sphinx-autodoc-typehints==2.5.0",
"sphinx-autodoc-typehints==3.0.0",
"sphinx-copybutton==0.5.2",
"sphinx_design==0.6.1",
"sphinx-gallery==0.18.0",
Expand Down Expand Up @@ -226,13 +227,15 @@ python =
3.10: style,py310-coverage,doc
3.11: style,py311-coverage,doc
3.12: style,py311-coverage,doc
3.13: style,py311-coverage,doc
[testenv]
description = Checks for project unit tests and coverage (if desired)
basepython =
py310: python3.10
py311: python3.11
py312: python3.12
py313: python3.13
py: python3
{style,reformat,doc,build}: python3
passenv = *
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/mechanical/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/mechanical/core/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/mechanical/core/embedding/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/mechanical/core/embedding/addins.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
Expand Down
Loading

0 comments on commit 4703c55

Please sign in to comment.