diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 33d011e48..76d218acb 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -11,7 +11,7 @@ on: - '242' - '241' description: 'The Mechanical revision number to run tests on.' - default: '241' #stable version is 241, must match $stable_container + default: '242' #stable version is 242, must match $stable_container schedule: - cron: '00 22 * * *' # UTC time, may start 5-15 mins later than scheduled time # registry_package: @@ -106,13 +106,13 @@ jobs: name: Save variations of revn runs-on: ubuntu-latest outputs: - # ghcr.io/ansys/mechanical:24.1.0 + # ghcr.io/ansys/mechanical:24.2.0 stable_container: ${{ steps.save-versions.outputs.stable_container }} - # '241' or '242' + # '242' or '251' test_revn: '${{ steps.save-versions.outputs.test_revn }}' - # ghcr.io/ansys/mechanical:24.1.0 or ghcr.io/ansys/mechanical:24.2.0 + # ghcr.io/ansys/mechanical:24.2.0 or ghcr.io/ansys/mechanical:25.1.0 test_container: ${{ steps.save-versions.outputs.test_container }} - # '24.1.0' or '24.2.0' + # '24.2.0' or '25.1.0' test_docker_image_version: '${{ steps.save-versions.outputs.test_docker_image_version }}' steps: - id: save-versions @@ -126,19 +126,19 @@ jobs: echo "test_docker_image_version=${{ env.DEV_DOCKER_IMAGE_VERSION }}" >> $GITHUB_OUTPUT else if [[ -z "${{inputs.revn}}" ]]; then - export mech_revn=241 + export mech_revn=242 else export 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.1.0 + # ghcr.io/ansys/mechanical:24.2.0 echo "test_container=${{ env.DOCKER_PACKAGE }}:$mech_image_version" >> $GITHUB_OUTPUT - # 24.1.0 + # 24.2.0 echo "test_docker_image_version=$mech_image_version" >> $GITHUB_OUTPUT fi - echo "stable_container=${{ env.DOCKER_PACKAGE }}:24.1.0" >> $GITHUB_OUTPUT + echo "stable_container=${{ env.DOCKER_PACKAGE }}:24.2.0" >> $GITHUB_OUTPUT config-matrix: runs-on: ubuntu-latest @@ -150,9 +150,9 @@ jobs: 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 (241) + # For pull requests and merges use latest stable version (242) if ${{ github.event_name == 'push' }} && ${{ contains(github.ref, 'refs/tags') }}; then - echo "matrix={\"mechanical-version\":['23.1.0', '23.2.0', '24.1.0'],\"experimental\":[false]}" >> $GITHUB_OUTPUT + echo "matrix={\"mechanical-version\":['23.2.0', '24.1.0', '24.2.0'],\"experimental\":[false]}" >> $GITHUB_OUTPUT else echo "matrix={\"mechanical-version\":['${{ needs.revn-variations.outputs.test_docker_image_version }}'],\"experimental\":[false]}" >> $GITHUB_OUTPUT fi diff --git a/README.rst b/README.rst index 13abef4d1..7e43e7b31 100644 --- a/README.rst +++ b/README.rst @@ -70,14 +70,14 @@ Getting started PyMechanical uses the built-in scripting capabilities of Mechanical. For information on the scripting APIs available, see the `Scripting in Mechanical Guide -`_ in the +`_ in the Ansys Help. Configuring the mechanical installation ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ On a Windows system, the environment variable ``AWP_ROOT`` is configured when Mechanical is -installed, where ```` is the Mechanical release number, such as ``231`` for release 2023 R1. +installed, where ```` is the Mechanical release number, such as ``242`` for release 2024 R2. PyMechanical automatically uses this environment variable (or variables if there are multiple installations of different versions) to locate the latest Mechanical installation. On a Linux system, you must configure the ``AWP_ROOT`` environment variable to point to the @@ -112,8 +112,7 @@ Using an embedded instance of Mechanical as a Python object PyMechanical also supports directly embedding an instance of Mechanical as a Python object. In this mode, there is no externally running instance of Mechanical. This feature is supported -on Windows for version 2023 R1 and later, and on Linux for version 2023 R2 -and later. Here is an example: +on Windows and Linux for version 2023 R2 and later. Here is an example: .. code:: python diff --git a/doc/changelog.d/810.changed.md b/doc/changelog.d/810.changed.md new file mode 100644 index 000000000..10d33fda7 --- /dev/null +++ b/doc/changelog.d/810.changed.md @@ -0,0 +1 @@ +MAINT: Update for 24R2 \ No newline at end of file diff --git a/doc/source/getting_started/docker.rst b/doc/source/getting_started/docker.rst index 118bf58ba..cf696fbbd 100644 --- a/doc/source/getting_started/docker.rst +++ b/doc/source/getting_started/docker.rst @@ -53,7 +53,7 @@ Launch Mechanical with this code: .. code:: LICENSE_SERVER=1055@XXX.XXX.XXX.XXX - VERSION=v23.1.0 + VERSION=v24.2.0 IMAGE=ghcr.io/ansys/pymechanical/mechanical:$VERSION docker run -e ANSYSLMD_LICENSE_FILE=$LICENSE_SERVER -p ip:10000:10000 $IMAGE @@ -93,8 +93,8 @@ Verify your connection with this code: >>> mechanical Ansys Mechanical [Ansys Mechanical Enterprise] - Product Version:231 - Software build date:Wednesday, August 10, 2022 4:28:15 PM + Product Version:242 + Software build date: 06/03/2024 14:47:58 Additional considerations ------------------------- diff --git a/doc/source/getting_started/installation.rst b/doc/source/getting_started/installation.rst index 32eb795be..d3c284016 100644 --- a/doc/source/getting_started/installation.rst +++ b/doc/source/getting_started/installation.rst @@ -69,10 +69,10 @@ This package is required to use PyMechanical. or - >>> find_mechanical(version=231) # for specific version + >>> find_mechanical(version=242) # for specific version - ('C:/Program Files/ANSYS Inc/v231/aisol/bin/winx64/AnsysWBU.exe', 23.1) # windows - ('/usr/ansys_inc/v231/aisol/.workbench', 23.1) # Linux + ('C:/Program Files/ANSYS Inc/v242/aisol/bin/winx64/AnsysWBU.exe', 24.2) # windows + ('/usr/ansys_inc/v242/aisol/.workbench', 24.2) # Linux If you install Ansys in a directory other than the default or typical location, you can save this directory path using the @@ -84,15 +84,15 @@ and ``version_from_path`` functions to verify the path and version. .. code:: pycon >>> from ansys.tools.path import save_mechanical_path, find_mechanical - >>> save_mechanical_path("home/username/ansys_inc/v231/aisol/.workbench") + >>> save_mechanical_path("home/username/ansys_inc/v242/aisol/.workbench") >>> path = get_mechanical_path() >>> print(path) - /home/username/ansys_inc/v231/aisol/.workbench + /home/username/ansys_inc/v242/aisol/.workbench >>> version = version_from_path("mechanical", path) - 231 + 242 Verify a remote session ^^^^^^^^^^^^^^^^^^^^^^^ @@ -106,8 +106,8 @@ Verify your installation by starting a remote session of Mechanical from Python: >>> mechanical Ansys Mechanical [Ansys Mechanical Enterprise] - Product Version:231 - Software build date:Wednesday, August 10, 2022 4:28:15 PM + Product Version:242 + Software build date: 06/03/2024 14:47:58 If you see a response from the server, you can begin using Mechanical as a service. @@ -137,8 +137,8 @@ Inside of Python, use the following commands to load an embedded instance: >>> app = App() >>> print(app) Ansys Mechanical [Ansys Mechanical Enterprise] - Product Version:232 - Software build date: 05/30/2023 15:25:53 + Product Version:242 + Software build date: 06/03/2024 14:47:58 .. LINKS AND REFERENCES .. _ansys_tools_path_api: https://github.com/psf/black diff --git a/doc/source/getting_started/running_mechanical.rst b/doc/source/getting_started/running_mechanical.rst index 63289dc06..79415e0d7 100644 --- a/doc/source/getting_started/running_mechanical.rst +++ b/doc/source/getting_started/running_mechanical.rst @@ -45,8 +45,8 @@ Launch Mechanical locally with this code: >>> mechanical Ansys Mechanical [Ansys Mechanical Enterprise] - Product Version:231 - Software build date:Wednesday, August 10, 2022 4:28:15 PM + Product Version:242 + Software build date: 06/03/2024 14:47:58 Launch Mechanical from the command line ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -67,7 +67,7 @@ usage, type the following command: The following example demonstrates the main use of this tool: - $ ansys-mechanical -r 241 -g + $ ansys-mechanical -r 242 -g Starting Ansys Mechanical version 2024R1 in graphical mode... @@ -96,7 +96,7 @@ usage, type the following command: application when in graphical mode. --debug Show a debug dialog window at the start of the process. - -r, --revision INTEGER Ansys Revision number, e.g. "241" or "232". If + -r, --revision INTEGER Ansys Revision number, e.g. "242" or "241". If none is specified, uses the default from ansys- tools-path -g, --graphical Graphical mode @@ -168,7 +168,7 @@ for the `launch_mechanical()`_ method. from ansys.mechanical.core import launch_mechanical - exec_loc = "C:/Program Files/ANSYS Inc/v231/aisol/bin/winx64/AnsysWBU.exe" + exec_loc = "C:/Program Files/ANSYS Inc/v242/aisol/bin/winx64/AnsysWBU.exe" mechanical = launch_mechanical(exec_loc) **On Linux** @@ -177,7 +177,7 @@ for the `launch_mechanical()`_ method. from ansys.mechanical.core import launch_mechanical - exec_loc = "/usr/ansys_inc/v231/aisol/.workbench" + exec_loc = "/usr/ansys_inc/v242/aisol/.workbench" mechanical = launch_mechanical(exec_loc) If, when using the `launch_mechanical()`_ @@ -224,8 +224,8 @@ Python code >>> mechanical = App() >>> mechanical Ansys Mechanical [Ansys Mechanical Enterprise] - Product Version:231 - Software build date:Wednesday, August 10, 2022 4:28:15 PM + Product Version:242 + Software build date: 06/03/2024 14:47:58 Additional information for Linux ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/source/links.rst b/doc/source/links.rst index 6411ac112..ec1b0f4b2 100644 --- a/doc/source/links.rst +++ b/doc/source/links.rst @@ -19,6 +19,6 @@ .. _Chapter 7: https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/%%VERSION%%/en/installation/win_silent.html .. # Mechanical related -.. _ACT API Reference Guide: https://developer.ansys.com/docs/mechanical-scripting-interface/api/ansys/mechanical/stubs/%%VERSION%%/index.md +.. _ACT API Reference Guide: https://developer.ansys.com/docs/mechanical-scripting-interface/api/ansys/mechanical/stubs/v241/index.md #TODO this should be update to 241 when 24r2 api ref gets released .. _Mechanical API known issues and limitations: https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/%%VERSION%%/en/act_script/mech_apis_KIL.html?q=known%20issues .. _ACT known issues and limitations: https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/%%VERSION%%/en/act_dev/act_dev_knownissues.html \ No newline at end of file diff --git a/doc/source/user_guide_embedding/index.rst b/doc/source/user_guide_embedding/index.rst index 712e5bb11..7733d11d2 100644 --- a/doc/source/user_guide_embedding/index.rst +++ b/doc/source/user_guide_embedding/index.rst @@ -105,7 +105,7 @@ versions can be specified using ``-r`` flag. Use ``-h`` for more information. .. code:: - "C:/Program Files/ANSYS Inc/v241/aisol/bin/winx64/AnsysWBU.exe -DSApplet -AppModeMech -script file.py" + "C:/Program Files/ANSYS Inc/v242/aisol/bin/winx64/AnsysWBU.exe -DSApplet -AppModeMech -script file.py" PowerShell users can run the preceding command without including the opening and closing quotation marks. diff --git a/doc/source/user_guide_embedding/libraries.rst b/doc/source/user_guide_embedding/libraries.rst index 3f1305e2c..592216e7c 100644 --- a/doc/source/user_guide_embedding/libraries.rst +++ b/doc/source/user_guide_embedding/libraries.rst @@ -26,10 +26,10 @@ To use the above function, run the following: from ansys.mechanical.core import App from ansys.mechanical.core.embedding import add_mechanical_python_libraries - app = App(version=241) + app = App(version=242) add_mechanical_python_libraries(app) - import materials # This is materials.py that's shipped with Mechanical v241 + import materials # This is materials.py that's shipped with Mechanical v242 .. warning:: diff --git a/doc/source/user_guide_session/pool.rst b/doc/source/user_guide_session/pool.rst index ded6e0f36..1172ce8fe 100644 --- a/doc/source/user_guide_session/pool.rst +++ b/doc/source/user_guide_session/pool.rst @@ -12,7 +12,7 @@ This code shows how to create a pool with 10 instances: .. code:: pycon >>> from ansys.mechanical.core import LocalMechanicalPool - >>> pool = LocalMechanicalPool(10, version="231") + >>> pool = LocalMechanicalPool(10, version="242") 'Mechanical Pool with 10 active instances' When you are creating a pool, you can supply additional keyword arguments. @@ -22,7 +22,7 @@ For example, to restart failed instances, you can set ``restart_failed=True``: >>> import os >>> my_path = os.getcmd() - >>> pool = LocalMechanicalPool(10, version="231", restart_failed=True) + >>> pool = LocalMechanicalPool(10, version="242", restart_failed=True) Creating Pool: 100%|########| 10/10 [00:01<00:00, 1.43it/s] You can access each individual instance of Mechanical with this code: diff --git a/doc/source/user_guide_session/server-launcher.rst b/doc/source/user_guide_session/server-launcher.rst index 239ffee3c..24a815762 100644 --- a/doc/source/user_guide_session/server-launcher.rst +++ b/doc/source/user_guide_session/server-launcher.rst @@ -24,13 +24,13 @@ Mechanical executable file. .. code:: - Enter location of Mechanical executable: /usr/ansys_inc/v231/aisol/.workbench + Enter location of Mechanical executable: /usr/ansys_inc/v242/aisol/.workbench **On Windows** .. code:: - Enter location of Mechanical executable: C:/Program Files/ANSYS Inc/v231/aisol/bin/winx64/AnsysWBU.exe + Enter location of Mechanical executable: C:/Program Files/ANSYS Inc/v242/aisol/bin/winx64/AnsysWBU.exe The settings file for Mechanical is stored locally. You do not need to enter the path again. If you must change the path, perhaps to change the default @@ -40,7 +40,7 @@ version of Mechanical, run the following: from ansys.mechanical import core as pymechanical - new_path = "C:/Program Files/ANSYS Inc/v231/aisol/bin/winx64/AnsysWBU.exe" + new_path = "C:/Program Files/ANSYS Inc/v242/aisol/bin/winx64/AnsysWBU.exe" pymechanical.change_default_mechanical_path(new_path) For more information, see the `change_default_mechanical_path() <../api/_autosummary/ansys.tools.path.change_default_mechanical_path.html#ansys.tools.path.change_default_mechanical_path>`_ @@ -55,7 +55,7 @@ Mechanical executable file. from ansys.mechanical.core import launch_mechanical - mechanical = launch_mechanical(exec_file="/usr/ansys_inc/v231/aisol/.workbench") + mechanical = launch_mechanical(exec_file="/usr/ansys_inc/v242/aisol/.workbench") **On Windows** @@ -64,7 +64,7 @@ Mechanical executable file. from ansys.mechanical.core import launch_mechanical mechanical = launch_mechanical( - exec_file="C:\\Program File\\ANSYS Inc\\v231\\aisol\\bin\\winx64\\AnsysWBU.exe" + exec_file="C:\\Program File\\ANSYS Inc\\v242\\aisol\\bin\\winx64\\AnsysWBU.exe" ) You can use the ``additional_switches`` keyword argument to specify additional arguments. @@ -73,7 +73,7 @@ You can use the ``additional_switches`` keyword argument to specify additional a from ansys.mechanical.core import launch_mechanical - custom_exec = "/usr/ansys_inc/v231/aisol/.workbench" + custom_exec = "/usr/ansys_inc/v242/aisol/.workbench" add_switch = f"-featureflags mechanical.material.import;" mechanical = launch_mechanical(additional_switches=add_switch) diff --git a/docker/make_container.rst b/docker/make_container.rst index 8d978103b..0bb6a2dcc 100644 --- a/docker/make_container.rst +++ b/docker/make_container.rst @@ -24,8 +24,8 @@ Requirements * These files are provided: - * `Dockerfile `_ - * `.dockerignore `_ + * `Dockerfile `_ + * `.dockerignore `_ Procedure @@ -91,7 +91,7 @@ which you should modify to adapt it to your needs. export ANS_VERSION=${ANS_MAJOR_VERSION}${ANS_MINOR_VERSION} export TAG=mechanical:${ANS_MAJOR_VERSION}.${ANS_MINOR_VERSION} - # example: if Mechanical v231 is installed under /install/ansys_inc/v231 + # example: if Mechanical v242 is installed under /install/ansys_inc/v242 # use /install for path_to_mechanical_installation export MECHANICAL_INSTALL_LOCATION=/path_to_mechanical_installation/ @@ -116,10 +116,10 @@ Take note of the these paths: * ``path_to_mechanical_installation`` is the path to where you have locally installed Mechanical. Not all installation files are copied. In fact, the files ignored during the copying -are described in the `.dockerignore file `_. +are described in the `.dockerignore file `_. The Docker container configuration needed to build the container is described in the -`Dockerfile `_. +`Dockerfile `_. Summary diff --git a/src/ansys/mechanical/core/_version.py b/src/ansys/mechanical/core/_version.py index 93dd8fc9b..f623dfcbb 100644 --- a/src/ansys/mechanical/core/_version.py +++ b/src/ansys/mechanical/core/_version.py @@ -40,8 +40,8 @@ __version__ = importlib_metadata.version("ansys-mechanical-core") SUPPORTED_MECHANICAL_VERSIONS = { + 242: "2024R2", 241: "2024R1", 232: "2023R2", - 231: "2023R1", } """Supported mechanical versions in descending order.""" diff --git a/src/ansys/mechanical/core/embedding/initializer.py b/src/ansys/mechanical/core/embedding/initializer.py index b46d78e2e..48d68996e 100644 --- a/src/ansys/mechanical/core/embedding/initializer.py +++ b/src/ansys/mechanical/core/embedding/initializer.py @@ -36,7 +36,7 @@ INITIALIZED_VERSION = None """Constant for the initialized version.""" -SUPPORTED_MECHANICAL_EMBEDDING_VERSIONS_WINDOWS = {241: "2024R1", 232: "2023R2", 231: "2023R1"} +SUPPORTED_MECHANICAL_EMBEDDING_VERSIONS_WINDOWS = {242: "2024R2", 241: "2024R1", 232: "2023R2"} """Supported Mechanical embedding versions on Windows.""" @@ -70,7 +70,7 @@ def _get_default_linux_version() -> int: does not provide a version, the ``find_mechanical()`` function from the ``ansys-tools-path`` package is used to find a version of Mechanical. """ - supported_versions = [232, 241] + supported_versions = [232, 241, 242] awp_roots = {ver: os.environ.get(f"AWP_ROOT{ver}", "") for ver in supported_versions} installed_versions = { ver: path for ver, path in awp_roots.items() if path and os.path.isdir(path) diff --git a/src/ansys/mechanical/core/embedding/logger/__init__.py b/src/ansys/mechanical/core/embedding/logger/__init__.py index 7d17291da..bf8133d48 100644 --- a/src/ansys/mechanical/core/embedding/logger/__init__.py +++ b/src/ansys/mechanical/core/embedding/logger/__init__.py @@ -37,7 +37,7 @@ from ansys.mechanical.core.embedding.logger import Configuration, Logger Configuration.configure(level=logging.INFO, to_stdout=True, base_directory=None) - app = mech.App(version=241) + app = mech.App(version=242) Then, the :class:`Logger ` class can be used to write messages to the log: diff --git a/src/ansys/mechanical/core/mechanical.py b/src/ansys/mechanical/core/mechanical.py index 4d9b25d87..40a8917c7 100644 --- a/src/ansys/mechanical/core/mechanical.py +++ b/src/ansys/mechanical/core/mechanical.py @@ -235,7 +235,7 @@ def check_valid_mechanical(): >>> from ansys.mechanical.core import mechanical >>> from ansys.tools.path import change_default_mechanical_path - >>> mechanical_path = 'C:/Program Files/ANSYS Inc/v231/aisol/bin/win64/AnsysWBU.exe' + >>> mechanical_path = 'C:/Program Files/ANSYS Inc/v242/aisol/bin/win64/AnsysWBU.exe' >>> change_default_mechanical_path(mechanical_pth) >>> mechanical.check_valid_mechanical() True @@ -479,7 +479,7 @@ def version(self) -> str: Get the version of the connected Mechanical instance. >>> mechanical.version - '231' + '242' """ if self._version == None: @@ -943,7 +943,7 @@ def run_python_script( Return a string value from Project object. >>> mechanical.run_python_script('ExtAPI.DataModel.Project.ProductVersion') - '2023 R1' + '2024 R2' Return an empty string, when you try to return the Project object. @@ -1908,7 +1908,7 @@ def launch_grpc( Launch Mechanical using a specified executable file. - >>> exec_file_path = 'C:/Program Files/ANSYS Inc/v231/aisol/bin/win64/AnsysWBU.exe' + >>> exec_file_path = 'C:/Program Files/ANSYS Inc/v242/aisol/bin/win64/AnsysWBU.exe' >>> mechanical = launch_mechanical(exec_file_path) """ @@ -1947,8 +1947,8 @@ def launch_remote_mechanical(version=None) -> (grpc.Channel, Instance): # pragm Parameters ---------- version : str, optional - Mechanical version to run in the three-digit format. For example, ``"231"`` to - run 2023 R1. The default is ``None``, in which case the server runs the latest + Mechanical version to run in the three-digit format. For example, ``"242"`` to + run 2024 R2. The default is ``None``, in which case the server runs the latest installed version. Returns @@ -2064,8 +2064,8 @@ def launch_mechanical( When ``False``, Mechanical is not exited when the garbage for this Mechanical instance is collected. version : str, optional - Mechanical version to run in the three-digit format. For example, ``"231"`` - for 2023 R1. The default is ``None``, in which case the server runs the + Mechanical version to run in the three-digit format. For example, ``"242"`` + for 2024 R2. The default is ``None``, in which case the server runs the latest installed version. If PyPIM is configured and ``exce_file=None``, PyPIM launches Mechanical using its ``version`` parameter. keep_connection_alive : bool, optional @@ -2093,7 +2093,7 @@ def launch_mechanical( Launch Mechanical using a specified executable file. - >>> exec_file_path = 'C:/Program Files/ANSYS Inc/v231/aisol/bin/win64/AnsysWBU.exe' + >>> exec_file_path = 'C:/Program Files/ANSYS Inc/v242/aisol/bin/win64/AnsysWBU.exe' >>> mech = launch_mechanical(exec_file_path) Connect to an existing Mechanical instance at IP address ``192.168.1.30`` on port diff --git a/src/ansys/mechanical/core/misc.py b/src/ansys/mechanical/core/misc.py index ccbfe6955..84d45789d 100644 --- a/src/ansys/mechanical/core/misc.py +++ b/src/ansys/mechanical/core/misc.py @@ -47,8 +47,8 @@ def get_mechanical_bin(release_version): Parameters ---------- release_version: str - Mechanical version using the three-digit format. For example, ``"231"`` for - 2023 R1. + Mechanical version using the three-digit format. For example, ``"242"`` for + 2024 R2. """ if is_windows(): # pragma: no cover program_files = os.getenv("PROGRAMFILES", os.path.join("c:\\", "Program Files")) diff --git a/src/ansys/mechanical/core/pool.py b/src/ansys/mechanical/core/pool.py index c0434a9e4..fdaa6c5d0 100644 --- a/src/ansys/mechanical/core/pool.py +++ b/src/ansys/mechanical/core/pool.py @@ -111,19 +111,19 @@ class LocalMechanicalPool: On Windows, create a pool while specifying the Mechanical executable file. - >>> exec_file = 'C:/Program Files/ANSYS Inc/v231/aisol/bin/winx64/AnsysWBU.exe' + >>> exec_file = 'C:/Program Files/ANSYS Inc/v242/aisol/bin/winx64/AnsysWBU.exe' >>> pool = LocalMechanicalPool(10, exec_file=exec_file) Creating Pool: 100%|########| 10/10 [00:01<00:00, 1.43it/s] On Linux, create a pool while specifying the Mechanical executable file. - >>> exec_file = '/ansys_inc/v231/aisol/.workbench' + >>> exec_file = '/ansys_inc/v242/aisol/.workbench' >>> pool = LocalMechanicalPool(10, exec_file=exec_file) Creating Pool: 100%|########| 10/10 [00:01<00:00, 1.43it/s] In the PyPIM environment, create a pool. - >>> pool = LocalMechanicalPool(10, version="231") + >>> pool = LocalMechanicalPool(10, version="242") Creating Pool: 100%|########| 10/10 [00:01<00:00, 1.43it/s] """ @@ -529,8 +529,8 @@ def next_available(self, return_index=False): >>> mechanical = pool.next_available() >>> mechanical Ansys Mechanical [Ansys Mechanical Enterprise] - Product Version:231 - Software build date:Wed Jul 13 14:29:54 2022 + Product Version:242 + Software build date: 06/03/2024 14:47:58 """ # loop until the next instance is available while True: diff --git a/src/ansys/mechanical/core/run.py b/src/ansys/mechanical/core/run.py index 5e8d0055e..bafce0442 100644 --- a/src/ansys/mechanical/core/run.py +++ b/src/ansys/mechanical/core/run.py @@ -268,7 +268,7 @@ def _cli_impl( "--revision", default=None, type=int, - help='Ansys Revision number, e.g. "241" or "232". If none is specified\ + help='Ansys Revision number, e.g. "242" or "241". If none is specified\ , uses the default from ansys-tools-path', ) @click.option( @@ -297,9 +297,9 @@ def cli( The following example demonstrates the main use of this tool: - $ ansys-mechanical -r 241 -g + $ ansys-mechanical -r 242 -g - Starting Ansys Mechanical version 2023R2 in graphical mode... + Starting Ansys Mechanical version 2024R2 in graphical mode... """ exe = atp.get_mechanical_path(allow_input=False, version=revision) version = atp.version_from_path("mechanical", exe) diff --git a/tests/conftest.py b/tests/conftest.py index c93f4b258..d86809225 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -372,7 +372,7 @@ def pytest_addoption(parser): mechanical_path = atp.get_mechanical_path(False) if mechanical_path == None: - parser.addoption("--ansys-version", default="241") + parser.addoption("--ansys-version", default="242") else: mechanical_version = atp.version_from_path("mechanical", mechanical_path) parser.addoption("--ansys-version", default=str(mechanical_version)) diff --git a/tests/embedding/test_app.py b/tests/embedding/test_app.py index 95f13d78d..5968a7200 100644 --- a/tests/embedding/test_app.py +++ b/tests/embedding/test_app.py @@ -91,7 +91,7 @@ def test_app_version(embedded_app): """Test version of the Application class.""" version = embedded_app.version assert type(version) is int - assert version >= 231 + assert version >= 232 @pytest.mark.embedding diff --git a/tests/test_mechanical.py b/tests/test_mechanical.py index 91ffbff2a..6e4bb5a77 100644 --- a/tests/test_mechanical.py +++ b/tests/test_mechanical.py @@ -441,7 +441,7 @@ def test_find_mechanical_path(): else: assert ".workbench" in path - assert re.match(r"\d{3}", str(version)) and version >= 231 + assert re.match(r"\d{3}", str(version)) and version >= 232 @pytest.mark.remote_session_launch @@ -461,13 +461,13 @@ def test_change_default_mechanical_path(): @pytest.mark.remote_session_launch def test_version_from_path(): - windows_path = "C:\\Program Files\\ANSYS Inc\\v231\\aisol\\bin\\winx64\\AnsysWBU.exe" + windows_path = "C:\\Program Files\\ANSYS Inc\\v242\\aisol\\bin\\winx64\\AnsysWBU.exe" version = ansys.tools.path.version_from_path("mechanical", windows_path) - assert version == 231 + assert version == 242 - linux_path = "/usr/ansys_inc/v231/aisol/.workbench" + linux_path = "/usr/ansys_inc/v242/aisol/.workbench" version = ansys.tools.path.version_from_path("mechanical", linux_path) - assert version == 231 + assert version == 242 with pytest.raises(RuntimeError): # doesn't contain version