From 59051c5c578cbb6d4997ceceec3f17e63dff4fdc Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Wed, 18 Dec 2024 11:07:23 +0100 Subject: [PATCH 01/17] ci: temporary skipping attrs license check (#3624) * ci: temporary skipping attrs license check * chore: adding changelog file 3624.maintenance.md [dependabot-skip] --------- Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> --- .github/workflows/ci.yml | 1 + doc/changelog.d/3624.maintenance.md | 1 + 2 files changed, 2 insertions(+) create mode 100644 doc/changelog.d/3624.maintenance.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 633532d0a6..7684589d34 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -128,6 +128,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: | diff --git a/doc/changelog.d/3624.maintenance.md b/doc/changelog.d/3624.maintenance.md new file mode 100644 index 0000000000..ab1824ea28 --- /dev/null +++ b/doc/changelog.d/3624.maintenance.md @@ -0,0 +1 @@ +ci: temporary skipping attrs license check \ No newline at end of file From 121c3d065effbc7d5dc27d842661ee9cf701ad12 Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Wed, 18 Dec 2024 18:00:20 +0100 Subject: [PATCH 02/17] feat: debug testing (#3594) * feat: using an envvar to activate testing debugging * chore: adding changelog file 3594.maintenance.md [dependabot-skip] * fix: test logging name too long * fix: detecting comments as parameters sets when they have =. * fix: apply suggestions from code review * fix: script path name * fix: test * ci: using an external file for minimal requirements * fix: tests * refactor: moving dependency to requirement file * ci: fix files names. * fix: test * ci: adding logs to console --------- Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> --- .ci/collect_mapdl_logs_locals.sh | 12 +++ ...l_logs.sh => collect_mapdl_logs_remote.sh} | 0 .ci/display_logs_locals.sh | 19 +++++ ...display_logs.sh => display_logs_remote.sh} | 0 .ci/requirements_minimal.txt | 6 ++ .github/workflows/ci.yml | 76 +++++++++++++++++-- doc/changelog.d/3594.maintenance.md | 1 + tests/common.py | 15 ++-- tests/conftest.py | 29 +++++-- tests/test_grpc.py | 8 +- tests/test_logging.py | 10 ++- 11 files changed, 155 insertions(+), 21 deletions(-) create mode 100755 .ci/collect_mapdl_logs_locals.sh rename .ci/{collect_mapdl_logs.sh => collect_mapdl_logs_remote.sh} (100%) create mode 100755 .ci/display_logs_locals.sh rename .ci/{display_logs.sh => display_logs_remote.sh} (100%) create mode 100644 .ci/requirements_minimal.txt create mode 100644 doc/changelog.d/3594.maintenance.md diff --git a/.ci/collect_mapdl_logs_locals.sh b/.ci/collect_mapdl_logs_locals.sh new file mode 100755 index 0000000000..5b4eff1c4a --- /dev/null +++ b/.ci/collect_mapdl_logs_locals.sh @@ -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" \ No newline at end of file diff --git a/.ci/collect_mapdl_logs.sh b/.ci/collect_mapdl_logs_remote.sh similarity index 100% rename from .ci/collect_mapdl_logs.sh rename to .ci/collect_mapdl_logs_remote.sh diff --git a/.ci/display_logs_locals.sh b/.ci/display_logs_locals.sh new file mode 100755 index 0000000000..c4db9eb59c --- /dev/null +++ b/.ci/display_logs_locals.sh @@ -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" \ No newline at end of file diff --git a/.ci/display_logs.sh b/.ci/display_logs_remote.sh similarity index 100% rename from .ci/display_logs.sh rename to .ci/display_logs_remote.sh diff --git a/.ci/requirements_minimal.txt b/.ci/requirements_minimal.txt new file mode 100644 index 0000000000..8d55e3ac3c --- /dev/null +++ b/.ci/requirements_minimal.txt @@ -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 \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7684589d34..3712c825a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,6 +36,7 @@ env: 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' 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%-... @@ -337,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() @@ -352,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" @@ -577,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() @@ -592,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" @@ -714,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 @@ -822,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: @@ -851,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: @@ -930,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: @@ -959,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: diff --git a/doc/changelog.d/3594.maintenance.md b/doc/changelog.d/3594.maintenance.md new file mode 100644 index 0000000000..3784e19adf --- /dev/null +++ b/doc/changelog.d/3594.maintenance.md @@ -0,0 +1 @@ +feat: activate debug mode on testing using `PYMAPDL_DEBUG_TESTING` envvar \ No newline at end of file diff --git a/tests/common.py b/tests/common.py index 0ff9a64632..a42b29a27e 100644 --- a/tests/common.py +++ b/tests/common.py @@ -157,14 +157,14 @@ def testing_minimal(): return os.environ.get("TESTING_MINIMAL", "NO").upper().strip() in ["YES", "TRUE"] -def log_apdl() -> bool: - if os.environ.get("PYMAPDL_LOG_APDL"): - log_apdl = os.environ.get("PYMAPDL_LOG_APDL") +def debug_testing() -> bool: + if os.environ.get("PYMAPDL_DEBUG_TESTING"): + debug_testing = os.environ.get("PYMAPDL_DEBUG_TESTING") - if log_apdl.lower() in ["true", "false", "yes", "no"]: - return log_apdl.lower() in ["true", "yes"] + if debug_testing.lower() in ["true", "false", "yes", "no"]: + return debug_testing.lower() in ["true", "yes"] else: - return log_apdl + return debug_testing else: return False @@ -228,7 +228,7 @@ def log_test_start(mapdl: Mapdl) -> None: ) mapdl.run("!") - mapdl.run(f"! PyMAPDL running test: {test_name}") + mapdl.run(f"! PyMAPDL running test: {test_name}"[:639]) mapdl.run("!") # To see it also in MAPDL terminal output @@ -241,6 +241,7 @@ def log_test_start(mapdl: Mapdl) -> None: types_ = ["File path", "Test function"] mapdl._run("/com,Running test in:", mute=True) + for type_, name_ in zip(types_, test_name): mapdl._run(f"/com, {type_}: {name_}", mute=True) diff --git a/tests/conftest.py b/tests/conftest.py index cc0ffe1c11..023bbddd10 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -35,6 +35,7 @@ from common import ( Element, Node, + debug_testing, get_details_of_elements, get_details_of_nodes, has_dpf, @@ -44,7 +45,6 @@ is_on_ubuntu, is_running_on_student, is_smp, - log_apdl, log_test_start, make_sure_not_instances_are_left_open, restart_mapdl, @@ -58,6 +58,7 @@ # --------------------------- # +DEBUG_TESTING = debug_testing() TESTING_MINIMAL = testing_minimal() ON_LOCAL = is_on_local() @@ -74,7 +75,6 @@ HAS_DPF = has_dpf() SUPPORT_PLOTTING = support_plotting() IS_SMP = is_smp() -LOG_APDL = log_apdl() QUICK_LAUNCH_SWITCHES = "-smp -m 100 -db 100" VALID_PORTS = [] @@ -183,6 +183,17 @@ def requires_dependency(dependency: str): return pytest.mark.skip(reason=f"Requires '{dependency}' package") +if DEBUG_TESTING: + from ansys.mapdl.core import LOG + + LOG.setLevel("DEBUG") + + # If the following file name is changed, update `ci.yml`. + LOG.log_to_file("pymapdl.log") + + # the following files are also generated by MAPDL gRPC: + # - "pymapdl.apdl": The APDL commands sent to MAPDL by PyMAPDL + # - "apdl.out" : MAPDL console output. Very likely only contains the output until connected. ################################################################ # # Importing packages @@ -265,7 +276,7 @@ def pytest_report_header(config, start_path, startdir): text = [] text += ["Testing variables".center(get_terminal_size()[0], "-")] text += [ - f"Session dependent: ON_CI ({ON_CI}), TESTING_MINIMAL ({TESTING_MINIMAL}), SUPPORT_PLOTTING ({SUPPORT_PLOTTING})" + f"Session dependent: DEBUG_TESTING ({DEBUG_TESTING}), ON_CI ({ON_CI}), TESTING_MINIMAL ({TESTING_MINIMAL}), SUPPORT_PLOTTING ({SUPPORT_PLOTTING})" ] text += [ f"OS dependent: ON_LINUX ({ON_LINUX}), ON_UBUNTU ({ON_UBUNTU}), ON_WINDOWS ({ON_WINDOWS}), ON_MACOS ({ON_MACOS})" @@ -429,7 +440,7 @@ def run_before_and_after_tests( mapdl = restart_mapdl(mapdl) # Write test info to log_apdl - if LOG_APDL: + if DEBUG_TESTING: log_test_start(mapdl) # check if the local/remote state has changed or not @@ -546,7 +557,9 @@ def mapdl_console(request): "Valid versions are up to 2020R2." ) - mapdl = launch_mapdl(console_path, mode="console", log_apdl=LOG_APDL) + mapdl = launch_mapdl( + console_path, mode="console", log_apdl="pymapdl.apdl" if DEBUG_TESTING else None + ) from ansys.mapdl.core.mapdl_console import MapdlConsole assert isinstance(mapdl, MapdlConsole) @@ -577,8 +590,12 @@ def mapdl(request, tmpdir_factory): cleanup_on_exit=cleanup, license_server_check=False, start_timeout=50, - log_apdl=LOG_APDL, + loglevel="DEBUG" if DEBUG_TESTING else "ERROR", + # If the following file names are changed, update `ci.yml`. + log_apdl="pymapdl.apdl" if DEBUG_TESTING else None, + mapdl_output="apdl.out" if (DEBUG_TESTING and ON_LOCAL) else None, ) + mapdl._show_matplotlib_figures = False # CI: don't show matplotlib figures MAPDL_VERSION = mapdl.version # Caching version diff --git a/tests/test_grpc.py b/tests/test_grpc.py index fd2454a4d0..d5cc35e4ca 100644 --- a/tests/test_grpc.py +++ b/tests/test_grpc.py @@ -577,13 +577,19 @@ def test_input_compatibility_api_change(mapdl, cleared): @requires("grpc") @requires("local") -def test__check_stds(mapdl, cleared): +@requires("nostudent") +def test__check_stds(): """Test that the standard input is checked.""" + from ansys.mapdl.core import launch_mapdl + + mapdl = launch_mapdl(port=50058) mapdl._read_stds() assert mapdl._stdout is not None assert mapdl._stderr is not None + mapdl.exit(force=True) + def test_subscribe_to_channel(mapdl, cleared): assert mapdl.channel_state in [ diff --git a/tests/test_logging.py b/tests/test_logging.py index 3c416706be..0b97a7c5c6 100644 --- a/tests/test_logging.py +++ b/tests/test_logging.py @@ -287,7 +287,12 @@ def test_log_to_file(tmpdir): LOG.logger.setLevel("ERROR") LOG.std_out_handler.setLevel("ERROR") - if not LOG.file_handler: + if LOG.file_handler is None: + old_logger = None + LOG.log_to_file(file_path) + else: + # the logger has been already instantiated + old_logger = LOG.file_handler.baseFilename LOG.log_to_file(file_path) LOG.error(file_msg_error) @@ -313,6 +318,9 @@ def test_log_to_file(tmpdir): assert file_msg_debug in text + if old_logger is not None: + LOG.log_to_file(old_logger) + def test_log_instance_name(mapdl, cleared): # verify we can access via an instance name From 06c93c09c5a94f4210d993f4f81cfe12a1335f4f Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Wed, 18 Dec 2024 18:30:00 +0100 Subject: [PATCH 03/17] refactor: annotate pymapdl part 1 (#3569) * refactor: annotating version file * refactor: annotate __init__ * refactor: annotate commands.py * refactor: annotate common_grpc.py * refactor: annotate components.py * refactor: annotating convert.py * refactor: annotating errors.py * refactor: annotate information.py * refactor: annotate cli files * refactor: annotate examples module * chore: explain better a variable comment * refactor: annotate inline_functions * refactor: annotate jupyter.py * refactor: annotate krylov * fix: missing imports * chore: adding changelog file 3569.added.md [dependabot-skip] * chore: update src/ansys/mapdl/core/cli/stop.py Co-authored-by: Camille <78221213+clatapie@users.noreply.github.com> * fix: missing import * feat: add missing import * fix: requests import * fix: missing import * fix: missing imports and wrong literal * fix: test_detach_examples_submodule * fix: pandas * test: testing examples * fix: add missing import * feat: fix pandas warning in docs. Also remove non-used function and adding _HAS_PANDAS to globals * fix: import * fix: import * ci: auto fixes from pre-commit.com hooks. for more information, see https://pre-commit.ci --------- Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Co-authored-by: Camille <78221213+clatapie@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- doc/changelog.d/3569.added.md | 1 + src/ansys/mapdl/core/__init__.py | 15 +- src/ansys/mapdl/core/_version.py | 11 +- src/ansys/mapdl/core/cli/__init__.py | 12 +- src/ansys/mapdl/core/cli/convert.py | 7 +- src/ansys/mapdl/core/cli/list_instances.py | 2 +- src/ansys/mapdl/core/cli/start.py | 2 +- src/ansys/mapdl/core/cli/stop.py | 18 +- src/ansys/mapdl/core/commands.py | 143 ++++---- src/ansys/mapdl/core/common_grpc.py | 23 +- src/ansys/mapdl/core/component.py | 40 +-- src/ansys/mapdl/core/convert.py | 323 +++++++++--------- src/ansys/mapdl/core/errors.py | 21 +- src/ansys/mapdl/core/examples/downloads.py | 47 ++- src/ansys/mapdl/core/examples/examples.py | 11 +- src/ansys/mapdl/core/examples/verif_files.py | 13 +- src/ansys/mapdl/core/information.py | 116 ++++--- .../inline_functions/connectivity_queries.py | 4 +- src/ansys/mapdl/core/inline_functions/core.py | 4 +- .../core/inline_functions/geometry_queries.py | 12 +- src/ansys/mapdl/core/jupyter.py | 22 +- src/ansys/mapdl/core/krylov.py | 80 +++-- tests/test_examples.py | 24 +- 23 files changed, 505 insertions(+), 446 deletions(-) create mode 100644 doc/changelog.d/3569.added.md diff --git a/doc/changelog.d/3569.added.md b/doc/changelog.d/3569.added.md new file mode 100644 index 0000000000..b4f202ad3f --- /dev/null +++ b/doc/changelog.d/3569.added.md @@ -0,0 +1 @@ +refactor: annotate pymapdl part 1 \ No newline at end of file diff --git a/src/ansys/mapdl/core/__init__.py b/src/ansys/mapdl/core/__init__.py index 9ed873482d..52592a752f 100644 --- a/src/ansys/mapdl/core/__init__.py +++ b/src/ansys/mapdl/core/__init__.py @@ -20,8 +20,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -import importlib.metadata as importlib_metadata - ############################################################################### # Imports # ======= @@ -40,17 +38,16 @@ # from ansys.mapdl.core.logging import Logger -LOG = Logger(level=logging.ERROR, to_file=False, to_stdout=True) +LOG: Logger = Logger(level=logging.ERROR, to_file=False, to_stdout=True) LOG.debug("Loaded logging module as LOG") ############################################################################### # Globals # ======= # +from ansys.mapdl.core._version import __version__ from ansys.mapdl.core.helpers import is_installed, run_every_import, run_first_time -__version__: str = importlib_metadata.version(__name__.replace(".", "-")) - # A dictionary relating PyMAPDL server versions with the unified install ones VERSION_MAP: Dict[Tuple[int, int, int], str] = { (0, 0, 0): "2020R2", @@ -69,17 +66,21 @@ # 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_PANDAS: bool = is_installed("pandas") _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_VISUALIZER: bool = is_installed("ansys.tools.visualization_interface") + # Setup directories USER_DATA_PATH: str = user_data_dir(appname="ansys_mapdl_core", appauthor="Ansys") -EXAMPLES_PATH = os.path.join(USER_DATA_PATH, "examples") +EXAMPLES_PATH: str = os.path.join(USER_DATA_PATH, "examples") -# Store local ports +# Store ports occupied by local instances _LOCAL_PORTS: List[int] = [] ############################################################################### diff --git a/src/ansys/mapdl/core/_version.py b/src/ansys/mapdl/core/_version.py index 96081b15d2..ed3dafa51a 100644 --- a/src/ansys/mapdl/core/_version.py +++ b/src/ansys/mapdl/core/_version.py @@ -29,18 +29,15 @@ version_info = 0, 58, 'dev0' """ - -try: - import importlib.metadata as importlib_metadata -except ModuleNotFoundError: # pragma: no cover - import importlib_metadata +import importlib.metadata as importlib_metadata +from typing import Dict # Read from the pyproject.toml # major, minor, patch -__version__ = importlib_metadata.version("ansys-mapdl-core") +__version__: str = importlib_metadata.version("ansys-mapdl-core") # In descending order -SUPPORTED_ANSYS_VERSIONS = { +SUPPORTED_ANSYS_VERSIONS: Dict[int, str] = { 252: "2025R2", 251: "2025R1", 242: "2024R2", diff --git a/src/ansys/mapdl/core/cli/__init__.py b/src/ansys/mapdl/core/cli/__init__.py index a3cedac94a..623d78d662 100644 --- a/src/ansys/mapdl/core/cli/__init__.py +++ b/src/ansys/mapdl/core/cli/__init__.py @@ -20,22 +20,16 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -try: - import click - - _HAS_CLICK = True - -except ModuleNotFoundError: - _HAS_CLICK = False - +from ansys.mapdl.core import _HAS_CLICK if _HAS_CLICK: ################################### # PyMAPDL CLI + import click @click.group(invoke_without_command=True) @click.pass_context - def main(ctx): + def main(ctx: click.Context): pass from ansys.mapdl.core.cli.convert import convert diff --git a/src/ansys/mapdl/core/cli/convert.py b/src/ansys/mapdl/core/cli/convert.py index c618ee14ef..e8f8b76a6e 100644 --- a/src/ansys/mapdl/core/cli/convert.py +++ b/src/ansys/mapdl/core/cli/convert.py @@ -21,13 +21,14 @@ # SOFTWARE. import os +from typing import Any, List import click -_USING_PIPE = [False] +_USING_PIPE: List[bool] = [False] -def get_input_source(ctx, param, value): +def get_input_source(ctx: click.Context, param: Any, value: Any): if not value and not click.get_text_stream("stdin").isatty(): _USING_PIPE[0] = True return click.get_text_stream("stdin").read().strip() @@ -180,7 +181,7 @@ def convert( use_vtk: bool, clear_at_start: bool, check_parameter_names: bool, -): +) -> None: """Convert MAPDL code to PyMAPDL""" from ansys.mapdl.core.convert import convert_apdl_block, convert_script diff --git a/src/ansys/mapdl/core/cli/list_instances.py b/src/ansys/mapdl/core/cli/list_instances.py index 36d6d5b9df..49038dde8c 100644 --- a/src/ansys/mapdl/core/cli/list_instances.py +++ b/src/ansys/mapdl/core/cli/list_instances.py @@ -65,7 +65,7 @@ default=False, help="Print running location info.", ) -def list_instances(instances, long, cmd, location): +def list_instances(instances, long, cmd, location) -> None: import psutil from tabulate import tabulate diff --git a/src/ansys/mapdl/core/cli/start.py b/src/ansys/mapdl/core/cli/start.py index 7c8332a96c..3771b244d6 100644 --- a/src/ansys/mapdl/core/cli/start.py +++ b/src/ansys/mapdl/core/cli/start.py @@ -191,7 +191,7 @@ def start( add_env_vars: Dict[str, str], # ignored replace_env_vars: Dict[str, str], # ignored version: Union[int, str], -): +) -> None: from ansys.mapdl.core.launcher import launch_mapdl if mode: diff --git a/src/ansys/mapdl/core/cli/stop.py b/src/ansys/mapdl/core/cli/stop.py index 2e16a7404b..213c6e1041 100644 --- a/src/ansys/mapdl/core/cli/stop.py +++ b/src/ansys/mapdl/core/cli/stop.py @@ -20,6 +20,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +from typing import Optional + import click @@ -49,7 +51,21 @@ default=False, help="Kill all MAPDL instances", ) -def stop(port, pid, all): +def stop(port: int, pid: Optional[int], all: bool) -> None: + """Stop MAPDL instances running on a given port or with a given process id (PID). + + This command stops MAPDL instances running on a given port or with a given process id (PID). + By default, it stops instances running on the port 50052. + + Parameters + ---------- + port : int + Port where the MAPDL instance is running. + pid : Optional[int] + PID of the MAPDL instance + all : bool + If :class:`True`, kill all the instances regardless their port or PID. + """ import psutil from ansys.mapdl.core.launcher import is_ansys_process diff --git a/src/ansys/mapdl/core/commands.py b/src/ansys/mapdl/core/commands.py index 25e88dd528..2f1e3a0eec 100644 --- a/src/ansys/mapdl/core/commands.py +++ b/src/ansys/mapdl/core/commands.py @@ -22,9 +22,15 @@ from functools import wraps import re +from typing import Any, Callable, Dict, List, Optional, Tuple import numpy as np +from ansys.mapdl.core import _HAS_PANDAS + +if _HAS_PANDAS: + import pandas + from ._commands import ( apdl, aux2_, @@ -48,35 +54,37 @@ ) # compiled regular expressions used for parsing tablular outputs -REG_LETTERS = re.compile(r"[a-df-zA-DF-Z]+") # all except E or e -REG_FLOAT_INT = re.compile( +REG_LETTERS: re.Pattern = re.compile(r"[a-df-zA-DF-Z]+") # all except E or e +REG_FLOAT_INT: re.Pattern = re.compile( r"[+-]?[0-9]*[.]?[0-9]*[Ee]?[+-]?[0-9]+|\s[0-9]+\s" ) # match number groups -BC_REGREP = re.compile(r"^\s*([0-9]+)\s*([A-Za-z]+)((?:\s+[0-9]*[.]?[0-9]+)+)$") +BC_REGREP: re.Pattern = re.compile( + r"^\s*([0-9]+)\s*([A-Za-z]+)((?:\s+[0-9]*[.]?[0-9]+)+)$" +) -MSG_NOT_PANDAS = """'Pandas' is not installed or could not be found. +MSG_NOT_PANDAS: str = """'Pandas' is not installed or could not be found. Hence this command is not applicable. You can install it using: pip install pandas """ -MSG_BCLISTINGOUTPUT_TO_ARRAY = """This command has strings values in some of its columns (such 'UX', 'FX', 'UY', 'TEMP', etc), +MSG_BCLISTINGOUTPUT_TO_ARRAY: str = """This command has strings values in some of its columns (such 'UX', 'FX', 'UY', 'TEMP', etc), so it cannot be converted to Numpy Array. Please use 'to_list' or 'to_dataframe' instead.""" # Identify where the data start in the output -GROUP_DATA_START = ["NODE", "ELEM"] +GROUP_DATA_START: List[str] = ["NODE", "ELEM"] # Allowed commands to get output as array or dataframe. # In theory, these commands should follow the same format. # Some of them are not documented (already deprecated?) # So they are not in the Mapdl class, # so they won't be wrapped. -CMD_RESULT_LISTING = [ +CMD_RESULT_LISTING: List[str] = [ "NLIN", # not documented "PRCI", "PRDI", # Not documented. @@ -104,7 +112,7 @@ "SWLI", ] -CMD_BC_LISTING = [ +CMD_BC_LISTING: List[str] = [ "DKLI", "DLLI", "DALI", @@ -120,7 +128,7 @@ "BFAL", ] -COLNAMES_BC_LISTING = { +COLNAMES_BC_LISTING: Dict[str, List[str]] = { "DKLI": ["KEYPOINT", "LABEL", "REAL", "IMAG", "EXP KEY"], "DLLI": ["LINE", "LABEL", "REAL", "IMAG", "NAREA"], "DALI": ["AREA", "LABEL", "REAL", "IMAG"], @@ -133,7 +141,7 @@ "BFAL": ["AREA", "LABEL", "VALUE"], } -CMD_ENTITY_LISTING = [ +CMD_ENTITY_LISTING: List[str] = [ "NLIS", # "ELIS", # To be implemented later # "KLIS", @@ -142,12 +150,12 @@ # "VLIS", ] -CMD_LISTING = [] +CMD_LISTING: List[str] = [] CMD_LISTING.extend(CMD_ENTITY_LISTING) CMD_LISTING.extend(CMD_RESULT_LISTING) # Adding empty lines to match current format. -CMD_DOCSTRING_INJECTION = r""" +CMD_DOCSTRING_INJECTION: str = r""" Returns ------- @@ -166,7 +174,7 @@ """ -XSEL_DOCSTRING_INJECTION = r""" +XSEL_DOCSTRING_INJECTION: str = r""" Returns ------- @@ -178,7 +186,7 @@ """ -CMD_XSEL = [ +CMD_XSEL: List[str] = [ "NSEL", "ESEL", "KSEL", @@ -188,13 +196,13 @@ ] -def get_indentation(indentation_regx, docstring): +def get_indentation(indentation_regx: str, docstring: str) -> List[Any]: return re.findall(indentation_regx, docstring, flags=re.DOTALL | re.IGNORECASE)[0][ 0 ] -def indent_text(indentation, docstring_injection): +def indent_text(indentation: str, docstring_injection: str) -> str: return "\n".join( [ indentation + each @@ -204,18 +212,18 @@ def indent_text(indentation, docstring_injection): ) -def get_docstring_indentation(docstring): +def get_docstring_indentation(docstring: str) -> List[Any]: indentation_regx = r"\n(\s*)\n" return get_indentation(indentation_regx, docstring) -def get_sections(docstring): +def get_sections(docstring: str) -> List[str]: return [ each.strip().lower() for each in re.findall(r"\n\s*(\S*)\n\s*-+\n", docstring) ] -def get_section_indentation(section_name, docstring): +def get_section_indentation(section_name: str, docstring: str) -> List[Any]: sections = get_sections(docstring) if section_name.lower().strip() not in sections: raise ValueError( @@ -227,7 +235,9 @@ def get_section_indentation(section_name, docstring): return get_indentation(indentation_regx, docstring) -def inject_before(section, indentation, indented_doc_inject, docstring): +def inject_before( + section: str, indentation: str, indented_doc_inject: str, docstring: str +) -> str: return re.sub( section + r"\n\s*-*", f"{indented_doc_inject.strip()}\n\n{indentation}" + r"\g<0>", @@ -236,7 +246,7 @@ def inject_before(section, indentation, indented_doc_inject, docstring): ) -def inject_after_return_section(indented_doc_inject, docstring): +def inject_after_return_section(indented_doc_inject: str, docstring: str) -> str: return re.sub( "Returns" + r"\n\s*-*", f"{indented_doc_inject.strip()}\n", @@ -245,7 +255,7 @@ def inject_after_return_section(indented_doc_inject, docstring): ) -def inject_docs(docstring, docstring_injection=None): +def inject_docs(docstring: str, docstring_injection: Optional[str] = None) -> str: """Inject a string in a docstring""" if not docstring_injection: docstring_injection = CMD_DOCSTRING_INJECTION @@ -295,7 +305,7 @@ def inject_docs(docstring, docstring_injection=None): return docstring + "\n" + indented_doc_inject -def check_valid_output(func): +def check_valid_output(func: Callable) -> Callable: """Wrapper that check if output can be wrapped by pandas, if not, it will raise an exception.""" @wraps(func) @@ -511,18 +521,6 @@ class Commands( """Wrapped MAPDL commands""" -def _requires_pandas(func): - """Wrapper that check ``HAS_PANDAS``, if not, it will raise an exception.""" - - def func_wrapper(self, *args, **kwargs): - if HAS_PANDAS: - return func(self, *args, **kwargs) - else: - raise ModuleNotFoundError(MSG_NOT_PANDAS) - - return func_wrapper - - class CommandOutput(str): """Custom string subclass for handling the commands output. @@ -541,7 +539,7 @@ class CommandOutput(str): # - https://docs.python.org/3/library/collections.html#userstring-objects # - Source code of UserString - def __new__(cls, content, cmd=None): + def __new__(cls, content: str, cmd=None): obj = super().__new__(cls, content) obj._cmd = cmd return obj @@ -552,7 +550,7 @@ def cmd(self): return self._cmd.split(",")[0] @cmd.setter - def cmd(self, cmd): + def cmd(self, cmd: str): """Not allowed to change the value of ``cmd``.""" raise AttributeError("The `cmd` attribute cannot be set") @@ -583,23 +581,26 @@ class CommandListingOutput(CommandOutput): """ - def __new__(cls, content, cmd=None, magicwords=None, columns_names=None): + def __new__( + cls, + content: str, + cmd: Optional[str] = None, + magicwords: Optional[str] = None, + columns_names: Optional[List[str]] = None, + ): obj = super().__new__(cls, content) obj._cmd = cmd obj._magicwords = magicwords obj._columns_names = columns_names return obj - def __init__(self, *args, **kwargs): + def __init__(self, *args: Tuple[Any], **kwargs: Dict[Any, Any]) -> None: self._cache = None - def _is_data_start(self, line, magicwords=None): + def _is_data_start(self, line: str, magicwords: List[str] = None) -> bool: """Check if line is the start of a data group.""" if not magicwords: - if self._magicwords: - magicwords = self._magicwords - else: - magicwords = GROUP_DATA_START + magicwords = self._magicwords or GROUP_DATA_START # Checking if we are supplying a custom start function. if self.custom_data_start(line) is not None: @@ -610,7 +611,7 @@ def _is_data_start(self, line, magicwords=None): return True return False - def _is_data_end(self, line): + def _is_data_end(self, line: str) -> bool: """Check if line is the end of a data group.""" # Checking if we are supplying a custom start function. @@ -619,7 +620,7 @@ def _is_data_end(self, line): else: return self._is_empty(line) - def custom_data_start(self, line): + def custom_data_start(self, line: str) -> None: """Custom data start line check function. This function is left empty so it can be overwritten by the user. @@ -629,7 +630,7 @@ def custom_data_start(self, line): """ return None - def custom_data_end(self, line): + def custom_data_end(self, line: str) -> None: """Custom data end line check function. This function is left empty so it can be overwritten by the user. @@ -640,14 +641,14 @@ def custom_data_end(self, line): return None @staticmethod - def _is_empty_line(line): + def _is_empty_line(line: str) -> bool: return bool(line.split()) - def _format(self): + def _format(self) -> str: """Perform some formatting (replacing mainly) in the raw text.""" return re.sub(r"[^E](-)", " -", self.__str__()) - def _get_body(self, trail_header=None): + def _get_body(self, trail_header: List[str] = None) -> str: """Get command body text. It removes the maximum absolute values tail part and makes sure there is @@ -672,7 +673,9 @@ def _get_body(self, trail_header=None): body = body[:i] return body - def _get_data_group_indexes(self, body, magicwords=None): + def _get_data_group_indexes( + self, body: str, magicwords: Optional[List[str]] = None + ) -> List[Tuple[int, int]]: """Return the indexes of the start and end of the data groups.""" if "*****ANSYS VERIFICATION RUN ONLY*****" in str(self[:1000]): shift = 2 @@ -697,7 +700,7 @@ def _get_data_group_indexes(self, body, magicwords=None): return zip(start_idxs, ends) - def get_columns(self): + def get_columns(self) -> Optional[List[str]]: """Get the column names for the dataframe. Returns @@ -715,7 +718,7 @@ def get_columns(self): except: return None - def _parse_table(self): + def _parse_table(self) -> np.ndarray: """Parse tabular command output. Returns @@ -734,14 +737,14 @@ def _parse_table(self): return np.array(parsed_lines, dtype=np.float64) @property - def _parsed(self): + def _parsed(self) -> str: """Return parsed output.""" if self._cache is None: self._cache = self._parse_table() return self._cache @check_valid_output - def to_list(self): + def to_list(self) -> List[str]: """Export the command output a list or list of lists. Returns @@ -750,7 +753,7 @@ def to_list(self): """ return self._parsed.tolist() - def to_array(self): + def to_array(self) -> np.ndarray: """Export the command output as a numpy array. Returns @@ -760,7 +763,9 @@ def to_array(self): """ return self._parsed - def to_dataframe(self, data=None, columns=None): + def to_dataframe( + self, data: Optional[np.ndarray] = None, columns: Optional[List[str]] = None + ) -> "pandas.DataFrame": """Export the command output as a Pandas DataFrame. Parameters @@ -789,9 +794,9 @@ def to_dataframe(self, data=None, columns=None): (inheritate from :func:`to_array() ` method). """ - try: - import pandas as pd - except ModuleNotFoundError: + if _HAS_PANDAS: + import pandas + else: raise ModuleNotFoundError(MSG_NOT_PANDAS) if data is None: @@ -799,7 +804,7 @@ def to_dataframe(self, data=None, columns=None): if not columns: columns = self.get_columns() - return pd.DataFrame(data=data, columns=columns) + return pandas.DataFrame(data=data, columns=columns) class BoundaryConditionsListingOutput(CommandListingOutput): @@ -819,10 +824,10 @@ class BoundaryConditionsListingOutput(CommandListingOutput): """ - def bc_colnames(self): + def bc_colnames(self) -> Optional[List[str]]: """Get the column names based on bc list command""" - bc_type = { + bc_type: Dict[str, str] = { "BODY FORCES": "BF", "SURFACE LOAD": "SF", "POINT LOAD": "F", @@ -871,7 +876,7 @@ def bc_colnames(self): return None - def get_columns(self): + def get_columns(self) -> List[str]: """Get the column names for the dataframe. Returns @@ -895,7 +900,7 @@ def get_columns(self): except: return None - def _parse_table(self): + def _parse_table(self) -> List[str]: """Parse tabular command output.""" parsed_lines = [] for line in self.splitlines(): @@ -909,7 +914,7 @@ def _parse_table(self): return parsed_lines @check_valid_output - def to_list(self): + def to_list(self) -> List[str]: """Export the command output a list or list of lists. Returns @@ -921,7 +926,7 @@ def to_list(self): def to_array(self): raise ValueError(MSG_BCLISTINGOUTPUT_TO_ARRAY) - def to_dataframe(self): + def to_dataframe(self) -> "pandas.DataFrame": """Convert the command output to a Pandas Dataframe. Returns @@ -960,7 +965,7 @@ def to_dataframe(self): class ComponentListing(CommandListingOutput): @property - def _parsed(self): + def _parsed(self) -> np.ndarray: from ansys.mapdl.core.component import _parse_cmlist # To keep same API as commands @@ -968,5 +973,5 @@ def _parsed(self): class StringWithLiteralRepr(str): - def __repr__(self): + def __repr__(self) -> str: return self.__str__() diff --git a/src/ansys/mapdl/core/common_grpc.py b/src/ansys/mapdl/core/common_grpc.py index ab5be839ce..65ac3fc5f7 100644 --- a/src/ansys/mapdl/core/common_grpc.py +++ b/src/ansys/mapdl/core/common_grpc.py @@ -22,17 +22,18 @@ """Common gRPC functions""" from time import sleep -from typing import List, Literal, get_args +from typing import Dict, Iterable, List, Literal, Optional, get_args +from ansys.api.mapdl.v0 import ansys_kernel_pb2 as anskernel import numpy as np from ansys.mapdl.core.errors import MapdlConnectionError, MapdlRuntimeError # chunk sizes for streaming and file streaming -DEFAULT_CHUNKSIZE = 256 * 1024 # 256 kB -DEFAULT_FILE_CHUNK_SIZE = 1024 * 1024 # 1MB +DEFAULT_CHUNKSIZE: int = 256 * 1024 # 256 kB +DEFAULT_FILE_CHUNK_SIZE: int = 1024 * 1024 # 1MB -ANSYS_VALUE_TYPE = { +ANSYS_VALUE_TYPE: Dict[int, Optional[np.typing.DTypeLike]] = { 0: None, # UNKNOWN 1: np.int32, # INTEGER 2: np.int64, # HYPER @@ -45,7 +46,7 @@ } -VGET_ENTITY_TYPES_TYPING = Literal[ +VGET_ENTITY_TYPES_TYPING: List[str] = Literal[ "NODE", "ELEM", "KP", @@ -59,9 +60,9 @@ VGET_ENTITY_TYPES: List[str] = list(get_args(VGET_ENTITY_TYPES_TYPING)) -STRESS_TYPES = ["X", "Y", "Z", "XY", "YZ", "XZ", "1", "2", "3", "INT", "EQV"] -COMP_TYPE = ["X", "Y", "Z", "SUM"] -VGET_NODE_ENTITY_TYPES = { +STRESS_TYPES: List[str] = ["X", "Y", "Z", "XY", "YZ", "XZ", "1", "2", "3", "INT", "EQV"] +COMP_TYPE: List[str] = ["X", "Y", "Z", "SUM"] +VGET_NODE_ENTITY_TYPES: Dict[str, List[str]] = { "U": ["X", "Y", "Z"], "S": STRESS_TYPES, "EPTO": STRESS_TYPES, @@ -89,7 +90,7 @@ class GrpcError(MapdlRuntimeError): """Raised when gRPC fails""" - def __init__(self, msg=""): + def __init__(self, msg: str = "") -> None: super().__init__(self, msg) @@ -168,7 +169,9 @@ def check_vget_input(entity: str, item: str, itnum: str) -> str: return "%s, , %s, %s" % (entity, item, itnum) -def parse_chunks(chunks, dtype=None): +def parse_chunks( + chunks: Iterable[anskernel.Chunk], dtype: Optional[np.typing.DTypeLike] = None +) -> np.ndarray: """Deserialize gRPC chunks into a numpy array Parameters diff --git a/src/ansys/mapdl/core/component.py b/src/ansys/mapdl/core/component.py index 21bc4765c0..2f1b989dd2 100644 --- a/src/ansys/mapdl/core/component.py +++ b/src/ansys/mapdl/core/component.py @@ -25,7 +25,9 @@ from typing import ( TYPE_CHECKING, Any, + Callable, Dict, + Iterator, List, Literal, Optional, @@ -45,13 +47,13 @@ if TYPE_CHECKING: # pragma: no cover import logging -ENTITIES_TYP = Literal[ +ENTITIES_TYP: List[str] = Literal[ "NODE", "NODES", "ELEM", "ELEMS", "ELEMENTS", "VOLU", "AREA", "LINE", "KP" ] -VALID_ENTITIES = list(get_args(ENTITIES_TYP)) +VALID_ENTITIES: List[str] = list(get_args(ENTITIES_TYP)) -SELECTOR_FUNCTION = [ +SELECTOR_FUNCTION: List[str] = [ "NSEL", "NSEL", "ESEL", @@ -63,7 +65,7 @@ "KSEL", ] -ENTITIES_MAPPING = { +ENTITIES_MAPPING: Dict[str, Callable] = { entity.upper(): func for entity, func in zip(VALID_ENTITIES, SELECTOR_FUNCTION) } @@ -71,7 +73,7 @@ ITEMS_VALUES = Optional[Union[str, int, List[int], NDArray[Any]]] UNDERLYING_DICT = Dict[str, ITEMS_VALUES] -warning_entity = ( +WARNING_ENTITY: str = ( "Assuming a {default_entity} selection.\n" "It is recommended you use the following notation to avoid this warning:\n" ">>> mapdl.components['{key}'] = '{default_entity}', {value}\n" @@ -82,7 +84,7 @@ def _check_valid_pyobj_to_entities( items: Union[Tuple[int, ...], List[int], NDArray[Any]] -): +) -> None: """Check whether the python objects can be converted to entities. At the moment, only list and numpy arrays of ints are allowed. """ @@ -130,7 +132,7 @@ class Component(tuple): [1, 2, 3] """ - def __init__(self, *args, **kwargs): + def __init__(self, *args: Tuple[Any], **kwargs: Dict[Any, Any]) -> None: """Component object""" # Using tuple init because using object.__init__ # For more information visit: @@ -151,7 +153,7 @@ def __new__( return obj - def __str__(self): + def __str__(self) -> str: tup_str = super().__str__() return f"Component(type='{self._type}', items={tup_str})" @@ -165,7 +167,7 @@ def type(self) -> ENTITIES_TYP: return self._type @property - def items(self) -> tuple: + def items(self) -> Tuple[int]: """Return the ids of the entities in the component.""" return tuple(self) @@ -258,7 +260,7 @@ def __init__(self, mapdl: Mapdl) -> None: self._default_entity_warning: bool = True @property - def default_entity(self): + def default_entity(self) -> ENTITIES_TYP: """Default entity for component creation.""" return self._default_entity @@ -271,12 +273,12 @@ def default_entity(self, value: ENTITIES_TYP): self._default_entity = value.upper() @property - def default_entity_warning(self): + def default_entity_warning(self) -> bool: """Enables the warning when creating components other than node components without specifying its type.""" return self._default_entity_warning @default_entity_warning.setter - def default_entity_warning(self, value: bool): + def default_entity_warning(self, value: bool) -> None: self._default_entity_warning = value @property @@ -301,7 +303,7 @@ def _comp(self) -> UNDERLYING_DICT: return self.__comp @_comp.setter - def _comp(self, value): + def _comp(self, value) -> None: self.__comp = value def __getitem__(self, key: str) -> ITEMS_VALUES: @@ -371,7 +373,7 @@ def __setitem__(self, key: str, value: ITEMS_VALUES) -> None: # Asumng default entity if self.default_entity_warning: warnings.warn( - warning_entity.format( + WARNING_ENTITY.format( default_entity=self.default_entity, key=key, value=value, @@ -401,7 +403,7 @@ def __setitem__(self, key: str, value: ITEMS_VALUES) -> None: # Assuming we are defining a CM with nodes if self.default_entity_warning: warnings.warn( - warning_entity.format( + WARNING_ENTITY.format( default_entity=self.default_entity, key=key, value=value, @@ -457,7 +459,7 @@ def __contains__(self, key: str) -> bool: """ return key.upper() in self._comp.keys() - def __iter__(self): + def __iter__(self) -> Iterator: """ Return an iterator over the component names. @@ -470,7 +472,7 @@ def __iter__(self): yield from self._comp.keys() @property - def names(self): + def names(self) -> Tuple[str]: """ Return a tuple that contains the components. @@ -483,7 +485,7 @@ def names(self): return tuple(self._comp.keys()) @property - def types(self): + def types(self) -> Tuple[str]: """ Return the types of the components. @@ -495,7 +497,7 @@ def types(self): """ return tuple(self._comp.values()) - def items(self): + def items(self) -> UNDERLYING_DICT: """ Return a view object that contains the name-type pairs for each component. diff --git a/src/ansys/mapdl/core/convert.py b/src/ansys/mapdl/core/convert.py index cbce45f5d4..36426971a0 100644 --- a/src/ansys/mapdl/core/convert.py +++ b/src/ansys/mapdl/core/convert.py @@ -23,6 +23,7 @@ from logging import Logger, StreamHandler import os import re +from typing import Any, Callable, Dict, List, Optional, Tuple from warnings import warn from ansys.mapdl.core import __version__ @@ -32,31 +33,31 @@ # Because the APDL version has empty arguments, whereas the PyMAPDL # doesn't have them. Hence the order of arguments is messed up. -FORMAT_OPTIONS = { +FORMAT_OPTIONS: Dict[str, Any] = { "select": "W191,W291,W293,W391,E115,E117,E122,E124,E125,E225,E231,E301,E303,F401,F403", "max-line-length": 100, } -LOGLEVEL_DEFAULT = "WARNING" -AUTO_EXIT_DEFAULT = True -LINE_ENDING_DEFAULT = None -EXEC_FILE_DEFAULT = None -MACROS_AS_FUNCTIONS_DEFAULT = True -USE_FUNCTION_NAMES_DEFAULT = True -SHOW_LOG_DEFAULT = False -ADD_IMPORTS_DEFAULT = True -COMMENT_SOLVE_DEFAULT = False -CLEANUP_OUTPUT_DEFAULT = True -HEADER_DEFAULT = True -PRINT_COM_DEFAULT = True -ONLY_COMMANDS_DEFAULT = False -USE_VTK_DEFAULT = None -CLEAR_AT_START_DEFAULT = False -CHECK_PARAMETER_NAMES_DEFAULT = True +LOGLEVEL_DEFAULT: StreamHandler = "WARNING" +AUTO_EXIT_DEFAULT: bool = True +LINE_ENDING_DEFAULT: Optional[str] = None +EXEC_FILE_DEFAULT: Optional[str] = None +MACROS_AS_FUNCTIONS_DEFAULT: bool = True +USE_FUNCTION_NAMES_DEFAULT: bool = True +SHOW_LOG_DEFAULT: bool = False +ADD_IMPORTS_DEFAULT: bool = True +COMMENT_SOLVE_DEFAULT: bool = False +CLEANUP_OUTPUT_DEFAULT: bool = True +HEADER_DEFAULT: bool = True +PRINT_COM_DEFAULT: bool = True +ONLY_COMMANDS_DEFAULT: bool = False +USE_VTK_DEFAULT: Optional[bool] = None +CLEAR_AT_START_DEFAULT: bool = False +CHECK_PARAMETER_NAMES_DEFAULT: bool = True # This commands have "--" as one or some arguments -COMMANDS_WITH_EMPTY_ARGS = { +COMMANDS_WITH_EMPTY_ARGS: Dict[str, Tuple[Any]] = { "/CMA": (), # "/CMAP, "/NER": (), # "/NERR, "/PBF": (), # "/PBF, @@ -114,37 +115,37 @@ } -COMMANDS_TO_NOT_BE_CONVERTED = [ +COMMANDS_TO_NOT_BE_CONVERTED: List[str] = [ "CMPL", # CMPLOT default behaviour does not match the `mapdl.cmplot`'s at the moemnt # CDREAD # commented above ] -FORCED_MAPPING = { +FORCED_MAPPING: Dict[str, str] = { # Forced mapping between MAPDL and PyMAPDL "SECT": "sectype", # Because it is shadowed by `sectinqr` } def convert_script( - filename_in, - filename_out=None, - loglevel="WARNING", - auto_exit=True, - line_ending=None, - exec_file=None, - macros_as_functions=True, - use_function_names=True, - show_log=False, - add_imports=True, - comment_solve=False, - cleanup_output=True, - header=True, - print_com=True, - only_commands=False, - use_vtk=None, - clear_at_start=False, - check_parameter_names=True, -): + filename_in: str, + filename_out: Optional[str] = None, + loglevel: str = "WARNING", + auto_exit: bool = True, + line_ending: Optional[str] = None, + exec_file: Optional[str] = None, + macros_as_functions: bool = True, + use_function_names: bool = True, + show_log: bool = False, + add_imports: bool = True, + comment_solve: bool = False, + cleanup_output: bool = True, + header: bool = True, + print_com: bool = True, + only_commands: bool = False, + use_vtk: Optional[bool] = None, + clear_at_start: bool = False, + check_parameter_names: bool = True, +) -> List[str]: """Converts an ANSYS input file to a python PyMAPDL script. Parameters @@ -287,24 +288,24 @@ def convert_script( def convert_apdl_block( - apdl_strings, - loglevel="WARNING", - auto_exit=True, - line_ending=None, - exec_file=None, - macros_as_functions=True, - use_function_names=True, - show_log=False, - add_imports=True, - comment_solve=False, - cleanup_output=True, - header=True, - print_com=True, - only_commands=False, - use_vtk=None, - clear_at_start=False, - check_parameter_names=False, -): + apdl_strings: str, + loglevel: str = "WARNING", + auto_exit: bool = True, + line_ending: Optional[str] = None, + exec_file: Optional[str] = None, + macros_as_functions: bool = True, + use_function_names: bool = True, + show_log: bool = False, + add_imports: bool = True, + comment_solve: bool = False, + cleanup_output: bool = True, + header: bool = True, + print_com: bool = True, + only_commands: bool = False, + use_vtk: Optional[bool] = None, + clear_at_start: bool = False, + check_parameter_names: bool = False, +) -> List[str]: """Converts an ANSYS input string to a python PyMAPDL string. Parameters @@ -428,67 +429,6 @@ def convert_apdl_block( return translator.lines -def _convert( - apdl_strings, - loglevel="WARNING", - auto_exit=True, - line_ending=None, - exec_file=None, - macros_as_functions=True, - use_function_names=True, - show_log=False, - add_imports=True, - comment_solve=False, - cleanup_output=True, - header=True, - print_com=True, - only_commands=False, - use_vtk=None, - clear_at_start=False, - check_parameter_names=True, -): - if only_commands: - auto_exit = False - add_imports = False - header = False - - translator = FileTranslator( - loglevel, - line_ending, - exec_file=exec_file, - macros_as_functions=macros_as_functions, - use_function_names=use_function_names, - show_log=show_log, - add_imports=add_imports, - comment_solve=comment_solve, - cleanup_output=cleanup_output, - header=header, - print_com=print_com, - use_vtk=use_vtk, - clear_at_start=clear_at_start, - check_parameter_names=check_parameter_names, - ) - - if isinstance(apdl_strings, str): - # os.linesep does not work well, so we are making sure - # the line separation is appropriate. - regx = f"[^\\r]({translator.line_ending})" - if not re.search(regx, apdl_strings): - if "\r\n" in apdl_strings: - translator.line_ending = "\r\n" - elif "\n" in apdl_strings: - translator.line_ending = "\n" - - apdl_strings = apdl_strings.split(translator.line_ending) - - for line in apdl_strings: - translator.translate_line(line) - - if auto_exit and add_imports: - translator.write_exit() - return translator - - class Lines(list): def __init__(self, mute): self._log = Logger("convert_logger") @@ -496,14 +436,14 @@ def __init__(self, mute): self._mute = mute super().__init__() - def append(self, item, mute=True): + def append(self, item: Any, mute: bool = True) -> None: # append the item to itself (the list) if not self._mute and item: stripped_msg = item.replace("\n", "\\n") self._log.info(msg=f"Converted: '{stripped_msg}'") super(Lines, self).append(item) - def _setup_logger(self): + def _setup_logger(self) -> None: stdhdl = StreamHandler() stdhdl.setLevel(10) stdhdl.set_name("stdout") @@ -518,21 +458,21 @@ class FileTranslator: def __init__( self, - loglevel="INFO", - line_ending=None, - exec_file=None, - macros_as_functions=True, - use_function_names=True, - show_log=False, - add_imports=True, - comment_solve=False, - cleanup_output=True, - header=True, - print_com=True, - use_vtk=None, - clear_at_start=False, - check_parameter_names=False, - ): + loglevel: str = "INFO", + line_ending: Optional[str] = None, + exec_file: Optional[str] = None, + macros_as_functions: bool = True, + use_function_names: bool = True, + show_log: bool = False, + add_imports: bool = True, + comment_solve: bool = False, + cleanup_output: bool = True, + header: bool = True, + print_com: bool = True, + use_vtk: Optional[bool] = None, + clear_at_start: bool = False, + check_parameter_names: bool = False, + ) -> None: self._non_interactive_level = 0 self.lines = Lines(mute=not show_log) self._functions = [] @@ -591,7 +531,7 @@ def __init__( self._in_block = False self._block_current_cmd = None - def write_header(self): + def write_header(self) -> None: if isinstance(self._header, bool): if self._header: header = f'"""Script generated by ansys-mapdl-core version {__version__}"""\n' @@ -604,10 +544,10 @@ def write_header(self): "The keyword argument 'header' should be a string or a boolean." ) - def write_exit(self): + def write_exit(self) -> None: self.lines.append(f"\n{self.obj_name}.exit()") - def format_using_autopep8(self, text=None): + def format_using_autopep8(self, text: str = None) -> str: """Format internal `self.lines` with autopep8. Parameters @@ -634,7 +574,7 @@ def format_using_autopep8(self, text=None): # for development purposes return autopep8.fix_code(text) - def save(self, filename, format_autopep8=True): + def save(self, filename, format_autopep8: bool = True) -> None: """Saves lines to file""" if os.path.isfile(filename): os.remove(filename) @@ -649,7 +589,7 @@ def save(self, filename, format_autopep8=True): with open(filename, "w") as f: f.write(self.line_ending.join(self.lines)) - def initialize_mapdl_object(self, loglevel, exec_file): + def initialize_mapdl_object(self, loglevel: str, exec_file: str) -> None: """Initializes ansys object as lines""" core_module = "ansys.mapdl.core" # shouldn't change self.lines.append(f"from {core_module} import launch_mapdl") @@ -675,16 +615,16 @@ def initialize_mapdl_object(self, loglevel, exec_file): self.lines.append(f"{self.obj_name}.clear() # Clearing session") @property - def line_ending(self): + def line_ending(self) -> str: return self._line_ending @line_ending.setter - def line_ending(self, line_ending): + def line_ending(self, line_ending: str) -> None: if line_ending not in ["\n", "\r\n"]: raise ValueError('Line ending must be either "\\n", "\\r\\n"') self._line_ending = line_ending - def translate_line(self, line): + def translate_line(self, line: str) -> Optional[str]: """Converts a single line from an ANSYS APDL script""" if "$" in line: @@ -1001,12 +941,12 @@ def translate_line(self, line): else: self.store_run_command(line.strip()) - def _pymapdl_command(self, command): + def _pymapdl_command(self, command: str) -> str: if command[0] in ["/", "*"]: command = command[1:] return command - def start_function(self, func_name): + def start_function(self, func_name: str) -> None: self._functions.append(func_name) self.store_empty_line() self.store_empty_line() @@ -1029,10 +969,10 @@ def start_function(self, func_name): self.lines.append(line) self.indent = self.indent + " " - def store_under_scored_run_command(self, command): + def store_under_scored_run_command(self, command: str) -> None: self.store_run_command(command, run_underscored=True) - def store_run_command(self, command, run_underscored=False): + def store_run_command(self, command: str, run_underscored: bool = False) -> None: """Stores pyansys.ANSYS command that cannot be broken down into a function and parameters. """ @@ -1078,20 +1018,20 @@ def store_run_command(self, command, run_underscored=False): ) self.lines.append(line) - def store_comment(self): + def store_comment(self) -> None: """Stores a line containing only a comment""" line = f"{self.indent}# {self.comment}" self.lines.append(line) - def store_empty_line(self): + def store_empty_line(self) -> None: """Stores an empty line""" self.lines.append("") - def store_python_command(self, command): + def store_python_command(self, command: str) -> None: line = f"{self.indent}{command}" self.lines.append(line) - def _parse_arguments(self, parameters): + def _parse_arguments(self, parameters: List[str]) -> str: parsed_parameters = [] for parameter in parameters: parameter = parameter.strip() @@ -1109,7 +1049,7 @@ def _parse_arguments(self, parameters): return ", ".join(parsed_parameters) - def store_command(self, function, parameters): + def store_command(self, function: Callable, parameters: List[str]) -> None: """Stores a valid pyansys function with parameters""" parameter_str = self._parse_arguments(parameters) @@ -1131,7 +1071,7 @@ def store_command(self, function, parameters): self.lines.append(line) - def start_non_interactive(self): + def start_non_interactive(self) -> None: self._non_interactive_level += 1 if self.non_interactive: return @@ -1140,13 +1080,13 @@ def start_non_interactive(self): self.non_interactive = True self.indent = self.indent + " " - def end_non_interactive(self): + def end_non_interactive(self) -> None: self._non_interactive_level -= 1 if self._non_interactive_level <= 0: self.indent = self.indent[4:] self.non_interactive = False - def start_chained_commands(self): + def start_chained_commands(self) -> None: self._chained_commands += 1 if self.chained_commands: return @@ -1155,13 +1095,13 @@ def start_chained_commands(self): self.chained_commands = True self.indent = self.indent + " " - def end_chained_commands(self): + def end_chained_commands(self) -> None: self._chained_commands -= 1 if self._chained_commands <= 0: self.indent = self.indent[4:] self.chained_commands = False - def output_to_file(self, line): + def output_to_file(self, line: str) -> bool: """Return if an APDL line is redirecting to a file.""" if line[:4].upper() == "/OUT": # We are redirecting the output to somewhere, probably a file. @@ -1182,7 +1122,7 @@ def output_to_file(self, line): return False - def output_to_default(self, line): + def output_to_default(self, line: str) -> bool: if line[:4].upper() == "/OUT": # We are redirecting the output to somewhere, probably a file. # Because of the problem with the ansys output, we need to execute @@ -1201,7 +1141,7 @@ def output_to_default(self, line): return False - def _get_items(self, line_): + def _get_items(self, line_: str) -> List[str]: """Parse the line items (comma separated elements) but ignoring the ones inside parenthesis, or brackets""" parenthesis_count = 0 @@ -1225,7 +1165,7 @@ def _get_items(self, line_): return items - def _get_valid_pymapdl_methods_short(self): + def _get_valid_pymapdl_methods_short(self) -> List[str]: pymethods = dir(Commands) reduced_list = [] @@ -1240,9 +1180,70 @@ def _get_valid_pymapdl_methods_short(self): reduced_list.append(each_method[:4]) return reduced_list - def find_match(self, cmd): + def find_match(self, cmd: str) -> str: pymethods = sorted(dir(Commands)) for each in pymethods: if each.startswith(cmd): return each + + +def _convert( + apdl_strings: str, + loglevel: str = "WARNING", + auto_exit: bool = True, + line_ending: Optional[str] = None, + exec_file: Optional[str] = None, + macros_as_functions: bool = True, + use_function_names: bool = True, + show_log: bool = False, + add_imports: bool = True, + comment_solve: bool = False, + cleanup_output: bool = True, + header: bool = True, + print_com: bool = True, + only_commands: bool = False, + use_vtk: Optional[bool] = None, + clear_at_start: bool = False, + check_parameter_names: bool = False, +) -> FileTranslator: + if only_commands: + auto_exit = False + add_imports = False + header = False + + translator = FileTranslator( + loglevel, + line_ending, + exec_file=exec_file, + macros_as_functions=macros_as_functions, + use_function_names=use_function_names, + show_log=show_log, + add_imports=add_imports, + comment_solve=comment_solve, + cleanup_output=cleanup_output, + header=header, + print_com=print_com, + use_vtk=use_vtk, + clear_at_start=clear_at_start, + check_parameter_names=check_parameter_names, + ) + + if isinstance(apdl_strings, str): + # os.linesep does not work well, so we are making sure + # the line separation is appropriate. + regx = f"[^\\r]({translator.line_ending})" + if not re.search(regx, apdl_strings): + if "\r\n" in apdl_strings: + translator.line_ending = "\r\n" + elif "\n" in apdl_strings: + translator.line_ending = "\n" + + apdl_strings = apdl_strings.split(translator.line_ending) + + for line in apdl_strings: + translator.translate_line(line) + + if auto_exit and add_imports: + translator.write_exit() + return translator diff --git a/src/ansys/mapdl/core/errors.py b/src/ansys/mapdl/core/errors.py index ebbffcfa53..65c3172a65 100644 --- a/src/ansys/mapdl/core/errors.py +++ b/src/ansys/mapdl/core/errors.py @@ -25,16 +25,16 @@ import signal import threading from time import sleep -from typing import Callable, Optional +from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple import grpc from ansys.mapdl.core import LOG as logger -SIGINT_TRACKER = [] +SIGINT_TRACKER: List = [] -LOCKFILE_MSG = """ +LOCKFILE_MSG: str = """ Another ANSYS job with the same job name is already running in this directory, or the lock file has not been deleted from an abnormally terminated ANSYS run. @@ -44,7 +44,7 @@ """ -TYPE_MSG = ( +TYPE_MSG: str = ( "Invalid datatype. Must be one of the following:\n" + "np.int32, np.int64, or np.double" ) @@ -286,7 +286,7 @@ def handler(sig, frame): # pragma: no cover SIGINT_TRACKER.append(True) -def protect_grpc(func): +def protect_grpc(func: Callable) -> Callable: """Capture gRPC exceptions and return a more succinct error message Capture KeyboardInterrupt to avoid segfaulting MAPDL. @@ -390,7 +390,7 @@ def wrapper(*args, **kwargs): return wrapper -def retrieve_mapdl_from_args(args): +def retrieve_mapdl_from_args(args: Iterable[Any]) -> "Mapdl": # can't use isinstance here due to circular imports try: class_name = args[0].__class__.__name__ @@ -405,7 +405,14 @@ def retrieve_mapdl_from_args(args): return mapdl -def handle_generic_grpc_error(error, func, args, kwargs, reason="", suggestion=""): +def handle_generic_grpc_error( + error: Exception, + func: Callable, + args: Tuple[Any], + kwargs: Dict[Any, Any], + reason: str = "", + suggestion: str = "", +): """Handle non-custom gRPC errors""" mapdl = retrieve_mapdl_from_args(args) diff --git a/src/ansys/mapdl/core/examples/downloads.py b/src/ansys/mapdl/core/examples/downloads.py index 67c793e091..e8acc07aee 100644 --- a/src/ansys/mapdl/core/examples/downloads.py +++ b/src/ansys/mapdl/core/examples/downloads.py @@ -25,20 +25,17 @@ from functools import wraps import os import shutil +from typing import Callable, Dict, Optional import zipfile -try: - import requests - - _HAS_REQUESTS = True - -except ModuleNotFoundError: - _HAS_REQUESTS = False - from ansys.mapdl import core as pymapdl +from ansys.mapdl.core import _HAS_REQUESTS + +if _HAS_REQUESTS: + import requests -def check_directory_exist(directory): +def check_directory_exist(directory: str) -> Callable: # Wrapping LISTING FUNCTIONS. def wrap_function(func): @wraps(func) @@ -54,13 +51,13 @@ def inner_wrapper(*args, **kwargs): return wrap_function -def get_ext(filename): +def get_ext(filename: str) -> str: """Extract the extension of the filename""" ext = os.path.splitext(filename)[1].lower() return ext -def delete_downloads(): +def delete_downloads() -> bool: """Delete all downloaded examples to free space or update the files""" if os.path.exists(pymapdl.EXAMPLES_PATH): shutil.rmtree(pymapdl.EXAMPLES_PATH) @@ -68,13 +65,13 @@ def delete_downloads(): @check_directory_exist(pymapdl.EXAMPLES_PATH) -def _decompress(filename): +def _decompress(filename: str) -> None: zip_ref = zipfile.ZipFile(filename, "r") zip_ref.extractall(pymapdl.EXAMPLES_PATH) return zip_ref.close() -def _get_file_url(filename, directory=None): +def _get_file_url(filename: str, directory: Optional[str] = None) -> str: if directory: return ( f"https://github.com/ansys/example-data/raw/master/{directory}/{filename}" @@ -82,14 +79,14 @@ def _get_file_url(filename, directory=None): return f"https://github.com/ansys/example-data/raw/master/{filename}" -def _check_url_exist(url): +def _check_url_exist(url: str) -> bool: response = requests.get(url, timeout=10) # 10 seconds timeout return response.status_code == 200 @check_directory_exist(pymapdl.EXAMPLES_PATH) -def _retrieve_file(url, filename, _test=False): - # scape test +def _retrieve_file(url: str, filename: str, _test: bool = False) -> str: + # escape test if pymapdl.RUNNING_TESTS: return _check_url_exist(url) @@ -112,7 +109,9 @@ def _retrieve_file(url, filename, _test=False): return local_path -def _download_file(filename, directory=None, _test=False): +def _download_file( + filename: str, directory: Optional[str] = None, _test: Optional[bool] = False +) -> str: url = _get_file_url(filename, directory) try: return _retrieve_file(url, filename, _test) @@ -127,7 +126,7 @@ def _download_file(filename, directory=None, _test=False): ) -def download_bracket(): +def download_bracket() -> str: """Download an IGS bracket. Examples @@ -141,27 +140,27 @@ def download_bracket(): return _download_file("bracket.iges", "geometry") -def download_tech_demo_data(example, filename): +def download_tech_demo_data(example: str, filename: str) -> str: """Download Tech Demos external data.""" example = "tech_demos/" + example return _download_file(filename=filename, directory=example) -def download_vtk_rotor(): +def download_vtk_rotor() -> str: """Download rotor vtk file.""" return _download_file("rotor.vtk", "geometry") -def _download_rotor_tech_demo_vtk(): +def _download_rotor_tech_demo_vtk() -> str: """Download the rotor surface VTK file.""" return _download_file("rotor2.vtk", "geometry") -def download_example_data(filename, directory=None): +def download_example_data(filename: str, directory: Optional[str] = None) -> str: return _download_file(filename, directory=directory) -def download_manifold_example_data() -> dict: +def download_manifold_example_data() -> Dict[str, str]: """Download the manifold example data and return the download paths into a dictionary domain id->path. Examples files are downloaded to a persistent cache to avoid @@ -193,7 +192,7 @@ def download_manifold_example_data() -> dict: } -def download_cfx_mapping_example_data() -> dict: +def download_cfx_mapping_example_data() -> Dict[str, str]: """Download the CFX mapping data and return the download paths into a dictionary domain id->path. Examples files are downloaded to a persistent cache to avoid diff --git a/src/ansys/mapdl/core/examples/examples.py b/src/ansys/mapdl/core/examples/examples.py index bbb8a2715e..d8d60e7003 100644 --- a/src/ansys/mapdl/core/examples/examples.py +++ b/src/ansys/mapdl/core/examples/examples.py @@ -23,20 +23,13 @@ """pymapdl examples""" import os -from ansys.mapdl.core.plotting.theme import PyMAPDL_cmap - # get location of this folder and the example files -dir_path = os.path.dirname(os.path.realpath(__file__)) +dir_path: str = os.path.dirname(os.path.realpath(__file__)) # add any files you'd like to import here. For example: -wing_model = os.path.join(dir_path, "wing.dat") +wing_model: str = os.path.join(dir_path, "wing.dat") # be sure to add the input file directly in this directory # This way, files can be loaded with: # from ansys.mapdl.core import examples # examples.wing_model - - -def ansys_colormap(): - """Return the default ansys color map made of 9 colours (blue-green-red).""" - return PyMAPDL_cmap diff --git a/src/ansys/mapdl/core/examples/verif_files.py b/src/ansys/mapdl/core/examples/verif_files.py index 7a6ccb2ccd..327c4f8989 100755 --- a/src/ansys/mapdl/core/examples/verif_files.py +++ b/src/ansys/mapdl/core/examples/verif_files.py @@ -25,14 +25,18 @@ import glob import inspect import os +from typing import Dict -module_path = os.path.dirname(inspect.getfile(inspect.currentframe())) +module_path: str = os.path.dirname(inspect.getfile(inspect.currentframe())) -def load_vmfiles(): +def load_vmfiles() -> Dict[str, str]: """load vmfiles and store their filenames""" vmfiles = {} verif_path = os.path.join(module_path, "verif") + if not os.path.exists(verif_path): + return {} + for filename in glob.glob(os.path.join(verif_path, "*dat")): basename = os.path.basename(filename) vmname = os.path.splitext(basename)[0] @@ -42,7 +46,4 @@ def load_vmfiles(): # save the module from failing if the verification files are unavailable. -try: - vmfiles = load_vmfiles() -except: - vmfiles = [] +vmfiles: Dict[str, str] = load_vmfiles() diff --git a/src/ansys/mapdl/core/information.py b/src/ansys/mapdl/core/information.py index 1a9cb81789..3cd447a4a2 100644 --- a/src/ansys/mapdl/core/information.py +++ b/src/ansys/mapdl/core/information.py @@ -22,13 +22,14 @@ from functools import wraps import re +from typing import Callable, List, Optional import weakref from ansys.mapdl import core as pymapdl from ansys.mapdl.core.errors import MapdlExitedError -def update_information_first(update=False): +def update_information_first(update: bool = False) -> Callable: """ Decorator to wrap :class:`Information ` methods to force update the fields when accessed. @@ -86,7 +87,7 @@ class Information: """ - def __init__(self, mapdl): + def __init__(self, mapdl: "Mapdl") -> None: """Class Initializer""" from ansys.mapdl.core.mapdl import MapdlBase # lazy import to avoid circular @@ -102,11 +103,11 @@ def __init__(self, mapdl): } @property - def _mapdl(self): + def _mapdl(self) -> "Mapdl": """Return the weakly referenced MAPDL instance.""" return self._mapdl_weakref() - def _update(self): + def _update(self) -> None: """We might need to do more calls if we implement properties that change over the MAPDL session.""" try: @@ -122,7 +123,7 @@ def _update(self): self._stats = stats self._mapdl._log.debug("Information class: Updated") - def __repr__(self): + def __repr__(self) -> str: if self._mapdl.is_console and self._mapdl.exited: return "MAPDL exited" @@ -138,92 +139,92 @@ def __repr__(self): @property @update_information_first(False) - def product(self): + def product(self) -> str: """Retrieve the product from the MAPDL instance.""" return self._get_product() @property @update_information_first(False) - def mapdl_version(self): + def mapdl_version(self) -> str: """Retrieve the MAPDL version from the MAPDL instance.""" return self._get_mapdl_version() @property @update_information_first(False) - def mapdl_version_release(self): + def mapdl_version_release(self) -> str: """Retrieve the MAPDL version release from the MAPDL instance.""" st = self._get_mapdl_version() return self._get_between("RELEASE", "BUILD", st).strip() @property @update_information_first(False) - def mapdl_version_build(self): + def mapdl_version_build(self) -> str: """Retrieve the MAPDL version build from the MAPDL instance.""" st = self._get_mapdl_version() return self._get_between("BUILD", "UPDATE", st).strip() @property @update_information_first(False) - def mapdl_version_update(self): + def mapdl_version_update(self) -> str: """Retrieve the MAPDL version update from the MAPDL instance.""" st = self._get_mapdl_version() return self._get_between("UPDATE", "", st).strip() @property @update_information_first(False) - def pymapdl_version(self): + def pymapdl_version(self) -> str: """Retrieve the PyMAPDL version from the MAPDL instance.""" return self._get_pymapdl_version() @property @update_information_first(False) - def products(self): + def products(self) -> str: """Retrieve the products from the MAPDL instance.""" return self._get_products() @property @update_information_first(False) - def preprocessing_capabilities(self): + def preprocessing_capabilities(self) -> str: """Retrieve the preprocessing capabilities from the MAPDL instance.""" return self._get_preprocessing_capabilities() @property @update_information_first(False) - def aux_capabilities(self): + def aux_capabilities(self) -> str: """Retrieve the aux capabilities from the MAPDL instance.""" return self._get_aux_capabilities() @property @update_information_first(True) - def solution_options(self): + def solution_options(self) -> str: """Retrieve the solution options from the MAPDL instance.""" return self._get_solution_options() @property @update_information_first(False) - def post_capabilities(self): + def post_capabilities(self) -> str: """Retrieve the post capabilities from the MAPDL instance.""" return self._get_post_capabilities() @property @update_information_first(True) - def titles(self): + def titles(self) -> str: """Retrieve the titles from the MAPDL instance.""" return self._get_titles() @property @update_information_first(True) - def title(self): + def title(self) -> str: """Retrieve and set the title from the MAPDL instance.""" return self._mapdl.inquire("", "title") @title.setter - def title(self, title): + def title(self, title) -> str: return self._mapdl.run(f"/TITLE, {title}") @property @update_information_first(True) - def stitles(self, i=None): + def stitles(self, i: int = None) -> str: """Retrieve or set the value for the MAPDL stitle (subtitles). If 'stitle' includes newline characters (`\\n`), then each line @@ -241,7 +242,7 @@ def stitles(self, i=None): return self._get_stitles()[i] @stitles.setter - def stitles(self, stitle, i=None): + def stitles(self, stitle: str, i: int = None) -> None: if stitle is None: # Case to empty stitle = ["", "", "", ""] @@ -268,71 +269,76 @@ def stitles(self, stitle, i=None): @property @update_information_first(True) - def units(self): + def units(self) -> str: """Retrieve the units from the MAPDL instance.""" return self._get_units() @property @update_information_first(True) - def scratch_memory_status(self): + def scratch_memory_status(self) -> str: """Retrieve the scratch memory status from the MAPDL instance.""" return self._get_scratch_memory_status() @property @update_information_first(True) - def database_status(self): + def database_status(self) -> str: """Retrieve the database status from the MAPDL instance.""" return self._get_database_status() @property @update_information_first(True) - def config_values(self): + def config_values(self) -> str: """Retrieve the config values from the MAPDL instance.""" return self._get_config_values() @property @update_information_first(True) - def global_status(self): + def global_status(self) -> str: """Retrieve the global status from the MAPDL instance.""" return self._get_global_status() @property @update_information_first(True) - def job_information(self): + def job_information(self) -> str: """Retrieve the job information from the MAPDL instance.""" return self._get_job_information() @property @update_information_first(True) - def model_information(self): + def model_information(self) -> str: """Retrieve the model information from the MAPDL instance.""" return self._get_model_information() @property @update_information_first(True) - def boundary_condition_information(self): + def boundary_condition_information(self) -> str: """Retrieve the boundary condition information from the MAPDL instance.""" return self._get_boundary_condition_information() @property @update_information_first(True) - def routine_information(self): + def routine_information(self) -> str: """Retrieve the routine information from the MAPDL instance.""" return self._get_routine_information() @property @update_information_first(True) - def solution_options_configuration(self): + def solution_options_configuration(self) -> str: """Retrieve the solution options configuration from the MAPDL instance.""" return self._get_solution_options_configuration() @property @update_information_first(True) - def load_step_options(self): + def load_step_options(self) -> str: """Retrieve the load step options from the MAPDL instance.""" return self._get_load_step_options() - def _get_between(self, init_string, end_string=None, string=None): + def _get_between( + self, + init_string: str, + end_string: Optional[str] = None, + string: Optional[str] = None, + ) -> str: if not string: self._update() string = self._stats @@ -345,24 +351,24 @@ def _get_between(self, init_string, end_string=None, string=None): en = string.find(end_string) return "\n".join(string[st:en].splitlines()).strip() - def _get_product(self): + def _get_product(self) -> str: return self._get_products().splitlines()[0] - def _get_mapdl_version(self): + def _get_mapdl_version(self) -> str: titles_ = self._get_titles() st = titles_.find("RELEASE") en = titles_.find("INITIAL", st) return titles_[st:en].split("CUSTOMER")[0].strip() - def _get_pymapdl_version(self): + def _get_pymapdl_version(self) -> str: return pymapdl.__version__ - def _get_title(self): + def _get_title(self) -> str: match = re.match(r"TITLE=(.*)$", self._get_titles()) if match: return match.groups(1)[0].strip() - def _get_stitles(self): + def _get_stitles(self) -> List[str]: return [ ( re.search(f"SUBTITLE {i}=(.*)", self._get_titles()) @@ -374,87 +380,87 @@ def _get_stitles(self): for i in range(1, 5) ] - def _get_products(self): + def _get_products(self) -> str: init_ = "*** Products ***" end_string = "*** PreProcessing Capabilities ***" return self._get_between(init_, end_string) - def _get_preprocessing_capabilities(self): + def _get_preprocessing_capabilities(self) -> str: init_ = "*** PreProcessing Capabilities ***" end_string = "*** Aux Capabilities ***" return self._get_between(init_, end_string) - def _get_aux_capabilities(self): + def _get_aux_capabilities(self) -> str: init_ = "*** Aux Capabilities ***" end_string = "*** Solution Options ***" return self._get_between(init_, end_string) - def _get_solution_options(self): + def _get_solution_options(self) -> str: init_ = "*** Solution Options ***" end_string = "*** Post Capabilities ***" return self._get_between(init_, end_string) - def _get_post_capabilities(self): + def _get_post_capabilities(self) -> str: init_ = "*** Post Capabilities ***" end_string = "***** TITLES *****" return self._get_between(init_, end_string) - def _get_titles(self): + def _get_titles(self) -> str: init_ = "***** TITLES *****" end_string = "***** UNITS *****" return self._get_between(init_, end_string) - def _get_units(self): + def _get_units(self) -> str: init_ = "***** UNITS *****" end_string = "***** SCRATCH MEMORY STATUS *****" return self._get_between(init_, end_string) - def _get_scratch_memory_status(self): + def _get_scratch_memory_status(self) -> str: init_ = "***** SCRATCH MEMORY STATUS *****" end_string = "***** DATABASE STATUS *****" return self._get_between(init_, end_string) - def _get_database_status(self): + def _get_database_status(self) -> str: init_ = "***** DATABASE STATUS *****" end_string = "***** CONFIG VALUES *****" return self._get_between(init_, end_string) - def _get_config_values(self): + def _get_config_values(self) -> str: init_ = "***** CONFIG VALUES *****" end_string = "G L O B A L S T A T U S" return self._get_between(init_, end_string) - def _get_global_status(self): + def _get_global_status(self) -> str: init_ = "G L O B A L S T A T U S" end_string = "J O B I N F O R M A T I O N" return self._get_between(init_, end_string) - def _get_job_information(self): + def _get_job_information(self) -> str: init_ = "J O B I N F O R M A T I O N" end_string = "M O D E L I N F O R M A T I O N" return self._get_between(init_, end_string) - def _get_model_information(self): + def _get_model_information(self) -> str: init_ = "M O D E L I N F O R M A T I O N" end_string = "B O U N D A R Y C O N D I T I O N I N F O R M A T I O N" return self._get_between(init_, end_string) - def _get_boundary_condition_information(self): + def _get_boundary_condition_information(self) -> str: init_ = "B O U N D A R Y C O N D I T I O N I N F O R M A T I O N" end_string = "R O U T I N E I N F O R M A T I O N" return self._get_between(init_, end_string) - def _get_routine_information(self): + def _get_routine_information(self) -> str: init_ = "R O U T I N E I N F O R M A T I O N" end_string = None return self._get_between(init_, end_string) - def _get_solution_options_configuration(self): + def _get_solution_options_configuration(self) -> str: init_ = "S O L U T I O N O P T I O N S" end_string = "L O A D S T E P O P T I O N S" return self._get_between(init_, end_string) - def _get_load_step_options(self): + def _get_load_step_options(self) -> str: init_ = "L O A D S T E P O P T I O N S" end_string = None return self._get_between(init_, end_string) diff --git a/src/ansys/mapdl/core/inline_functions/connectivity_queries.py b/src/ansys/mapdl/core/inline_functions/connectivity_queries.py index a39fc9d432..1314e05d0b 100644 --- a/src/ansys/mapdl/core/inline_functions/connectivity_queries.py +++ b/src/ansys/mapdl/core/inline_functions/connectivity_queries.py @@ -26,7 +26,7 @@ class _ConnectivityQueries(_QueryExecution): _mapdl = None - def nelem(self, e, npos) -> int: + def nelem(self, e: int, npos: int) -> int: """Return the number of the node at position ``npos`` in element ``e``. Returns the node number in position `npos` for element number ``e``. @@ -64,7 +64,7 @@ def nelem(self, e, npos) -> int: """ return self._run_query(f"NELEM({e},{npos})", integer=True) - def enextn(self, n, loc) -> int: + def enextn(self, n: int, loc: int) -> int: """Returns the ``loc`` element connected to node ``n``. Returns the element connected to node ``n``. ``loc`` is the position diff --git a/src/ansys/mapdl/core/inline_functions/core.py b/src/ansys/mapdl/core/inline_functions/core.py index 65d7d59d9e..44032cc8c6 100644 --- a/src/ansys/mapdl/core/inline_functions/core.py +++ b/src/ansys/mapdl/core/inline_functions/core.py @@ -102,12 +102,12 @@ def _run_query(self, command: str, integer: bool) -> Union[int, float]: return self._parse_parameter_integer_response(resp) return self._parse_parameter_float_response(resp) - def _parse_parameter_integer_response(self, response) -> int: + def _parse_parameter_integer_response(self, response: str) -> int: """Parse integer response.""" return int(self._parse_parameter_float_response(response)) @staticmethod - def _parse_parameter_float_response(response) -> float: + def _parse_parameter_float_response(response: str) -> float: if "PARAMETER" not in response or "=" not in response: raise TypeError(f"Parameter response not recognised: " f'"{response}"') parts = response.rsplit("=", 1) diff --git a/src/ansys/mapdl/core/inline_functions/geometry_queries.py b/src/ansys/mapdl/core/inline_functions/geometry_queries.py index a9c3d14a4d..eb44ea59ef 100644 --- a/src/ansys/mapdl/core/inline_functions/geometry_queries.py +++ b/src/ansys/mapdl/core/inline_functions/geometry_queries.py @@ -26,7 +26,7 @@ class _AngleQueries(_QueryExecution): _mapdl = None - def anglen(self, n1, n2, n3) -> float: + def anglen(self, n1: int, n2: int, n3: int) -> float: """Return the angle between 3 nodes where ``n1`` is the vertex. Subtended angle between two lines (defined by three @@ -66,7 +66,7 @@ def anglen(self, n1, n2, n3) -> float: """ return self._run_query(f"ANGLEN({n1},{n2},{n3})", integer=False) - def anglek(self, k1, k2, k3) -> float: + def anglek(self, k1: int, k2: int, k3: int) -> float: """Return the angle between 3 keypoints where ``k1`` is the vertex. Subtended angle between two lines (defined by three @@ -111,7 +111,7 @@ def anglek(self, k1, k2, k3) -> float: class _AreaQueries(_QueryExecution): _mapdl = None - def areand(self, n1, n2, n3) -> float: + def areand(self, n1: int, n2: int, n3: int) -> float: """Area of the triangle with vertices at nodes ``n1``, ``n2``, and ``n3``. Parameters @@ -143,7 +143,7 @@ def areand(self, n1, n2, n3) -> float: """ return self._run_query(f"AREAND({n1},{n2},{n3})", integer=False) - def areakp(self, k1, k2, k3) -> float: + def areakp(self, k1: int, k2: int, k3: int) -> float: """Area of the triangle with vertices at keypoints ``k1``, ``k2``, and ``k3``. Parameters @@ -179,7 +179,7 @@ def areakp(self, k1, k2, k3) -> float: class _DistanceQueries(_QueryExecution): _mapdl = None - def distnd(self, n1, n2) -> float: + def distnd(self, n1: int, n2: int) -> float: """Compute the distance between nodes ``n1`` and ``n2``. Parameters @@ -208,7 +208,7 @@ def distnd(self, n1, n2) -> float: """ return self._run_query(f"DISTND({n1},{n2})", integer=False) - def distkp(self, k1, k2) -> float: + def distkp(self, k1: int, k2: int) -> float: """Compute the distance between keypoints ``k1`` and ``k2``. Parameters diff --git a/src/ansys/mapdl/core/jupyter.py b/src/ansys/mapdl/core/jupyter.py index 754ac92280..3ccec5e20d 100644 --- a/src/ansys/mapdl/core/jupyter.py +++ b/src/ansys/mapdl/core/jupyter.py @@ -31,11 +31,11 @@ ) -MAX_CPU = 128 -MAX_MEM = 256 +MAX_CPU: int = 128 +MAX_MEM: int = 256 -def check_manager(): +def check_manager() -> None: try: # response = manager.ping() manager.ping() @@ -44,14 +44,14 @@ def check_manager(): def launch_mapdl_on_cluster( - nproc=2, - memory=4, - loglevel="ERROR", - additional_switches="", - verbose=False, - start_timeout=600, - tag="latest", -): + nproc: int = 2, + memory: int = 4, + loglevel: str = "ERROR", + additional_switches: str = "", + verbose: bool = False, + start_timeout: int = 600, + tag: str = "latest", +) -> "Mapdl": """Start MAPDL on the ANSYS jupyter cluster in gRPC mode. Parameters diff --git a/src/ansys/mapdl/core/krylov.py b/src/ansys/mapdl/core/krylov.py index 9f2ebb6333..c035c82968 100644 --- a/src/ansys/mapdl/core/krylov.py +++ b/src/ansys/mapdl/core/krylov.py @@ -21,13 +21,26 @@ # SOFTWARE. import os +from typing import List, Literal, Optional, Tuple, Union import weakref +from ansys.math.core.math import AnsMath, AnsVec import numpy as np from ansys.mapdl.core import Mapdl from ansys.mapdl.core.errors import MapdlRuntimeError +RESIDUAL_ALGORITHM: List[str] = [ + "l-inf", + "linf", + "l-1", + "l1", + "l-2", + "l2", +] + +RESIDUAL_ALGORITHM_LITERAL = Literal[tuple(RESIDUAL_ALGORITHM)] + class KrylovSolver: """Abstract mapdl krylov class. Created from a ``Mapdl`` instance. @@ -94,11 +107,11 @@ def __init__(self, mapdl: Mapdl): self.orthogonality = None @property - def _mapdl(self): + def _mapdl(self) -> Mapdl: """Return the weakly referenced instance of mapdl.""" return self._mapdl_weakref() - def _check_full_file_exists(self, full_file=None): + def _check_full_file_exists(self, full_file: str = None) -> None: """Check full file exists.""" current_dir = self._mapdl.directory # Check if full file exists @@ -120,7 +133,7 @@ def _check_full_file_exists(self, full_file=None): ) @property - def is_orthogonal(self): + def is_orthogonal(self) -> bool: """ Check whether the solution is orthogonal. @@ -133,7 +146,9 @@ def is_orthogonal(self): eye_ = np.eye(N=self.orthogonality.shape[0]) return np.allclose(self.orthogonality, eye_) - def _check_input_gensubspace(self, max_dim_q, freq_val, check_orthogonality): + def _check_input_gensubspace( + self, max_dim_q: int, freq_val: int, check_orthogonality: bool + ): """Validate the inputs to the ``gensubspace`` method.""" # Check for illegal input values by the user @@ -154,7 +169,9 @@ def _check_input_gensubspace(self, max_dim_q, freq_val, check_orthogonality): "True or False" ) - def _check_input_solve(self, freq_start, freq_end, freq_steps, ramped_load): + def _check_input_solve( + self, freq_start: int, freq_end: int, freq_steps: int, ramped_load: bool + ): """Validate the inputs to the ``solve`` method.""" if not isinstance(freq_start, int) or freq_start < 0: @@ -182,7 +199,10 @@ def _check_input_solve(self, freq_start, freq_end, freq_steps, ramped_load): ) def _check_input_expand( - self, return_solution, residual_computation, residual_algorithm + self, + return_solution: bool, + residual_computation: bool, + residual_algorithm: RESIDUAL_ALGORITHM_LITERAL, ): """Validate the inputs to the ``expand`` method.""" @@ -192,21 +212,15 @@ def _check_input_expand( ) if not isinstance(residual_computation, bool): raise ValueError("The 'residual_computation' must be True or False.") - if not isinstance( - residual_algorithm, str - ) or residual_algorithm.lower() not in [ - "l-inf", - "linf", - "l-1", - "l1", - "l-2", - "l2", - ]: + if ( + not isinstance(residual_algorithm, str) + or residual_algorithm.lower() not in RESIDUAL_ALGORITHM + ): raise ValueError( "The provided 'residual_algorithm' is not allowed. Only allowed are 'L-inf', 'Linf', 'L-1', 'L1', 'L-2', 'L2'." ) - def _get_data_from_full_file(self): + def _get_data_from_full_file(self) -> None: """Extract stiffness, mass, damping, and force matrices from the FULL file.""" self._mat_k = self.mm.stiff(fname=self.full_file) @@ -221,7 +235,7 @@ def _get_data_from_full_file(self): self._mapdl.vec("fz0", "Z", "COPY", "fz") self.fz0 = self.mm.vec(name="fz0") - def _calculate_orthogonality(self, uz, num_q): + def _calculate_orthogonality(self, uz: AnsVec, num_q: int): """Check Orthonormality of vectors""" if self.orthogonality is not None: @@ -246,8 +260,12 @@ def _calculate_orthogonality(self, uz, num_q): return self.orthogonality def gensubspace( - self, max_dim_q, frequency, check_orthogonality=False, full_file=None - ): + self, + max_dim_q: int, + frequency: int, + check_orthogonality: bool = False, + full_file: Optional[str] = None, + ) -> AnsMath: """Generate a Krylov subspace for model reduction in a harmonic analysis. This method generates a Krylov subspace used for a model reduction @@ -406,7 +424,9 @@ def gensubspace( self._run_gensubspace = True return self.Qz - def solve(self, freq_start, freq_end, freq_steps, ramped_load=True): + def solve( + self, freq_start: str, freq_end: str, freq_steps: str, ramped_load: bool = True + ) -> AnsMath: """Reduce the system of equations and solve at each frequency. This method uses a Krylov subspace to solve a reduced harmonic @@ -516,11 +536,11 @@ def solve(self, freq_start, freq_end, freq_steps, ramped_load=True): def expand( self, - residual_computation=False, - residual_algorithm=None, - compute_solution_vectors=True, - return_solution=False, - ): + residual_computation: bool = False, + residual_algorithm: Optional[RESIDUAL_ALGORITHM_LITERAL] = None, + compute_solution_vectors: bool = True, + return_solution: bool = False, + ) -> np.ndarray: """Expand the reduced solution back to FE space. This method expands the reduced solution for a harmonic analysis @@ -637,7 +657,9 @@ def expand( if return_solution: return self.solution_vectors - def compute_residuals(self, iFreq, RzV, Xi, omega): + def compute_residuals( + self, iFreq: int, RzV: AnsMath, Xi: AnsMath, omega: float + ) -> Tuple[float]: """Compute residuals of the matrices""" # form {iRHS} self.iRHS.zeros() @@ -699,7 +721,9 @@ def compute_residuals(self, iFreq, RzV, Xi, omega): return norm_rz, norm_fz - def _compute_solution_vector(self, Xi): + def _compute_solution_vector( + self, Xi: AnsMath + ) -> List[Tuple[Union[int, int, complex]]]: self._mapdl.mult( m1=self.Nod2Solv.id, t1="TRANS", m2=Xi.id, t2="", m3="Xii" ) # Map {Xi} to internal (ANSYS) order diff --git a/tests/test_examples.py b/tests/test_examples.py index cbe980656e..43b769776a 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -171,20 +171,20 @@ def test_detach_examples_submodule(): """ import sys -assert 'ansys.mapdl.core' not in sys.modules -assert 'requests' not in sys.modules -assert 'ansys.mapdl.core.examples' not in sys.modules +assert 'ansys.mapdl.core' not in sys.modules, 'PyMAPDL is loaded!' +assert 'requests' not in sys.modules, 'Requests is loaded!' +assert 'ansys.mapdl.core.examples' not in sys.modules, 'Examples is loaded!' from ansys.mapdl import core as pymapdl -assert 'ansys.mapdl.core' in sys.modules -assert 'ansys.mapdl.core.examples' not in sys.modules -assert 'requests' not in sys.modules +assert 'ansys.mapdl.core' in sys.modules, 'PyMAPDL is not loaded!' +assert 'ansys.mapdl.core.examples' not in sys.modules, 'Examples is loaded!' +assert 'requests' in sys.modules, 'Requests is loaded!' from ansys.mapdl.core.examples import vmfiles -assert 'ansys.mapdl.core.examples' in sys.modules -assert 'requests' in sys.modules +assert 'ansys.mapdl.core.examples' in sys.modules, 'examples is not loaded!' +assert 'requests' in sys.modules, 'requests is not loaded!' print('Everything went well') """.strip() @@ -198,3 +198,11 @@ def test_detach_examples_submodule(): out = p.communicate()[0].decode() assert out.strip() == "Everything went well" + + +def test_external_models(): + from ansys.mapdl.core.examples import examples + + for each in dir(examples): + if each not in ["os", "dir_path"] and not each.startswith("__"): + obj = getattr(examples, each) From 4f75f6a24f8db714c21b7e0b8e7499c044363fb2 Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Thu, 19 Dec 2024 18:35:01 +0100 Subject: [PATCH 04/17] ci: adding ubuntu 251 and 252 (#3626) * ci: adding ubuntu 251 and 252. * chore: adding changelog file 3626.maintenance.md [dependabot-skip] * ci: fix latest * test: removing database testing * feat: skipping test database on 25.2 and on CICD. * tests: skipping dpf on 252 * feat: adding students * feat: skipping all the db tests * ci: removing v25.2 since it is in latest * ci: increasing timeout * chore: adding changelog file 3626.dependencies.md [dependabot-skip] --------- Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> --- .ci/build_matrix.sh | 3 +++ .github/workflows/ci.yml | 4 ++-- doc/changelog.d/3626.dependencies.md | 1 + pyproject.toml | 2 +- tests/test_database.py | 8 +++++--- tests/test_dpf.py | 17 ++++++++++++++--- 6 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 doc/changelog.d/3626.dependencies.md diff --git a/.ci/build_matrix.sh b/.ci/build_matrix.sh index cf6b38001a..7f90c11b2a 100755 --- a/.ci/build_matrix.sh +++ b/.ci/build_matrix.sh @@ -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' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3712c825a5..61f9b768e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }} @@ -33,7 +33,7 @@ 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 diff --git a/doc/changelog.d/3626.dependencies.md b/doc/changelog.d/3626.dependencies.md new file mode 100644 index 0000000000..4461dd967c --- /dev/null +++ b/doc/changelog.d/3626.dependencies.md @@ -0,0 +1 @@ +ci: adding ubuntu 251 and 252 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 8076a4ad86..b724ce12cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -118,7 +118,7 @@ pymapdl_convert_script = "ansys.mapdl.core.cli:old_pymapdl_convert_script_entry_ pymapdl = "ansys.mapdl.core.cli:main" [tool.pytest.ini_options] -addopts = "-rxXsa -vvv --maxfail=10 --random-order-bucket=class --random-order --durations=10 --timeout=40" +addopts = "-rxXsa -vvv --maxfail=10 --random-order-bucket=class --random-order --durations=10 --timeout=180" junit_family = "legacy" filterwarnings = [ "ignore::FutureWarning", diff --git a/tests/test_database.py b/tests/test_database.py index e051b72e20..f489c31650 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -32,6 +32,8 @@ from ansys.mapdl.core.misc import random_string from conftest import ON_CI, TestClass +SKIP_ON_VERSIONS = ["22.2", "23.1", "23.2", "24.1", "24.2", "25.1", "25.2"] + @pytest.fixture(scope="session") def db(mapdl): @@ -49,9 +51,9 @@ def db(mapdl): ) ## Exceptions - if mapdl_version in ["22.2", "23.1", "23.2", "24.1", "24.2", "25.1"] and ON_CI: + if mapdl_version in SKIP_ON_VERSIONS and ON_CI: pytest.skip( - f"This MAPDL version ({mapdl_version}) docker image seems to not support DB, but local does." + f"This MAPDL version ({mapdl_version}) docker image seems to not support DB on CICD." ) if mapdl._server_version < (0, 4, 1): # 2021R2 @@ -84,7 +86,7 @@ def test_database_start_stop(mapdl, cleared): ) # Exceptions - if mapdl_version in ["22.2", "23.1", "23.2", "24.1", "24.2", "25.1"] and ON_CI: + if mapdl_version in SKIP_ON_VERSIONS and ON_CI: pytest.skip( f"This MAPDL version ({mapdl_version}) docker image seems to not support DB, but local does." ) diff --git a/tests/test_dpf.py b/tests/test_dpf.py index fa8a1c5ce2..23c27a6598 100644 --- a/tests/test_dpf.py +++ b/tests/test_dpf.py @@ -25,7 +25,7 @@ import pytest -from conftest import HAS_DPF, has_dependency, requires +from conftest import HAS_DPF, ON_CI, has_dependency, requires if not has_dependency("ansys-dpf-core") or not HAS_DPF: pytest.skip(allow_module_level=True) @@ -36,9 +36,20 @@ DPF_PORT = os.environ.get("DPF_PORT", DPF_DEFAULT_PORT) # Set in ci.yaml +@pytest.fixture() +def skip_dpf(mapdl): + mapdl_version = str(mapdl.version) + if mapdl_version in ["25.2"] and ON_CI: + pytest.skip( + f"This MAPDL version ({mapdl_version}) docker image seems to not support DPF on CICD.", + allow_module_level=True, + ) + return + + @requires("dpf") @requires("ansys-dpf-core") -def test_dpf_connection(): +def test_dpf_connection(skip_dpf): # uses 127.0.0.1 and port 50054 by default try: grpc_con = dpf.connect_to_server(port=DPF_PORT) @@ -50,7 +61,7 @@ def test_dpf_connection(): @requires("dpf") @requires("ansys-dpf-core") -def test_upload(mapdl, solved_box, tmpdir): +def test_upload(skip_dpf, mapdl, solved_box, tmpdir): # Download RST file rst_path = mapdl.download_result(str(tmpdir.mkdir("tmpdir"))) From 5e39a02440c51c78880432bcdaf1f99e8d33fd52 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 12:23:36 +0100 Subject: [PATCH 05/17] build: bump the core group across 1 directory with 3 updates (#3633) * build: bump the core group across 1 directory with 3 updates Bumps the core group with 3 updates in the / directory: [ansys-tools-visualization-interface](https://github.com/ansys/ansys-tools-visualization-interface), [matplotlib](https://github.com/matplotlib/matplotlib) and [ansys-sphinx-theme](https://github.com/ansys/ansys-sphinx-theme). Updates `ansys-tools-visualization-interface` from 0.6.0 to 0.6.2 - [Release notes](https://github.com/ansys/ansys-tools-visualization-interface/releases) - [Changelog](https://github.com/ansys/ansys-tools-visualization-interface/blob/main/CHANGELOG.md) - [Commits](https://github.com/ansys/ansys-tools-visualization-interface/compare/v0.6.0...v0.6.2) Updates `matplotlib` from 3.9.3 to 3.10.0 - [Release notes](https://github.com/matplotlib/matplotlib/releases) - [Commits](https://github.com/matplotlib/matplotlib/compare/v3.9.3...v3.10.0) Updates `ansys-sphinx-theme` from 1.2.3 to 1.2.4 - [Release notes](https://github.com/ansys/ansys-sphinx-theme/releases) - [Commits](https://github.com/ansys/ansys-sphinx-theme/compare/v1.2.3...v1.2.4) --- updated-dependencies: - dependency-name: ansys-tools-visualization-interface dependency-type: direct:production update-type: version-update:semver-patch dependency-group: core - dependency-name: matplotlib dependency-type: direct:production update-type: version-update:semver-minor dependency-group: core - dependency-name: ansys-sphinx-theme dependency-type: direct:production update-type: version-update:semver-patch dependency-group: core ... Signed-off-by: dependabot[bot] * chore: adding changelog file 3633.dependencies.md [dependabot-skip] --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> --- doc/changelog.d/3633.dependencies.md | 1 + pyproject.toml | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 doc/changelog.d/3633.dependencies.md diff --git a/doc/changelog.d/3633.dependencies.md b/doc/changelog.d/3633.dependencies.md new file mode 100644 index 0000000000..edc45240df --- /dev/null +++ b/doc/changelog.d/3633.dependencies.md @@ -0,0 +1 @@ +build: bump the core group across 1 directory with 3 updates \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b724ce12cd..2986d25d0b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,9 +55,9 @@ jupyter = [ tests = [ "ansys-dpf-core==0.10.1", - "ansys-tools-visualization-interface==0.6.0", + "ansys-tools-visualization-interface==0.6.2", "autopep8==2.3.1", - "matplotlib==3.9.3", + "matplotlib==3.10.0", "pandas==2.2.3", "pyansys-tools-report==0.8.1", "pyfakefs==5.7.2", @@ -74,15 +74,15 @@ tests = [ doc = [ "ansys-dpf-core==0.10.1", "ansys-mapdl-reader==0.54.2", - "ansys-sphinx-theme==1.2.3", - "ansys-tools-visualization-interface==0.6.0", + "ansys-sphinx-theme==1.2.4", + "ansys-tools-visualization-interface==0.6.2", "grpcio==1.68.1", "imageio-ffmpeg==0.5.1", "imageio==2.36.1", "jupyter_sphinx==0.5.3", "jupyter==1.1.1", "jupyterlab>=3.2.8", - "matplotlib==3.9.3", + "matplotlib==3.10.0", "nbformat==5.10.4", "numpydoc==1.8.0", "pandas==2.2.3", From 9bd9c22e4b25288cc41332a53c2de293b3e9c249 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 12:24:12 +0100 Subject: [PATCH 06/17] build: bump the minimal group across 1 directory with 2 updates (#3632) * build: bump the minimal group across 1 directory with 2 updates Bumps the minimal group with 2 updates in the / directory: [numpy](https://github.com/numpy/numpy) and [psutil](https://github.com/giampaolo/psutil). Updates `numpy` from 2.2.0 to 2.2.1 - [Release notes](https://github.com/numpy/numpy/releases) - [Changelog](https://github.com/numpy/numpy/blob/main/doc/RELEASE_WALKTHROUGH.rst) - [Commits](https://github.com/numpy/numpy/compare/v2.2.0...v2.2.1) Updates `psutil` from 6.1.0 to 6.1.1 - [Changelog](https://github.com/giampaolo/psutil/blob/master/HISTORY.rst) - [Commits](https://github.com/giampaolo/psutil/compare/release-6.1.0...release-6.1.1) --- updated-dependencies: - dependency-name: numpy dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minimal - dependency-name: psutil dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minimal ... Signed-off-by: dependabot[bot] * chore: adding changelog file 3632.maintenance.md [dependabot-skip] --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> --- doc/changelog.d/3632.maintenance.md | 1 + minimum_requirements.txt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 doc/changelog.d/3632.maintenance.md diff --git a/doc/changelog.d/3632.maintenance.md b/doc/changelog.d/3632.maintenance.md new file mode 100644 index 0000000000..41dcf4e505 --- /dev/null +++ b/doc/changelog.d/3632.maintenance.md @@ -0,0 +1 @@ +build: bump the minimal group across 1 directory with 2 updates \ No newline at end of file diff --git a/minimum_requirements.txt b/minimum_requirements.txt index 14d5fe818e..fda055b768 100644 --- a/minimum_requirements.txt +++ b/minimum_requirements.txt @@ -1,5 +1,5 @@ ansys-api-mapdl==0.5.2 -numpy==2.2.0 +numpy==2.2.1 platformdirs==4.3.6 -psutil==6.1.0 +psutil==6.1.1 pyansys-tools-versioning==0.6.0 \ No newline at end of file From 38d51a1611a21b9df9d10bd90c35a7993bba37f8 Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Tue, 7 Jan 2025 13:22:57 +0100 Subject: [PATCH 07/17] feat: update copyright year (#3637) * feat: update copyright year * chore: adding changelog file 3637.documentation.md [dependabot-skip] --------- Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> --- LICENSE | 2 +- doc/changelog.d/3637.documentation.md | 1 + .../extended_examples/ex_01-gmsh_example/gmsh_generator.py | 2 +- .../extended_examples/ex_01-gmsh_example/mesh_converter.py | 2 +- .../extended_examples/ex_01-gmsh_example/modal_analysis.py | 2 +- doc/source/examples/extended_examples/executable/cli_rotor.py | 2 +- doc/source/examples/extended_examples/executable/rotor.py | 2 +- doc/source/examples/extended_examples/gui/gui_app.py | 2 +- doc/source/examples/extended_examples/hpc/ml_ga_beam.py | 2 +- .../2d_magnetostatic_solenoid-BodyFlux_Averaging.py | 2 +- examples/00-mapdl-examples/2d_plate_with_a_hole.py | 2 +- examples/00-mapdl-examples/2d_pressure_vessel.py | 2 +- examples/00-mapdl-examples/3d_notch.py | 2 +- examples/00-mapdl-examples/3d_plate_thermal.py | 2 +- examples/00-mapdl-examples/acoustic_analysis.py | 2 +- examples/00-mapdl-examples/basic_dpf_example.py | 2 +- examples/00-mapdl-examples/bracket_static.py | 2 +- examples/00-mapdl-examples/contact_elements.py | 2 +- examples/00-mapdl-examples/cyclic_analysis.py | 2 +- examples/00-mapdl-examples/cyclic_static.py | 2 +- examples/00-mapdl-examples/exhaust_manifold_thermal_stress.py | 2 +- examples/00-mapdl-examples/geometry.py | 2 +- examples/00-mapdl-examples/lathe_cutter.py | 2 +- examples/00-mapdl-examples/mapdl_3d_beam.py | 2 +- examples/00-mapdl-examples/mapdl_beam.py | 2 +- examples/00-mapdl-examples/modal_beam.py | 2 +- examples/00-mapdl-examples/path_operations.py | 2 +- examples/00-mapdl-examples/pressure_vessel.py | 2 +- examples/00-mapdl-examples/pyvista_mesh.py | 2 +- examples/00-mapdl-examples/slashmap_cfx_mapping.py | 2 +- examples/00-mapdl-examples/spotweld.py | 2 +- examples/00-mapdl-examples/torsional_load.py | 2 +- examples/00-mapdl-examples/transient_thermal.py | 2 +- examples/01-geometry/00-keypoints.py | 2 +- examples/01-geometry/01-lines.py | 2 +- examples/01-geometry/02-areas.py | 2 +- examples/01-geometry/03-volumes.py | 2 +- examples/01-geometry/04-primitives.py | 2 +- examples/02-tips-n-tricks/00-example-template.py | 2 +- .../02-tips-n-tricks/01-smoothing-element-size-transitions.py | 2 +- .../02-tips-n-tricks/03-using_inline_functions_and_Query.py | 2 +- examples/02-tips-n-tricks/04-rotational-displacement.py | 2 +- examples/02-tips-n-tricks/05-explore_mapdl_files.py | 2 +- examples/03-general-fea/00-how_finite_element_works.py | 2 +- src/ansys/mapdl/core/__init__.py | 2 +- src/ansys/mapdl/core/_commands/__init__.py | 2 +- src/ansys/mapdl/core/_commands/apdl/__init__.py | 2 +- src/ansys/mapdl/core/_commands/apdl/abbreviations.py | 2 +- src/ansys/mapdl/core/_commands/apdl/array_param.py | 2 +- src/ansys/mapdl/core/_commands/apdl/macro_files.py | 2 +- src/ansys/mapdl/core/_commands/apdl/matrix_op.py | 2 +- src/ansys/mapdl/core/_commands/apdl/parameter_definition.py | 2 +- src/ansys/mapdl/core/_commands/apdl/process_controls.py | 2 +- src/ansys/mapdl/core/_commands/aux12_/__init__.py | 2 +- src/ansys/mapdl/core/_commands/aux12_/general_radiation.py | 2 +- src/ansys/mapdl/core/_commands/aux12_/radiation_mat.py | 2 +- src/ansys/mapdl/core/_commands/aux12_/radiosity_solver.py | 2 +- src/ansys/mapdl/core/_commands/aux15_.py | 2 +- src/ansys/mapdl/core/_commands/aux2_/__init__.py | 2 +- src/ansys/mapdl/core/_commands/aux2_/bin_dump.py | 2 +- src/ansys/mapdl/core/_commands/aux2_/bin_manip.py | 2 +- src/ansys/mapdl/core/_commands/aux3_.py | 2 +- src/ansys/mapdl/core/_commands/conn.py | 2 +- src/ansys/mapdl/core/_commands/database/__init__.py | 2 +- src/ansys/mapdl/core/_commands/database/components.py | 2 +- src/ansys/mapdl/core/_commands/database/coord_sys.py | 2 +- src/ansys/mapdl/core/_commands/database/picking.py | 2 +- src/ansys/mapdl/core/_commands/database/selecting.py | 2 +- src/ansys/mapdl/core/_commands/database/setup.py | 2 +- src/ansys/mapdl/core/_commands/database/working_plane.py | 2 +- src/ansys/mapdl/core/_commands/display_/__init__.py | 2 +- src/ansys/mapdl/core/_commands/display_/setup.py | 2 +- src/ansys/mapdl/core/_commands/graphics_/__init__.py | 2 +- src/ansys/mapdl/core/_commands/graphics_/annotation.py | 2 +- src/ansys/mapdl/core/_commands/graphics_/graphs.py | 2 +- src/ansys/mapdl/core/_commands/graphics_/labeling.py | 2 +- src/ansys/mapdl/core/_commands/graphics_/scaling.py | 2 +- src/ansys/mapdl/core/_commands/graphics_/setup.py | 2 +- src/ansys/mapdl/core/_commands/graphics_/style.py | 2 +- src/ansys/mapdl/core/_commands/graphics_/views.py | 2 +- src/ansys/mapdl/core/_commands/hidden.py | 2 +- src/ansys/mapdl/core/_commands/inq_func.py | 2 +- src/ansys/mapdl/core/_commands/map_cmd.py | 2 +- src/ansys/mapdl/core/_commands/misc/__init__.py | 2 +- src/ansys/mapdl/core/_commands/misc/misc.py | 2 +- src/ansys/mapdl/core/_commands/parse.py | 2 +- src/ansys/mapdl/core/_commands/post1_/__init__.py | 2 +- src/ansys/mapdl/core/_commands/post1_/animation.py | 2 +- src/ansys/mapdl/core/_commands/post1_/controls.py | 2 +- src/ansys/mapdl/core/_commands/post1_/element_table.py | 2 +- src/ansys/mapdl/core/_commands/post1_/failure_criteria.py | 2 +- src/ansys/mapdl/core/_commands/post1_/listing.py | 2 +- src/ansys/mapdl/core/_commands/post1_/load_case.py | 2 +- src/ansys/mapdl/core/_commands/post1_/magnetics_calc.py | 2 +- src/ansys/mapdl/core/_commands/post1_/path_operations.py | 2 +- src/ansys/mapdl/core/_commands/post1_/results.py | 2 +- src/ansys/mapdl/core/_commands/post1_/setup.py | 2 +- src/ansys/mapdl/core/_commands/post1_/special.py | 2 +- src/ansys/mapdl/core/_commands/post1_/status.py | 2 +- src/ansys/mapdl/core/_commands/post1_/surface_operations.py | 2 +- src/ansys/mapdl/core/_commands/post1_/trace_points.py | 2 +- src/ansys/mapdl/core/_commands/post26_/__init__.py | 2 +- src/ansys/mapdl/core/_commands/post26_/controls.py | 2 +- src/ansys/mapdl/core/_commands/post26_/display.py | 2 +- src/ansys/mapdl/core/_commands/post26_/listing.py | 2 +- src/ansys/mapdl/core/_commands/post26_/operations.py | 2 +- src/ansys/mapdl/core/_commands/post26_/setup.py | 2 +- src/ansys/mapdl/core/_commands/post26_/special.py | 2 +- src/ansys/mapdl/core/_commands/post26_/status.py | 2 +- src/ansys/mapdl/core/_commands/preproc/__init__.py | 2 +- src/ansys/mapdl/core/_commands/preproc/areas.py | 2 +- .../mapdl/core/_commands/preproc/artificially_matched_layers.py | 2 +- src/ansys/mapdl/core/_commands/preproc/booleans.py | 2 +- src/ansys/mapdl/core/_commands/preproc/constraint_equations.py | 2 +- src/ansys/mapdl/core/_commands/preproc/coupled_dof.py | 2 +- src/ansys/mapdl/core/_commands/preproc/database.py | 2 +- src/ansys/mapdl/core/_commands/preproc/digitizing.py | 2 +- src/ansys/mapdl/core/_commands/preproc/element_type.py | 2 +- src/ansys/mapdl/core/_commands/preproc/elements.py | 2 +- src/ansys/mapdl/core/_commands/preproc/explicit_dynamics.py | 2 +- src/ansys/mapdl/core/_commands/preproc/hard_points.py | 2 +- src/ansys/mapdl/core/_commands/preproc/keypoints.py | 2 +- src/ansys/mapdl/core/_commands/preproc/lines.py | 2 +- src/ansys/mapdl/core/_commands/preproc/material_data_tables.py | 2 +- src/ansys/mapdl/core/_commands/preproc/materials.py | 2 +- src/ansys/mapdl/core/_commands/preproc/meshing.py | 2 +- src/ansys/mapdl/core/_commands/preproc/morphing.py | 2 +- src/ansys/mapdl/core/_commands/preproc/nodes.py | 2 +- src/ansys/mapdl/core/_commands/preproc/primitives.py | 2 +- src/ansys/mapdl/core/_commands/preproc/real_constants.py | 2 +- src/ansys/mapdl/core/_commands/preproc/sections.py | 2 +- src/ansys/mapdl/core/_commands/preproc/special_purpose.py | 2 +- src/ansys/mapdl/core/_commands/preproc/status.py | 2 +- src/ansys/mapdl/core/_commands/preproc/superelements.py | 2 +- src/ansys/mapdl/core/_commands/preproc/volumes.py | 2 +- src/ansys/mapdl/core/_commands/reduced/__init__.py | 2 +- src/ansys/mapdl/core/_commands/reduced/generation.py | 2 +- src/ansys/mapdl/core/_commands/reduced/preparation.py | 2 +- src/ansys/mapdl/core/_commands/reduced/setup.py | 2 +- src/ansys/mapdl/core/_commands/reduced/use_pass.py | 2 +- src/ansys/mapdl/core/_commands/session/__init__.py | 2 +- src/ansys/mapdl/core/_commands/session/files.py | 2 +- src/ansys/mapdl/core/_commands/session/list_controls.py | 2 +- src/ansys/mapdl/core/_commands/session/processor_entry.py | 2 +- src/ansys/mapdl/core/_commands/session/run_controls.py | 2 +- src/ansys/mapdl/core/_commands/solution/__init__.py | 2 +- src/ansys/mapdl/core/_commands/solution/all_others.py | 2 +- src/ansys/mapdl/core/_commands/solution/analysis_options.py | 2 +- src/ansys/mapdl/core/_commands/solution/birth_and_death.py | 2 +- src/ansys/mapdl/core/_commands/solution/dynamic_options.py | 2 +- src/ansys/mapdl/core/_commands/solution/fe_body_loads.py | 2 +- src/ansys/mapdl/core/_commands/solution/fe_constraints.py | 2 +- src/ansys/mapdl/core/_commands/solution/fe_forces.py | 2 +- src/ansys/mapdl/core/_commands/solution/fe_surface_loads.py | 2 +- src/ansys/mapdl/core/_commands/solution/gap_conditions.py | 2 +- src/ansys/mapdl/core/_commands/solution/inertia.py | 2 +- src/ansys/mapdl/core/_commands/solution/load_step_operations.py | 2 +- src/ansys/mapdl/core/_commands/solution/load_step_options.py | 2 +- src/ansys/mapdl/core/_commands/solution/master_dof.py | 2 +- src/ansys/mapdl/core/_commands/solution/miscellaneous_loads.py | 2 +- .../solution/multi_field_solver_convergence_controls.py | 2 +- .../solution/multi_field_solver_definition_commands.py | 2 +- .../_commands/solution/multi_field_solver_global_controls.py | 2 +- .../_commands/solution/multi_field_solver_interface_mapping.py | 2 +- .../core/_commands/solution/multi_field_solver_load_transfer.py | 2 +- .../core/_commands/solution/multi_field_solver_time_controls.py | 2 +- src/ansys/mapdl/core/_commands/solution/nonlinear_options.py | 2 +- src/ansys/mapdl/core/_commands/solution/ocean.py | 2 +- src/ansys/mapdl/core/_commands/solution/radiosity.py | 2 +- src/ansys/mapdl/core/_commands/solution/rezoning.py | 2 +- src/ansys/mapdl/core/_commands/solution/solid_body_loads.py | 2 +- src/ansys/mapdl/core/_commands/solution/solid_constraints.py | 2 +- src/ansys/mapdl/core/_commands/solution/solid_forces.py | 2 +- src/ansys/mapdl/core/_commands/solution/solid_surface_loads.py | 2 +- src/ansys/mapdl/core/_commands/solution/solution_status.py | 2 +- src/ansys/mapdl/core/_commands/solution/spectrum_options.py | 2 +- src/ansys/mapdl/core/_commands/solution/twod_to_3d_analysis.py | 2 +- src/ansys/mapdl/core/_version.py | 2 +- src/ansys/mapdl/core/cli/__init__.py | 2 +- src/ansys/mapdl/core/cli/convert.py | 2 +- src/ansys/mapdl/core/cli/list_instances.py | 2 +- src/ansys/mapdl/core/cli/start.py | 2 +- src/ansys/mapdl/core/cli/stop.py | 2 +- src/ansys/mapdl/core/commands.py | 2 +- src/ansys/mapdl/core/common_grpc.py | 2 +- src/ansys/mapdl/core/component.py | 2 +- src/ansys/mapdl/core/convert.py | 2 +- src/ansys/mapdl/core/database/__init__.py | 2 +- src/ansys/mapdl/core/database/database.py | 2 +- src/ansys/mapdl/core/database/elems.py | 2 +- src/ansys/mapdl/core/database/nodes.py | 2 +- src/ansys/mapdl/core/errors.py | 2 +- src/ansys/mapdl/core/examples/__init__.py | 2 +- src/ansys/mapdl/core/examples/downloads.py | 2 +- src/ansys/mapdl/core/examples/examples.py | 2 +- src/ansys/mapdl/core/examples/verif_files.py | 2 +- src/ansys/mapdl/core/helpers.py | 2 +- src/ansys/mapdl/core/information.py | 2 +- src/ansys/mapdl/core/inline_functions/__init__.py | 2 +- src/ansys/mapdl/core/inline_functions/component_queries.py | 2 +- src/ansys/mapdl/core/inline_functions/connectivity_queries.py | 2 +- src/ansys/mapdl/core/inline_functions/core.py | 2 +- src/ansys/mapdl/core/inline_functions/geometry_queries.py | 2 +- src/ansys/mapdl/core/inline_functions/inline_functions.py | 2 +- src/ansys/mapdl/core/inline_functions/line_queries.py | 2 +- src/ansys/mapdl/core/inline_functions/nearest_queries.py | 2 +- src/ansys/mapdl/core/inline_functions/normals_queries.py | 2 +- src/ansys/mapdl/core/inline_functions/scalar_queries.py | 2 +- src/ansys/mapdl/core/inline_functions/selection_queries.py | 2 +- src/ansys/mapdl/core/jupyter.py | 2 +- src/ansys/mapdl/core/krylov.py | 2 +- src/ansys/mapdl/core/launcher.py | 2 +- src/ansys/mapdl/core/licensing.py | 2 +- src/ansys/mapdl/core/logging.py | 2 +- src/ansys/mapdl/core/mapdl.py | 2 +- src/ansys/mapdl/core/mapdl_console.py | 2 +- src/ansys/mapdl/core/mapdl_core.py | 2 +- src/ansys/mapdl/core/mapdl_extended.py | 2 +- src/ansys/mapdl/core/mapdl_geometry.py | 2 +- src/ansys/mapdl/core/mapdl_grpc.py | 2 +- src/ansys/mapdl/core/mapdl_inprocess.py | 2 +- src/ansys/mapdl/core/mapdl_types.py | 2 +- src/ansys/mapdl/core/mesh/__init__.py | 2 +- src/ansys/mapdl/core/mesh/mesh.py | 2 +- src/ansys/mapdl/core/mesh_grpc.py | 2 +- src/ansys/mapdl/core/misc.py | 2 +- src/ansys/mapdl/core/parameters.py | 2 +- src/ansys/mapdl/core/plotting/__init__.py | 2 +- src/ansys/mapdl/core/plotting/consts.py | 2 +- src/ansys/mapdl/core/plotting/plotting_defaults.py | 2 +- src/ansys/mapdl/core/plotting/theme.py | 2 +- src/ansys/mapdl/core/plotting/visualizer.py | 2 +- src/ansys/mapdl/core/pool.py | 2 +- src/ansys/mapdl/core/post.py | 2 +- src/ansys/mapdl/core/report.py | 2 +- src/ansys/mapdl/core/solution.py | 2 +- src/ansys/mapdl/core/xpl.py | 2 +- tests/common.py | 2 +- tests/conftest.py | 2 +- tests/test_cli.py | 2 +- tests/test_commands.py | 2 +- tests/test_component.py | 2 +- tests/test_console.py | 2 +- tests/test_convert.py | 2 +- tests/test_database.py | 2 +- tests/test_dpf.py | 2 +- tests/test_element.py | 2 +- tests/test_errors.py | 2 +- tests/test_examples.py | 2 +- tests/test_geometry.py | 2 +- tests/test_grpc.py | 2 +- tests/test_importing_geometries.py | 2 +- tests/test_information.py | 2 +- tests/test_inline_functions/test_component_queries.py | 2 +- tests/test_inline_functions/test_connectivity_queries.py | 2 +- tests/test_inline_functions/test_field_component_queries.py | 2 +- tests/test_inline_functions/test_geometry_queries.py | 2 +- tests/test_inline_functions/test_line_component_queries.py | 2 +- tests/test_inline_functions/test_nearest_queries.py | 2 +- tests/test_inline_functions/test_normals_queries.py | 2 +- tests/test_inline_functions/test_query.py | 2 +- tests/test_inline_functions/test_selection_queries.py | 2 +- tests/test_krylov.py | 2 +- tests/test_launcher.py | 2 +- tests/test_launcher_remote.py | 2 +- tests/test_licensing.py | 2 +- tests/test_logging.py | 2 +- tests/test_mapdl.py | 2 +- tests/test_mesh_grpc.py | 2 +- tests/test_misc.py | 2 +- tests/test_parameters.py | 2 +- tests/test_plotting.py | 2 +- tests/test_pool.py | 2 +- tests/test_post.py | 2 +- tests/test_report.py | 2 +- tests/test_solution.py | 2 +- tests/test_theme.py | 2 +- tests/test_xpl.py | 2 +- 278 files changed, 278 insertions(+), 277 deletions(-) create mode 100644 doc/changelog.d/3637.documentation.md diff --git a/LICENSE b/LICENSE index f91e210be6..b92019e249 100644 --- a/LICENSE +++ b/LICENSE @@ -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 diff --git a/doc/changelog.d/3637.documentation.md b/doc/changelog.d/3637.documentation.md new file mode 100644 index 0000000000..b29848ccb0 --- /dev/null +++ b/doc/changelog.d/3637.documentation.md @@ -0,0 +1 @@ +feat: update copyright year \ No newline at end of file diff --git a/doc/source/examples/extended_examples/ex_01-gmsh_example/gmsh_generator.py b/doc/source/examples/extended_examples/ex_01-gmsh_example/gmsh_generator.py index dd76f89136..b2d42ecb94 100644 --- a/doc/source/examples/extended_examples/ex_01-gmsh_example/gmsh_generator.py +++ b/doc/source/examples/extended_examples/ex_01-gmsh_example/gmsh_generator.py @@ -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 # # diff --git a/doc/source/examples/extended_examples/ex_01-gmsh_example/mesh_converter.py b/doc/source/examples/extended_examples/ex_01-gmsh_example/mesh_converter.py index fba914233a..1592105de5 100644 --- a/doc/source/examples/extended_examples/ex_01-gmsh_example/mesh_converter.py +++ b/doc/source/examples/extended_examples/ex_01-gmsh_example/mesh_converter.py @@ -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 # # diff --git a/doc/source/examples/extended_examples/ex_01-gmsh_example/modal_analysis.py b/doc/source/examples/extended_examples/ex_01-gmsh_example/modal_analysis.py index 9e37717777..f5f3df7173 100644 --- a/doc/source/examples/extended_examples/ex_01-gmsh_example/modal_analysis.py +++ b/doc/source/examples/extended_examples/ex_01-gmsh_example/modal_analysis.py @@ -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 # # diff --git a/doc/source/examples/extended_examples/executable/cli_rotor.py b/doc/source/examples/extended_examples/executable/cli_rotor.py index 8004fc5c89..e9bd6a53b1 100644 --- a/doc/source/examples/extended_examples/executable/cli_rotor.py +++ b/doc/source/examples/extended_examples/executable/cli_rotor.py @@ -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 # # diff --git a/doc/source/examples/extended_examples/executable/rotor.py b/doc/source/examples/extended_examples/executable/rotor.py index 4811145698..19cd35be68 100644 --- a/doc/source/examples/extended_examples/executable/rotor.py +++ b/doc/source/examples/extended_examples/executable/rotor.py @@ -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 # # diff --git a/doc/source/examples/extended_examples/gui/gui_app.py b/doc/source/examples/extended_examples/gui/gui_app.py index 2b21bc4b4e..df2077164d 100644 --- a/doc/source/examples/extended_examples/gui/gui_app.py +++ b/doc/source/examples/extended_examples/gui/gui_app.py @@ -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 # # diff --git a/doc/source/examples/extended_examples/hpc/ml_ga_beam.py b/doc/source/examples/extended_examples/hpc/ml_ga_beam.py index f4633dab3f..485c9ac597 100644 --- a/doc/source/examples/extended_examples/hpc/ml_ga_beam.py +++ b/doc/source/examples/extended_examples/hpc/ml_ga_beam.py @@ -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 # # diff --git a/examples/00-mapdl-examples/2d_magnetostatic_solenoid-BodyFlux_Averaging.py b/examples/00-mapdl-examples/2d_magnetostatic_solenoid-BodyFlux_Averaging.py index a6a0cda21a..ed8a9b9ef8 100644 --- a/examples/00-mapdl-examples/2d_magnetostatic_solenoid-BodyFlux_Averaging.py +++ b/examples/00-mapdl-examples/2d_magnetostatic_solenoid-BodyFlux_Averaging.py @@ -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 # # diff --git a/examples/00-mapdl-examples/2d_plate_with_a_hole.py b/examples/00-mapdl-examples/2d_plate_with_a_hole.py index 78716ee207..4539689658 100644 --- a/examples/00-mapdl-examples/2d_plate_with_a_hole.py +++ b/examples/00-mapdl-examples/2d_plate_with_a_hole.py @@ -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 # # diff --git a/examples/00-mapdl-examples/2d_pressure_vessel.py b/examples/00-mapdl-examples/2d_pressure_vessel.py index ed21c801a2..a157945e13 100644 --- a/examples/00-mapdl-examples/2d_pressure_vessel.py +++ b/examples/00-mapdl-examples/2d_pressure_vessel.py @@ -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 # # diff --git a/examples/00-mapdl-examples/3d_notch.py b/examples/00-mapdl-examples/3d_notch.py index e90bfebbed..5c1cef162a 100644 --- a/examples/00-mapdl-examples/3d_notch.py +++ b/examples/00-mapdl-examples/3d_notch.py @@ -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 # # diff --git a/examples/00-mapdl-examples/3d_plate_thermal.py b/examples/00-mapdl-examples/3d_plate_thermal.py index 0eb3202c79..fbaa7fb9b7 100644 --- a/examples/00-mapdl-examples/3d_plate_thermal.py +++ b/examples/00-mapdl-examples/3d_plate_thermal.py @@ -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 # # diff --git a/examples/00-mapdl-examples/acoustic_analysis.py b/examples/00-mapdl-examples/acoustic_analysis.py index f37ded1a7e..09ee258647 100644 --- a/examples/00-mapdl-examples/acoustic_analysis.py +++ b/examples/00-mapdl-examples/acoustic_analysis.py @@ -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 # # diff --git a/examples/00-mapdl-examples/basic_dpf_example.py b/examples/00-mapdl-examples/basic_dpf_example.py index 11d574cde5..7f5d43953b 100644 --- a/examples/00-mapdl-examples/basic_dpf_example.py +++ b/examples/00-mapdl-examples/basic_dpf_example.py @@ -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 # # diff --git a/examples/00-mapdl-examples/bracket_static.py b/examples/00-mapdl-examples/bracket_static.py index 38d6fdddce..5d4167c78b 100644 --- a/examples/00-mapdl-examples/bracket_static.py +++ b/examples/00-mapdl-examples/bracket_static.py @@ -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 # # diff --git a/examples/00-mapdl-examples/contact_elements.py b/examples/00-mapdl-examples/contact_elements.py index 06a40dacb0..b5696c0270 100644 --- a/examples/00-mapdl-examples/contact_elements.py +++ b/examples/00-mapdl-examples/contact_elements.py @@ -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 # # diff --git a/examples/00-mapdl-examples/cyclic_analysis.py b/examples/00-mapdl-examples/cyclic_analysis.py index 88628ec02a..edf09292e5 100644 --- a/examples/00-mapdl-examples/cyclic_analysis.py +++ b/examples/00-mapdl-examples/cyclic_analysis.py @@ -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 # # diff --git a/examples/00-mapdl-examples/cyclic_static.py b/examples/00-mapdl-examples/cyclic_static.py index 01fa28e4b1..92a8347590 100644 --- a/examples/00-mapdl-examples/cyclic_static.py +++ b/examples/00-mapdl-examples/cyclic_static.py @@ -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 # # diff --git a/examples/00-mapdl-examples/exhaust_manifold_thermal_stress.py b/examples/00-mapdl-examples/exhaust_manifold_thermal_stress.py index c795270524..ee0c870af9 100644 --- a/examples/00-mapdl-examples/exhaust_manifold_thermal_stress.py +++ b/examples/00-mapdl-examples/exhaust_manifold_thermal_stress.py @@ -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 # # diff --git a/examples/00-mapdl-examples/geometry.py b/examples/00-mapdl-examples/geometry.py index b4e0f6ab02..ec480c118b 100644 --- a/examples/00-mapdl-examples/geometry.py +++ b/examples/00-mapdl-examples/geometry.py @@ -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 # # diff --git a/examples/00-mapdl-examples/lathe_cutter.py b/examples/00-mapdl-examples/lathe_cutter.py index 844b65987a..bd32b76305 100644 --- a/examples/00-mapdl-examples/lathe_cutter.py +++ b/examples/00-mapdl-examples/lathe_cutter.py @@ -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 # # diff --git a/examples/00-mapdl-examples/mapdl_3d_beam.py b/examples/00-mapdl-examples/mapdl_3d_beam.py index db94474280..b3acaec167 100644 --- a/examples/00-mapdl-examples/mapdl_3d_beam.py +++ b/examples/00-mapdl-examples/mapdl_3d_beam.py @@ -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 # # diff --git a/examples/00-mapdl-examples/mapdl_beam.py b/examples/00-mapdl-examples/mapdl_beam.py index 880550e875..5caa688133 100644 --- a/examples/00-mapdl-examples/mapdl_beam.py +++ b/examples/00-mapdl-examples/mapdl_beam.py @@ -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 # # diff --git a/examples/00-mapdl-examples/modal_beam.py b/examples/00-mapdl-examples/modal_beam.py index 262e83e9c8..e08c888eb8 100644 --- a/examples/00-mapdl-examples/modal_beam.py +++ b/examples/00-mapdl-examples/modal_beam.py @@ -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 # # diff --git a/examples/00-mapdl-examples/path_operations.py b/examples/00-mapdl-examples/path_operations.py index c589769c15..5925de8105 100644 --- a/examples/00-mapdl-examples/path_operations.py +++ b/examples/00-mapdl-examples/path_operations.py @@ -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 # # diff --git a/examples/00-mapdl-examples/pressure_vessel.py b/examples/00-mapdl-examples/pressure_vessel.py index 6062b06e84..36c2fab461 100644 --- a/examples/00-mapdl-examples/pressure_vessel.py +++ b/examples/00-mapdl-examples/pressure_vessel.py @@ -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 # # diff --git a/examples/00-mapdl-examples/pyvista_mesh.py b/examples/00-mapdl-examples/pyvista_mesh.py index b8af80774d..c1f9487ee8 100644 --- a/examples/00-mapdl-examples/pyvista_mesh.py +++ b/examples/00-mapdl-examples/pyvista_mesh.py @@ -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 # # diff --git a/examples/00-mapdl-examples/slashmap_cfx_mapping.py b/examples/00-mapdl-examples/slashmap_cfx_mapping.py index ae0ce233a3..8019db8a62 100644 --- a/examples/00-mapdl-examples/slashmap_cfx_mapping.py +++ b/examples/00-mapdl-examples/slashmap_cfx_mapping.py @@ -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 # # diff --git a/examples/00-mapdl-examples/spotweld.py b/examples/00-mapdl-examples/spotweld.py index 0557d0d768..ed734aeebb 100644 --- a/examples/00-mapdl-examples/spotweld.py +++ b/examples/00-mapdl-examples/spotweld.py @@ -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 # # diff --git a/examples/00-mapdl-examples/torsional_load.py b/examples/00-mapdl-examples/torsional_load.py index dbd0ebff5e..942bf6a9ca 100644 --- a/examples/00-mapdl-examples/torsional_load.py +++ b/examples/00-mapdl-examples/torsional_load.py @@ -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 # # diff --git a/examples/00-mapdl-examples/transient_thermal.py b/examples/00-mapdl-examples/transient_thermal.py index e199b3dbe2..6e8e6999a3 100644 --- a/examples/00-mapdl-examples/transient_thermal.py +++ b/examples/00-mapdl-examples/transient_thermal.py @@ -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 # # diff --git a/examples/01-geometry/00-keypoints.py b/examples/01-geometry/00-keypoints.py index 02e89cd1e5..de644f0084 100644 --- a/examples/01-geometry/00-keypoints.py +++ b/examples/01-geometry/00-keypoints.py @@ -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 # # diff --git a/examples/01-geometry/01-lines.py b/examples/01-geometry/01-lines.py index e7690cd705..35ea1f9bf6 100644 --- a/examples/01-geometry/01-lines.py +++ b/examples/01-geometry/01-lines.py @@ -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 # # diff --git a/examples/01-geometry/02-areas.py b/examples/01-geometry/02-areas.py index 98ed596ce4..4db0660988 100644 --- a/examples/01-geometry/02-areas.py +++ b/examples/01-geometry/02-areas.py @@ -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 # # diff --git a/examples/01-geometry/03-volumes.py b/examples/01-geometry/03-volumes.py index a2c03754f2..79f2ae7dae 100644 --- a/examples/01-geometry/03-volumes.py +++ b/examples/01-geometry/03-volumes.py @@ -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 # # diff --git a/examples/01-geometry/04-primitives.py b/examples/01-geometry/04-primitives.py index b33568c14d..1d6ebf4de0 100644 --- a/examples/01-geometry/04-primitives.py +++ b/examples/01-geometry/04-primitives.py @@ -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 # # diff --git a/examples/02-tips-n-tricks/00-example-template.py b/examples/02-tips-n-tricks/00-example-template.py index 511ca53042..fb03d0c5ca 100644 --- a/examples/02-tips-n-tricks/00-example-template.py +++ b/examples/02-tips-n-tricks/00-example-template.py @@ -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 # # diff --git a/examples/02-tips-n-tricks/01-smoothing-element-size-transitions.py b/examples/02-tips-n-tricks/01-smoothing-element-size-transitions.py index 1c07af7d7d..c8daf637ae 100644 --- a/examples/02-tips-n-tricks/01-smoothing-element-size-transitions.py +++ b/examples/02-tips-n-tricks/01-smoothing-element-size-transitions.py @@ -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 # # diff --git a/examples/02-tips-n-tricks/03-using_inline_functions_and_Query.py b/examples/02-tips-n-tricks/03-using_inline_functions_and_Query.py index 50e32db4d7..d5166c9aad 100644 --- a/examples/02-tips-n-tricks/03-using_inline_functions_and_Query.py +++ b/examples/02-tips-n-tricks/03-using_inline_functions_and_Query.py @@ -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 # # diff --git a/examples/02-tips-n-tricks/04-rotational-displacement.py b/examples/02-tips-n-tricks/04-rotational-displacement.py index e33c02dce9..3f7bf8ca40 100644 --- a/examples/02-tips-n-tricks/04-rotational-displacement.py +++ b/examples/02-tips-n-tricks/04-rotational-displacement.py @@ -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 # # diff --git a/examples/02-tips-n-tricks/05-explore_mapdl_files.py b/examples/02-tips-n-tricks/05-explore_mapdl_files.py index 1b16688808..7598aad2df 100644 --- a/examples/02-tips-n-tricks/05-explore_mapdl_files.py +++ b/examples/02-tips-n-tricks/05-explore_mapdl_files.py @@ -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 # # diff --git a/examples/03-general-fea/00-how_finite_element_works.py b/examples/03-general-fea/00-how_finite_element_works.py index aa5f655d27..e433537f4f 100644 --- a/examples/03-general-fea/00-how_finite_element_works.py +++ b/examples/03-general-fea/00-how_finite_element_works.py @@ -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 # # diff --git a/src/ansys/mapdl/core/__init__.py b/src/ansys/mapdl/core/__init__.py index 52592a752f..9d56358ad0 100644 --- a/src/ansys/mapdl/core/__init__.py +++ b/src/ansys/mapdl/core/__init__.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/__init__.py b/src/ansys/mapdl/core/_commands/__init__.py index aa3054dc1b..b55dfdc012 100644 --- a/src/ansys/mapdl/core/_commands/__init__.py +++ b/src/ansys/mapdl/core/_commands/__init__.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/apdl/__init__.py b/src/ansys/mapdl/core/_commands/apdl/__init__.py index 81269ecb9c..dfdea9c457 100644 --- a/src/ansys/mapdl/core/_commands/apdl/__init__.py +++ b/src/ansys/mapdl/core/_commands/apdl/__init__.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/apdl/abbreviations.py b/src/ansys/mapdl/core/_commands/apdl/abbreviations.py index 8567d9c234..9958ac932a 100644 --- a/src/ansys/mapdl/core/_commands/apdl/abbreviations.py +++ b/src/ansys/mapdl/core/_commands/apdl/abbreviations.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/apdl/array_param.py b/src/ansys/mapdl/core/_commands/apdl/array_param.py index 8306549d67..31f255b895 100644 --- a/src/ansys/mapdl/core/_commands/apdl/array_param.py +++ b/src/ansys/mapdl/core/_commands/apdl/array_param.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/apdl/macro_files.py b/src/ansys/mapdl/core/_commands/apdl/macro_files.py index 1593861eae..3c26402ca1 100644 --- a/src/ansys/mapdl/core/_commands/apdl/macro_files.py +++ b/src/ansys/mapdl/core/_commands/apdl/macro_files.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/apdl/matrix_op.py b/src/ansys/mapdl/core/_commands/apdl/matrix_op.py index ac4af814e6..35ae6eaa2b 100644 --- a/src/ansys/mapdl/core/_commands/apdl/matrix_op.py +++ b/src/ansys/mapdl/core/_commands/apdl/matrix_op.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/apdl/parameter_definition.py b/src/ansys/mapdl/core/_commands/apdl/parameter_definition.py index 75915afe8e..37e27f1f20 100644 --- a/src/ansys/mapdl/core/_commands/apdl/parameter_definition.py +++ b/src/ansys/mapdl/core/_commands/apdl/parameter_definition.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/apdl/process_controls.py b/src/ansys/mapdl/core/_commands/apdl/process_controls.py index 69d48e02e6..1225b5cae5 100644 --- a/src/ansys/mapdl/core/_commands/apdl/process_controls.py +++ b/src/ansys/mapdl/core/_commands/apdl/process_controls.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/aux12_/__init__.py b/src/ansys/mapdl/core/_commands/aux12_/__init__.py index bf2f90a475..4c7a98ae01 100644 --- a/src/ansys/mapdl/core/_commands/aux12_/__init__.py +++ b/src/ansys/mapdl/core/_commands/aux12_/__init__.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/aux12_/general_radiation.py b/src/ansys/mapdl/core/_commands/aux12_/general_radiation.py index 58463614df..b2bfdf0d67 100644 --- a/src/ansys/mapdl/core/_commands/aux12_/general_radiation.py +++ b/src/ansys/mapdl/core/_commands/aux12_/general_radiation.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/aux12_/radiation_mat.py b/src/ansys/mapdl/core/_commands/aux12_/radiation_mat.py index ee9354a129..7be6c4c412 100644 --- a/src/ansys/mapdl/core/_commands/aux12_/radiation_mat.py +++ b/src/ansys/mapdl/core/_commands/aux12_/radiation_mat.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/aux12_/radiosity_solver.py b/src/ansys/mapdl/core/_commands/aux12_/radiosity_solver.py index 580637f1d2..3d96a7bc6b 100644 --- a/src/ansys/mapdl/core/_commands/aux12_/radiosity_solver.py +++ b/src/ansys/mapdl/core/_commands/aux12_/radiosity_solver.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/aux15_.py b/src/ansys/mapdl/core/_commands/aux15_.py index eeaf734280..c9396074a2 100644 --- a/src/ansys/mapdl/core/_commands/aux15_.py +++ b/src/ansys/mapdl/core/_commands/aux15_.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/aux2_/__init__.py b/src/ansys/mapdl/core/_commands/aux2_/__init__.py index 09bdaa997b..d388e85a7a 100644 --- a/src/ansys/mapdl/core/_commands/aux2_/__init__.py +++ b/src/ansys/mapdl/core/_commands/aux2_/__init__.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/aux2_/bin_dump.py b/src/ansys/mapdl/core/_commands/aux2_/bin_dump.py index 29eb8fcd0d..4a588cf2a9 100644 --- a/src/ansys/mapdl/core/_commands/aux2_/bin_dump.py +++ b/src/ansys/mapdl/core/_commands/aux2_/bin_dump.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/aux2_/bin_manip.py b/src/ansys/mapdl/core/_commands/aux2_/bin_manip.py index 0723d718e4..cfd7a7cc6a 100644 --- a/src/ansys/mapdl/core/_commands/aux2_/bin_manip.py +++ b/src/ansys/mapdl/core/_commands/aux2_/bin_manip.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/aux3_.py b/src/ansys/mapdl/core/_commands/aux3_.py index 6dbde5503b..0119d56be2 100644 --- a/src/ansys/mapdl/core/_commands/aux3_.py +++ b/src/ansys/mapdl/core/_commands/aux3_.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/conn.py b/src/ansys/mapdl/core/_commands/conn.py index 39d8fa699a..9d179627f4 100644 --- a/src/ansys/mapdl/core/_commands/conn.py +++ b/src/ansys/mapdl/core/_commands/conn.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/database/__init__.py b/src/ansys/mapdl/core/_commands/database/__init__.py index 931aa61355..d989a66010 100644 --- a/src/ansys/mapdl/core/_commands/database/__init__.py +++ b/src/ansys/mapdl/core/_commands/database/__init__.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/database/components.py b/src/ansys/mapdl/core/_commands/database/components.py index b826947cec..466b86cbfe 100644 --- a/src/ansys/mapdl/core/_commands/database/components.py +++ b/src/ansys/mapdl/core/_commands/database/components.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/database/coord_sys.py b/src/ansys/mapdl/core/_commands/database/coord_sys.py index 7d6fd9d779..ee0e554ecb 100644 --- a/src/ansys/mapdl/core/_commands/database/coord_sys.py +++ b/src/ansys/mapdl/core/_commands/database/coord_sys.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/database/picking.py b/src/ansys/mapdl/core/_commands/database/picking.py index 16fbc282f2..3055b203ac 100644 --- a/src/ansys/mapdl/core/_commands/database/picking.py +++ b/src/ansys/mapdl/core/_commands/database/picking.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/database/selecting.py b/src/ansys/mapdl/core/_commands/database/selecting.py index 21831ab7cb..17f10b5837 100644 --- a/src/ansys/mapdl/core/_commands/database/selecting.py +++ b/src/ansys/mapdl/core/_commands/database/selecting.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/database/setup.py b/src/ansys/mapdl/core/_commands/database/setup.py index c73c27f597..9294c809d2 100644 --- a/src/ansys/mapdl/core/_commands/database/setup.py +++ b/src/ansys/mapdl/core/_commands/database/setup.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/database/working_plane.py b/src/ansys/mapdl/core/_commands/database/working_plane.py index 3acbd48521..757f1fa671 100644 --- a/src/ansys/mapdl/core/_commands/database/working_plane.py +++ b/src/ansys/mapdl/core/_commands/database/working_plane.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/display_/__init__.py b/src/ansys/mapdl/core/_commands/display_/__init__.py index 69da8824a9..737c36038c 100644 --- a/src/ansys/mapdl/core/_commands/display_/__init__.py +++ b/src/ansys/mapdl/core/_commands/display_/__init__.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/display_/setup.py b/src/ansys/mapdl/core/_commands/display_/setup.py index 061e1a8145..6bdbf3607b 100644 --- a/src/ansys/mapdl/core/_commands/display_/setup.py +++ b/src/ansys/mapdl/core/_commands/display_/setup.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/graphics_/__init__.py b/src/ansys/mapdl/core/_commands/graphics_/__init__.py index 83fc982ed8..a827eef704 100644 --- a/src/ansys/mapdl/core/_commands/graphics_/__init__.py +++ b/src/ansys/mapdl/core/_commands/graphics_/__init__.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/graphics_/annotation.py b/src/ansys/mapdl/core/_commands/graphics_/annotation.py index 41622d9309..830a5a9b95 100644 --- a/src/ansys/mapdl/core/_commands/graphics_/annotation.py +++ b/src/ansys/mapdl/core/_commands/graphics_/annotation.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/graphics_/graphs.py b/src/ansys/mapdl/core/_commands/graphics_/graphs.py index b7de8b316e..d8bdc59174 100644 --- a/src/ansys/mapdl/core/_commands/graphics_/graphs.py +++ b/src/ansys/mapdl/core/_commands/graphics_/graphs.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/graphics_/labeling.py b/src/ansys/mapdl/core/_commands/graphics_/labeling.py index f5b255c3c3..5d773cf524 100644 --- a/src/ansys/mapdl/core/_commands/graphics_/labeling.py +++ b/src/ansys/mapdl/core/_commands/graphics_/labeling.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/graphics_/scaling.py b/src/ansys/mapdl/core/_commands/graphics_/scaling.py index 56cb163773..3d1460d6cc 100644 --- a/src/ansys/mapdl/core/_commands/graphics_/scaling.py +++ b/src/ansys/mapdl/core/_commands/graphics_/scaling.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/graphics_/setup.py b/src/ansys/mapdl/core/_commands/graphics_/setup.py index 9c05629368..acc229a52f 100644 --- a/src/ansys/mapdl/core/_commands/graphics_/setup.py +++ b/src/ansys/mapdl/core/_commands/graphics_/setup.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/graphics_/style.py b/src/ansys/mapdl/core/_commands/graphics_/style.py index 958660d95d..e2ad27d1da 100644 --- a/src/ansys/mapdl/core/_commands/graphics_/style.py +++ b/src/ansys/mapdl/core/_commands/graphics_/style.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/graphics_/views.py b/src/ansys/mapdl/core/_commands/graphics_/views.py index 5cbfa487be..fd1e1a3dfe 100644 --- a/src/ansys/mapdl/core/_commands/graphics_/views.py +++ b/src/ansys/mapdl/core/_commands/graphics_/views.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/hidden.py b/src/ansys/mapdl/core/_commands/hidden.py index e5518c1a1c..85a4e45c65 100644 --- a/src/ansys/mapdl/core/_commands/hidden.py +++ b/src/ansys/mapdl/core/_commands/hidden.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/inq_func.py b/src/ansys/mapdl/core/_commands/inq_func.py index 47b45a4e02..a5fc2e0817 100644 --- a/src/ansys/mapdl/core/_commands/inq_func.py +++ b/src/ansys/mapdl/core/_commands/inq_func.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/map_cmd.py b/src/ansys/mapdl/core/_commands/map_cmd.py index 5c5649bd3b..979ae076d0 100644 --- a/src/ansys/mapdl/core/_commands/map_cmd.py +++ b/src/ansys/mapdl/core/_commands/map_cmd.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/misc/__init__.py b/src/ansys/mapdl/core/_commands/misc/__init__.py index 7ca71db770..92e037a9d4 100644 --- a/src/ansys/mapdl/core/_commands/misc/__init__.py +++ b/src/ansys/mapdl/core/_commands/misc/__init__.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/misc/misc.py b/src/ansys/mapdl/core/_commands/misc/misc.py index b167898b4c..fd4c29ab9a 100644 --- a/src/ansys/mapdl/core/_commands/misc/misc.py +++ b/src/ansys/mapdl/core/_commands/misc/misc.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/parse.py b/src/ansys/mapdl/core/_commands/parse.py index a1a4820dcc..05fc560643 100644 --- a/src/ansys/mapdl/core/_commands/parse.py +++ b/src/ansys/mapdl/core/_commands/parse.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post1_/__init__.py b/src/ansys/mapdl/core/_commands/post1_/__init__.py index 7da12c9c15..62488e4ef3 100644 --- a/src/ansys/mapdl/core/_commands/post1_/__init__.py +++ b/src/ansys/mapdl/core/_commands/post1_/__init__.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post1_/animation.py b/src/ansys/mapdl/core/_commands/post1_/animation.py index fc0fa0be42..9a9718d715 100644 --- a/src/ansys/mapdl/core/_commands/post1_/animation.py +++ b/src/ansys/mapdl/core/_commands/post1_/animation.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post1_/controls.py b/src/ansys/mapdl/core/_commands/post1_/controls.py index d5b356da35..4270918066 100644 --- a/src/ansys/mapdl/core/_commands/post1_/controls.py +++ b/src/ansys/mapdl/core/_commands/post1_/controls.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post1_/element_table.py b/src/ansys/mapdl/core/_commands/post1_/element_table.py index 74cfb80978..7152d8eb28 100644 --- a/src/ansys/mapdl/core/_commands/post1_/element_table.py +++ b/src/ansys/mapdl/core/_commands/post1_/element_table.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post1_/failure_criteria.py b/src/ansys/mapdl/core/_commands/post1_/failure_criteria.py index b16d69ded7..b401a7e3d8 100644 --- a/src/ansys/mapdl/core/_commands/post1_/failure_criteria.py +++ b/src/ansys/mapdl/core/_commands/post1_/failure_criteria.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post1_/listing.py b/src/ansys/mapdl/core/_commands/post1_/listing.py index 4e43929c80..7e52cc5027 100644 --- a/src/ansys/mapdl/core/_commands/post1_/listing.py +++ b/src/ansys/mapdl/core/_commands/post1_/listing.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post1_/load_case.py b/src/ansys/mapdl/core/_commands/post1_/load_case.py index a3baca367b..6bfccd8294 100644 --- a/src/ansys/mapdl/core/_commands/post1_/load_case.py +++ b/src/ansys/mapdl/core/_commands/post1_/load_case.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post1_/magnetics_calc.py b/src/ansys/mapdl/core/_commands/post1_/magnetics_calc.py index e04478870f..640e6fbcfd 100644 --- a/src/ansys/mapdl/core/_commands/post1_/magnetics_calc.py +++ b/src/ansys/mapdl/core/_commands/post1_/magnetics_calc.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post1_/path_operations.py b/src/ansys/mapdl/core/_commands/post1_/path_operations.py index ead389b32b..ba7794fb83 100644 --- a/src/ansys/mapdl/core/_commands/post1_/path_operations.py +++ b/src/ansys/mapdl/core/_commands/post1_/path_operations.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post1_/results.py b/src/ansys/mapdl/core/_commands/post1_/results.py index ffb5f61036..1b588fad57 100644 --- a/src/ansys/mapdl/core/_commands/post1_/results.py +++ b/src/ansys/mapdl/core/_commands/post1_/results.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post1_/setup.py b/src/ansys/mapdl/core/_commands/post1_/setup.py index 318f4f9c7f..cea5f10075 100644 --- a/src/ansys/mapdl/core/_commands/post1_/setup.py +++ b/src/ansys/mapdl/core/_commands/post1_/setup.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post1_/special.py b/src/ansys/mapdl/core/_commands/post1_/special.py index 798bc5751e..2f3333963f 100644 --- a/src/ansys/mapdl/core/_commands/post1_/special.py +++ b/src/ansys/mapdl/core/_commands/post1_/special.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post1_/status.py b/src/ansys/mapdl/core/_commands/post1_/status.py index db6c545899..f636aa2207 100644 --- a/src/ansys/mapdl/core/_commands/post1_/status.py +++ b/src/ansys/mapdl/core/_commands/post1_/status.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post1_/surface_operations.py b/src/ansys/mapdl/core/_commands/post1_/surface_operations.py index da3aff7c8d..d60f543ca6 100644 --- a/src/ansys/mapdl/core/_commands/post1_/surface_operations.py +++ b/src/ansys/mapdl/core/_commands/post1_/surface_operations.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post1_/trace_points.py b/src/ansys/mapdl/core/_commands/post1_/trace_points.py index c116e9065e..c0e81cb8fb 100644 --- a/src/ansys/mapdl/core/_commands/post1_/trace_points.py +++ b/src/ansys/mapdl/core/_commands/post1_/trace_points.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post26_/__init__.py b/src/ansys/mapdl/core/_commands/post26_/__init__.py index 83cc0ecb60..5f396473ec 100644 --- a/src/ansys/mapdl/core/_commands/post26_/__init__.py +++ b/src/ansys/mapdl/core/_commands/post26_/__init__.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post26_/controls.py b/src/ansys/mapdl/core/_commands/post26_/controls.py index d68c5514e3..7e281b7a5f 100644 --- a/src/ansys/mapdl/core/_commands/post26_/controls.py +++ b/src/ansys/mapdl/core/_commands/post26_/controls.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post26_/display.py b/src/ansys/mapdl/core/_commands/post26_/display.py index 11c63d0de9..93550a5d46 100644 --- a/src/ansys/mapdl/core/_commands/post26_/display.py +++ b/src/ansys/mapdl/core/_commands/post26_/display.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post26_/listing.py b/src/ansys/mapdl/core/_commands/post26_/listing.py index 9130320622..f4290fde89 100644 --- a/src/ansys/mapdl/core/_commands/post26_/listing.py +++ b/src/ansys/mapdl/core/_commands/post26_/listing.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post26_/operations.py b/src/ansys/mapdl/core/_commands/post26_/operations.py index bdb5daee3a..7e72716c0e 100644 --- a/src/ansys/mapdl/core/_commands/post26_/operations.py +++ b/src/ansys/mapdl/core/_commands/post26_/operations.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post26_/setup.py b/src/ansys/mapdl/core/_commands/post26_/setup.py index eb3ac34de6..845f66fda2 100644 --- a/src/ansys/mapdl/core/_commands/post26_/setup.py +++ b/src/ansys/mapdl/core/_commands/post26_/setup.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post26_/special.py b/src/ansys/mapdl/core/_commands/post26_/special.py index 0dd8ed8d35..695d44e3ac 100644 --- a/src/ansys/mapdl/core/_commands/post26_/special.py +++ b/src/ansys/mapdl/core/_commands/post26_/special.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/post26_/status.py b/src/ansys/mapdl/core/_commands/post26_/status.py index 0cad542a57..fa3b84fc5d 100644 --- a/src/ansys/mapdl/core/_commands/post26_/status.py +++ b/src/ansys/mapdl/core/_commands/post26_/status.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/__init__.py b/src/ansys/mapdl/core/_commands/preproc/__init__.py index fef3ab8ae8..82c6e53ae7 100644 --- a/src/ansys/mapdl/core/_commands/preproc/__init__.py +++ b/src/ansys/mapdl/core/_commands/preproc/__init__.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/areas.py b/src/ansys/mapdl/core/_commands/preproc/areas.py index 1fedf0d65d..3cb6b2e483 100644 --- a/src/ansys/mapdl/core/_commands/preproc/areas.py +++ b/src/ansys/mapdl/core/_commands/preproc/areas.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/artificially_matched_layers.py b/src/ansys/mapdl/core/_commands/preproc/artificially_matched_layers.py index 0b3e00a8f5..af1fee0f82 100644 --- a/src/ansys/mapdl/core/_commands/preproc/artificially_matched_layers.py +++ b/src/ansys/mapdl/core/_commands/preproc/artificially_matched_layers.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/booleans.py b/src/ansys/mapdl/core/_commands/preproc/booleans.py index 0d161beab7..62adc3ec3f 100644 --- a/src/ansys/mapdl/core/_commands/preproc/booleans.py +++ b/src/ansys/mapdl/core/_commands/preproc/booleans.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/constraint_equations.py b/src/ansys/mapdl/core/_commands/preproc/constraint_equations.py index 598d7c2d56..cccd16e21c 100644 --- a/src/ansys/mapdl/core/_commands/preproc/constraint_equations.py +++ b/src/ansys/mapdl/core/_commands/preproc/constraint_equations.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/coupled_dof.py b/src/ansys/mapdl/core/_commands/preproc/coupled_dof.py index ad2ef604dc..4a3f8150d6 100644 --- a/src/ansys/mapdl/core/_commands/preproc/coupled_dof.py +++ b/src/ansys/mapdl/core/_commands/preproc/coupled_dof.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/database.py b/src/ansys/mapdl/core/_commands/preproc/database.py index 416e6b4465..3e5ee5d1b2 100644 --- a/src/ansys/mapdl/core/_commands/preproc/database.py +++ b/src/ansys/mapdl/core/_commands/preproc/database.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/digitizing.py b/src/ansys/mapdl/core/_commands/preproc/digitizing.py index a2b5d76066..822cea4450 100644 --- a/src/ansys/mapdl/core/_commands/preproc/digitizing.py +++ b/src/ansys/mapdl/core/_commands/preproc/digitizing.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/element_type.py b/src/ansys/mapdl/core/_commands/preproc/element_type.py index bfe21c2d46..d4f3d2ebc4 100644 --- a/src/ansys/mapdl/core/_commands/preproc/element_type.py +++ b/src/ansys/mapdl/core/_commands/preproc/element_type.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/elements.py b/src/ansys/mapdl/core/_commands/preproc/elements.py index 56c8742608..034dcb4002 100644 --- a/src/ansys/mapdl/core/_commands/preproc/elements.py +++ b/src/ansys/mapdl/core/_commands/preproc/elements.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/explicit_dynamics.py b/src/ansys/mapdl/core/_commands/preproc/explicit_dynamics.py index 41206e0ed3..901962d3a3 100644 --- a/src/ansys/mapdl/core/_commands/preproc/explicit_dynamics.py +++ b/src/ansys/mapdl/core/_commands/preproc/explicit_dynamics.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/hard_points.py b/src/ansys/mapdl/core/_commands/preproc/hard_points.py index 1c15c77921..c5877aca89 100644 --- a/src/ansys/mapdl/core/_commands/preproc/hard_points.py +++ b/src/ansys/mapdl/core/_commands/preproc/hard_points.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/keypoints.py b/src/ansys/mapdl/core/_commands/preproc/keypoints.py index 37ce6b2a7a..5237d8377a 100644 --- a/src/ansys/mapdl/core/_commands/preproc/keypoints.py +++ b/src/ansys/mapdl/core/_commands/preproc/keypoints.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/lines.py b/src/ansys/mapdl/core/_commands/preproc/lines.py index ce8084ecaf..52fa9771af 100644 --- a/src/ansys/mapdl/core/_commands/preproc/lines.py +++ b/src/ansys/mapdl/core/_commands/preproc/lines.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/material_data_tables.py b/src/ansys/mapdl/core/_commands/preproc/material_data_tables.py index a0c1c4dc33..15eef22159 100644 --- a/src/ansys/mapdl/core/_commands/preproc/material_data_tables.py +++ b/src/ansys/mapdl/core/_commands/preproc/material_data_tables.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/materials.py b/src/ansys/mapdl/core/_commands/preproc/materials.py index 1bc5c548ff..942b44407e 100644 --- a/src/ansys/mapdl/core/_commands/preproc/materials.py +++ b/src/ansys/mapdl/core/_commands/preproc/materials.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/meshing.py b/src/ansys/mapdl/core/_commands/preproc/meshing.py index 20a7dbe19b..01fe838e09 100644 --- a/src/ansys/mapdl/core/_commands/preproc/meshing.py +++ b/src/ansys/mapdl/core/_commands/preproc/meshing.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/morphing.py b/src/ansys/mapdl/core/_commands/preproc/morphing.py index f8ecc35c85..895174a398 100644 --- a/src/ansys/mapdl/core/_commands/preproc/morphing.py +++ b/src/ansys/mapdl/core/_commands/preproc/morphing.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/nodes.py b/src/ansys/mapdl/core/_commands/preproc/nodes.py index 48f2a43f78..72f0862ab2 100644 --- a/src/ansys/mapdl/core/_commands/preproc/nodes.py +++ b/src/ansys/mapdl/core/_commands/preproc/nodes.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/primitives.py b/src/ansys/mapdl/core/_commands/preproc/primitives.py index a4cd6cb2ae..5a41f1e46c 100644 --- a/src/ansys/mapdl/core/_commands/preproc/primitives.py +++ b/src/ansys/mapdl/core/_commands/preproc/primitives.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/real_constants.py b/src/ansys/mapdl/core/_commands/preproc/real_constants.py index 208be4b966..35a0b6bff9 100644 --- a/src/ansys/mapdl/core/_commands/preproc/real_constants.py +++ b/src/ansys/mapdl/core/_commands/preproc/real_constants.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/sections.py b/src/ansys/mapdl/core/_commands/preproc/sections.py index d95d7d1886..2f71902f06 100644 --- a/src/ansys/mapdl/core/_commands/preproc/sections.py +++ b/src/ansys/mapdl/core/_commands/preproc/sections.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/special_purpose.py b/src/ansys/mapdl/core/_commands/preproc/special_purpose.py index 6f36494d18..18bf3da44c 100644 --- a/src/ansys/mapdl/core/_commands/preproc/special_purpose.py +++ b/src/ansys/mapdl/core/_commands/preproc/special_purpose.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/status.py b/src/ansys/mapdl/core/_commands/preproc/status.py index f0beda5f80..084b2e1047 100644 --- a/src/ansys/mapdl/core/_commands/preproc/status.py +++ b/src/ansys/mapdl/core/_commands/preproc/status.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/superelements.py b/src/ansys/mapdl/core/_commands/preproc/superelements.py index e84bee2fa4..9a329e729d 100644 --- a/src/ansys/mapdl/core/_commands/preproc/superelements.py +++ b/src/ansys/mapdl/core/_commands/preproc/superelements.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/preproc/volumes.py b/src/ansys/mapdl/core/_commands/preproc/volumes.py index 5b19646c70..d725520d3d 100644 --- a/src/ansys/mapdl/core/_commands/preproc/volumes.py +++ b/src/ansys/mapdl/core/_commands/preproc/volumes.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/reduced/__init__.py b/src/ansys/mapdl/core/_commands/reduced/__init__.py index 58ba254361..21ba00eea9 100644 --- a/src/ansys/mapdl/core/_commands/reduced/__init__.py +++ b/src/ansys/mapdl/core/_commands/reduced/__init__.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/reduced/generation.py b/src/ansys/mapdl/core/_commands/reduced/generation.py index f712df48a2..699b546904 100644 --- a/src/ansys/mapdl/core/_commands/reduced/generation.py +++ b/src/ansys/mapdl/core/_commands/reduced/generation.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/reduced/preparation.py b/src/ansys/mapdl/core/_commands/reduced/preparation.py index f346efbf99..74e9c0f6c2 100644 --- a/src/ansys/mapdl/core/_commands/reduced/preparation.py +++ b/src/ansys/mapdl/core/_commands/reduced/preparation.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/reduced/setup.py b/src/ansys/mapdl/core/_commands/reduced/setup.py index 4101a0a21a..600617e9f8 100644 --- a/src/ansys/mapdl/core/_commands/reduced/setup.py +++ b/src/ansys/mapdl/core/_commands/reduced/setup.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/reduced/use_pass.py b/src/ansys/mapdl/core/_commands/reduced/use_pass.py index 32fad9af8f..0589ea1c7a 100644 --- a/src/ansys/mapdl/core/_commands/reduced/use_pass.py +++ b/src/ansys/mapdl/core/_commands/reduced/use_pass.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/session/__init__.py b/src/ansys/mapdl/core/_commands/session/__init__.py index ec94194b59..eff5c0cf7f 100644 --- a/src/ansys/mapdl/core/_commands/session/__init__.py +++ b/src/ansys/mapdl/core/_commands/session/__init__.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/session/files.py b/src/ansys/mapdl/core/_commands/session/files.py index 8fb0bfef7a..438e3f4cc2 100644 --- a/src/ansys/mapdl/core/_commands/session/files.py +++ b/src/ansys/mapdl/core/_commands/session/files.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/session/list_controls.py b/src/ansys/mapdl/core/_commands/session/list_controls.py index 6bcf014900..ef12613c01 100644 --- a/src/ansys/mapdl/core/_commands/session/list_controls.py +++ b/src/ansys/mapdl/core/_commands/session/list_controls.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/session/processor_entry.py b/src/ansys/mapdl/core/_commands/session/processor_entry.py index 6808731f03..4a86f311e8 100644 --- a/src/ansys/mapdl/core/_commands/session/processor_entry.py +++ b/src/ansys/mapdl/core/_commands/session/processor_entry.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/session/run_controls.py b/src/ansys/mapdl/core/_commands/session/run_controls.py index 29fea7ec2d..757e2b8707 100644 --- a/src/ansys/mapdl/core/_commands/session/run_controls.py +++ b/src/ansys/mapdl/core/_commands/session/run_controls.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/__init__.py b/src/ansys/mapdl/core/_commands/solution/__init__.py index 5e380d5786..38fa021bed 100644 --- a/src/ansys/mapdl/core/_commands/solution/__init__.py +++ b/src/ansys/mapdl/core/_commands/solution/__init__.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/all_others.py b/src/ansys/mapdl/core/_commands/solution/all_others.py index aa3054dc1b..b55dfdc012 100644 --- a/src/ansys/mapdl/core/_commands/solution/all_others.py +++ b/src/ansys/mapdl/core/_commands/solution/all_others.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/analysis_options.py b/src/ansys/mapdl/core/_commands/solution/analysis_options.py index e5b87da1e8..7c929dd9b5 100644 --- a/src/ansys/mapdl/core/_commands/solution/analysis_options.py +++ b/src/ansys/mapdl/core/_commands/solution/analysis_options.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/birth_and_death.py b/src/ansys/mapdl/core/_commands/solution/birth_and_death.py index 4ec4724e92..bd311f1a9f 100644 --- a/src/ansys/mapdl/core/_commands/solution/birth_and_death.py +++ b/src/ansys/mapdl/core/_commands/solution/birth_and_death.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/dynamic_options.py b/src/ansys/mapdl/core/_commands/solution/dynamic_options.py index 9be51e5846..c44501d652 100644 --- a/src/ansys/mapdl/core/_commands/solution/dynamic_options.py +++ b/src/ansys/mapdl/core/_commands/solution/dynamic_options.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/fe_body_loads.py b/src/ansys/mapdl/core/_commands/solution/fe_body_loads.py index 72eed11123..a5db23013f 100644 --- a/src/ansys/mapdl/core/_commands/solution/fe_body_loads.py +++ b/src/ansys/mapdl/core/_commands/solution/fe_body_loads.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/fe_constraints.py b/src/ansys/mapdl/core/_commands/solution/fe_constraints.py index 7b5bcf7c06..03c3a1fc41 100644 --- a/src/ansys/mapdl/core/_commands/solution/fe_constraints.py +++ b/src/ansys/mapdl/core/_commands/solution/fe_constraints.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/fe_forces.py b/src/ansys/mapdl/core/_commands/solution/fe_forces.py index 68584dfcad..1ed9f362b2 100644 --- a/src/ansys/mapdl/core/_commands/solution/fe_forces.py +++ b/src/ansys/mapdl/core/_commands/solution/fe_forces.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/fe_surface_loads.py b/src/ansys/mapdl/core/_commands/solution/fe_surface_loads.py index 1df5d96e69..97be8b4776 100644 --- a/src/ansys/mapdl/core/_commands/solution/fe_surface_loads.py +++ b/src/ansys/mapdl/core/_commands/solution/fe_surface_loads.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/gap_conditions.py b/src/ansys/mapdl/core/_commands/solution/gap_conditions.py index c73e56070a..0cfe0a5bb3 100644 --- a/src/ansys/mapdl/core/_commands/solution/gap_conditions.py +++ b/src/ansys/mapdl/core/_commands/solution/gap_conditions.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/inertia.py b/src/ansys/mapdl/core/_commands/solution/inertia.py index a456de49ea..77fed6f5e7 100644 --- a/src/ansys/mapdl/core/_commands/solution/inertia.py +++ b/src/ansys/mapdl/core/_commands/solution/inertia.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/load_step_operations.py b/src/ansys/mapdl/core/_commands/solution/load_step_operations.py index 28cf878d34..c1062969dc 100644 --- a/src/ansys/mapdl/core/_commands/solution/load_step_operations.py +++ b/src/ansys/mapdl/core/_commands/solution/load_step_operations.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/load_step_options.py b/src/ansys/mapdl/core/_commands/solution/load_step_options.py index d3b92330cd..0f12b9aefe 100644 --- a/src/ansys/mapdl/core/_commands/solution/load_step_options.py +++ b/src/ansys/mapdl/core/_commands/solution/load_step_options.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/master_dof.py b/src/ansys/mapdl/core/_commands/solution/master_dof.py index 3e308853fd..451bad8539 100644 --- a/src/ansys/mapdl/core/_commands/solution/master_dof.py +++ b/src/ansys/mapdl/core/_commands/solution/master_dof.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/miscellaneous_loads.py b/src/ansys/mapdl/core/_commands/solution/miscellaneous_loads.py index 4d52bdbfd3..a2acb01c8f 100644 --- a/src/ansys/mapdl/core/_commands/solution/miscellaneous_loads.py +++ b/src/ansys/mapdl/core/_commands/solution/miscellaneous_loads.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_convergence_controls.py b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_convergence_controls.py index fb0b66cb4d..263c209d93 100644 --- a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_convergence_controls.py +++ b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_convergence_controls.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_definition_commands.py b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_definition_commands.py index a58b531e28..7c984d82a7 100644 --- a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_definition_commands.py +++ b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_definition_commands.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_global_controls.py b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_global_controls.py index a47bd97577..23f2c06f0e 100644 --- a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_global_controls.py +++ b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_global_controls.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_interface_mapping.py b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_interface_mapping.py index 3a84e76db1..3b13664bb1 100644 --- a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_interface_mapping.py +++ b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_interface_mapping.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_load_transfer.py b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_load_transfer.py index e12f27e5fe..3f9ce0dc3b 100644 --- a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_load_transfer.py +++ b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_load_transfer.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_time_controls.py b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_time_controls.py index 6a495523b3..a97645aa2c 100644 --- a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_time_controls.py +++ b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_time_controls.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/nonlinear_options.py b/src/ansys/mapdl/core/_commands/solution/nonlinear_options.py index aea81e12b8..d990be3a8f 100644 --- a/src/ansys/mapdl/core/_commands/solution/nonlinear_options.py +++ b/src/ansys/mapdl/core/_commands/solution/nonlinear_options.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/ocean.py b/src/ansys/mapdl/core/_commands/solution/ocean.py index af8669f56c..ac609817c9 100644 --- a/src/ansys/mapdl/core/_commands/solution/ocean.py +++ b/src/ansys/mapdl/core/_commands/solution/ocean.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/radiosity.py b/src/ansys/mapdl/core/_commands/solution/radiosity.py index 67063800b4..8bab8c3e4b 100644 --- a/src/ansys/mapdl/core/_commands/solution/radiosity.py +++ b/src/ansys/mapdl/core/_commands/solution/radiosity.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/rezoning.py b/src/ansys/mapdl/core/_commands/solution/rezoning.py index a6b9ff95ef..d47d47db9a 100644 --- a/src/ansys/mapdl/core/_commands/solution/rezoning.py +++ b/src/ansys/mapdl/core/_commands/solution/rezoning.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/solid_body_loads.py b/src/ansys/mapdl/core/_commands/solution/solid_body_loads.py index 1a66374b53..53e690e6dd 100644 --- a/src/ansys/mapdl/core/_commands/solution/solid_body_loads.py +++ b/src/ansys/mapdl/core/_commands/solution/solid_body_loads.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/solid_constraints.py b/src/ansys/mapdl/core/_commands/solution/solid_constraints.py index 1198c6a44d..19300657ce 100644 --- a/src/ansys/mapdl/core/_commands/solution/solid_constraints.py +++ b/src/ansys/mapdl/core/_commands/solution/solid_constraints.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/solid_forces.py b/src/ansys/mapdl/core/_commands/solution/solid_forces.py index 811e2fd5c1..4ed81c47bd 100644 --- a/src/ansys/mapdl/core/_commands/solution/solid_forces.py +++ b/src/ansys/mapdl/core/_commands/solution/solid_forces.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/solid_surface_loads.py b/src/ansys/mapdl/core/_commands/solution/solid_surface_loads.py index 948862075a..02ed56ce75 100644 --- a/src/ansys/mapdl/core/_commands/solution/solid_surface_loads.py +++ b/src/ansys/mapdl/core/_commands/solution/solid_surface_loads.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/solution_status.py b/src/ansys/mapdl/core/_commands/solution/solution_status.py index 85a9c5ccd7..9dc68213b4 100644 --- a/src/ansys/mapdl/core/_commands/solution/solution_status.py +++ b/src/ansys/mapdl/core/_commands/solution/solution_status.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/spectrum_options.py b/src/ansys/mapdl/core/_commands/solution/spectrum_options.py index 5dc638af54..596a441774 100644 --- a/src/ansys/mapdl/core/_commands/solution/spectrum_options.py +++ b/src/ansys/mapdl/core/_commands/solution/spectrum_options.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_commands/solution/twod_to_3d_analysis.py b/src/ansys/mapdl/core/_commands/solution/twod_to_3d_analysis.py index fcdc1b47fc..e354bff531 100644 --- a/src/ansys/mapdl/core/_commands/solution/twod_to_3d_analysis.py +++ b/src/ansys/mapdl/core/_commands/solution/twod_to_3d_analysis.py @@ -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 # # diff --git a/src/ansys/mapdl/core/_version.py b/src/ansys/mapdl/core/_version.py index ed3dafa51a..0cb7a04bad 100644 --- a/src/ansys/mapdl/core/_version.py +++ b/src/ansys/mapdl/core/_version.py @@ -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 # # diff --git a/src/ansys/mapdl/core/cli/__init__.py b/src/ansys/mapdl/core/cli/__init__.py index 623d78d662..040b9493c8 100644 --- a/src/ansys/mapdl/core/cli/__init__.py +++ b/src/ansys/mapdl/core/cli/__init__.py @@ -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 # # diff --git a/src/ansys/mapdl/core/cli/convert.py b/src/ansys/mapdl/core/cli/convert.py index e8f8b76a6e..0b5b9a56eb 100644 --- a/src/ansys/mapdl/core/cli/convert.py +++ b/src/ansys/mapdl/core/cli/convert.py @@ -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 # # diff --git a/src/ansys/mapdl/core/cli/list_instances.py b/src/ansys/mapdl/core/cli/list_instances.py index 49038dde8c..6256996848 100644 --- a/src/ansys/mapdl/core/cli/list_instances.py +++ b/src/ansys/mapdl/core/cli/list_instances.py @@ -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 # # diff --git a/src/ansys/mapdl/core/cli/start.py b/src/ansys/mapdl/core/cli/start.py index 3771b244d6..c34b3e7bbc 100644 --- a/src/ansys/mapdl/core/cli/start.py +++ b/src/ansys/mapdl/core/cli/start.py @@ -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 # # diff --git a/src/ansys/mapdl/core/cli/stop.py b/src/ansys/mapdl/core/cli/stop.py index 213c6e1041..e49ebbff0c 100644 --- a/src/ansys/mapdl/core/cli/stop.py +++ b/src/ansys/mapdl/core/cli/stop.py @@ -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 # # diff --git a/src/ansys/mapdl/core/commands.py b/src/ansys/mapdl/core/commands.py index 2f1e3a0eec..c4be09cf26 100644 --- a/src/ansys/mapdl/core/commands.py +++ b/src/ansys/mapdl/core/commands.py @@ -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 # # diff --git a/src/ansys/mapdl/core/common_grpc.py b/src/ansys/mapdl/core/common_grpc.py index 65ac3fc5f7..95c9e87a90 100644 --- a/src/ansys/mapdl/core/common_grpc.py +++ b/src/ansys/mapdl/core/common_grpc.py @@ -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 # # diff --git a/src/ansys/mapdl/core/component.py b/src/ansys/mapdl/core/component.py index 2f1b989dd2..402f229338 100644 --- a/src/ansys/mapdl/core/component.py +++ b/src/ansys/mapdl/core/component.py @@ -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 # # diff --git a/src/ansys/mapdl/core/convert.py b/src/ansys/mapdl/core/convert.py index 36426971a0..8784c0f745 100644 --- a/src/ansys/mapdl/core/convert.py +++ b/src/ansys/mapdl/core/convert.py @@ -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 # # diff --git a/src/ansys/mapdl/core/database/__init__.py b/src/ansys/mapdl/core/database/__init__.py index 15ab923f7a..a842823bc6 100644 --- a/src/ansys/mapdl/core/database/__init__.py +++ b/src/ansys/mapdl/core/database/__init__.py @@ -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 # # diff --git a/src/ansys/mapdl/core/database/database.py b/src/ansys/mapdl/core/database/database.py index ee8aa44dcb..3e395a6297 100644 --- a/src/ansys/mapdl/core/database/database.py +++ b/src/ansys/mapdl/core/database/database.py @@ -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 # # diff --git a/src/ansys/mapdl/core/database/elems.py b/src/ansys/mapdl/core/database/elems.py index 2e96528d9d..7680df8e98 100644 --- a/src/ansys/mapdl/core/database/elems.py +++ b/src/ansys/mapdl/core/database/elems.py @@ -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 # # diff --git a/src/ansys/mapdl/core/database/nodes.py b/src/ansys/mapdl/core/database/nodes.py index c98c469b01..938a894558 100644 --- a/src/ansys/mapdl/core/database/nodes.py +++ b/src/ansys/mapdl/core/database/nodes.py @@ -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 # # diff --git a/src/ansys/mapdl/core/errors.py b/src/ansys/mapdl/core/errors.py index 65c3172a65..a9723e5115 100644 --- a/src/ansys/mapdl/core/errors.py +++ b/src/ansys/mapdl/core/errors.py @@ -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 # # diff --git a/src/ansys/mapdl/core/examples/__init__.py b/src/ansys/mapdl/core/examples/__init__.py index c5af09b6b6..dc202a9874 100644 --- a/src/ansys/mapdl/core/examples/__init__.py +++ b/src/ansys/mapdl/core/examples/__init__.py @@ -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 # # diff --git a/src/ansys/mapdl/core/examples/downloads.py b/src/ansys/mapdl/core/examples/downloads.py index e8acc07aee..dd4c8a02d8 100644 --- a/src/ansys/mapdl/core/examples/downloads.py +++ b/src/ansys/mapdl/core/examples/downloads.py @@ -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 # # diff --git a/src/ansys/mapdl/core/examples/examples.py b/src/ansys/mapdl/core/examples/examples.py index d8d60e7003..5f0489dd9a 100644 --- a/src/ansys/mapdl/core/examples/examples.py +++ b/src/ansys/mapdl/core/examples/examples.py @@ -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 # # diff --git a/src/ansys/mapdl/core/examples/verif_files.py b/src/ansys/mapdl/core/examples/verif_files.py index 327c4f8989..a34ca23d74 100755 --- a/src/ansys/mapdl/core/examples/verif_files.py +++ b/src/ansys/mapdl/core/examples/verif_files.py @@ -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 # # diff --git a/src/ansys/mapdl/core/helpers.py b/src/ansys/mapdl/core/helpers.py index 0f70d2096d..a42dc70390 100644 --- a/src/ansys/mapdl/core/helpers.py +++ b/src/ansys/mapdl/core/helpers.py @@ -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 # # diff --git a/src/ansys/mapdl/core/information.py b/src/ansys/mapdl/core/information.py index 3cd447a4a2..35a6ba792b 100644 --- a/src/ansys/mapdl/core/information.py +++ b/src/ansys/mapdl/core/information.py @@ -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 # # diff --git a/src/ansys/mapdl/core/inline_functions/__init__.py b/src/ansys/mapdl/core/inline_functions/__init__.py index 466797780e..3433c2900f 100644 --- a/src/ansys/mapdl/core/inline_functions/__init__.py +++ b/src/ansys/mapdl/core/inline_functions/__init__.py @@ -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 # # diff --git a/src/ansys/mapdl/core/inline_functions/component_queries.py b/src/ansys/mapdl/core/inline_functions/component_queries.py index 5cb10f5dac..1091e8f47f 100644 --- a/src/ansys/mapdl/core/inline_functions/component_queries.py +++ b/src/ansys/mapdl/core/inline_functions/component_queries.py @@ -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 # # diff --git a/src/ansys/mapdl/core/inline_functions/connectivity_queries.py b/src/ansys/mapdl/core/inline_functions/connectivity_queries.py index 1314e05d0b..3fc143889c 100644 --- a/src/ansys/mapdl/core/inline_functions/connectivity_queries.py +++ b/src/ansys/mapdl/core/inline_functions/connectivity_queries.py @@ -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 # # diff --git a/src/ansys/mapdl/core/inline_functions/core.py b/src/ansys/mapdl/core/inline_functions/core.py index 44032cc8c6..110cefa683 100644 --- a/src/ansys/mapdl/core/inline_functions/core.py +++ b/src/ansys/mapdl/core/inline_functions/core.py @@ -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 # # diff --git a/src/ansys/mapdl/core/inline_functions/geometry_queries.py b/src/ansys/mapdl/core/inline_functions/geometry_queries.py index eb44ea59ef..16fa9bbbca 100644 --- a/src/ansys/mapdl/core/inline_functions/geometry_queries.py +++ b/src/ansys/mapdl/core/inline_functions/geometry_queries.py @@ -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 # # diff --git a/src/ansys/mapdl/core/inline_functions/inline_functions.py b/src/ansys/mapdl/core/inline_functions/inline_functions.py index 724409ebed..05eb2aca91 100644 --- a/src/ansys/mapdl/core/inline_functions/inline_functions.py +++ b/src/ansys/mapdl/core/inline_functions/inline_functions.py @@ -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 # # diff --git a/src/ansys/mapdl/core/inline_functions/line_queries.py b/src/ansys/mapdl/core/inline_functions/line_queries.py index 2b4b9f87ca..6063ffc3a4 100644 --- a/src/ansys/mapdl/core/inline_functions/line_queries.py +++ b/src/ansys/mapdl/core/inline_functions/line_queries.py @@ -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 # # diff --git a/src/ansys/mapdl/core/inline_functions/nearest_queries.py b/src/ansys/mapdl/core/inline_functions/nearest_queries.py index 9fbb41b637..5d01d9fea3 100644 --- a/src/ansys/mapdl/core/inline_functions/nearest_queries.py +++ b/src/ansys/mapdl/core/inline_functions/nearest_queries.py @@ -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 # # diff --git a/src/ansys/mapdl/core/inline_functions/normals_queries.py b/src/ansys/mapdl/core/inline_functions/normals_queries.py index 151733f77b..76d7ae67a3 100644 --- a/src/ansys/mapdl/core/inline_functions/normals_queries.py +++ b/src/ansys/mapdl/core/inline_functions/normals_queries.py @@ -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 # # diff --git a/src/ansys/mapdl/core/inline_functions/scalar_queries.py b/src/ansys/mapdl/core/inline_functions/scalar_queries.py index 038ea4fb80..07bf542808 100644 --- a/src/ansys/mapdl/core/inline_functions/scalar_queries.py +++ b/src/ansys/mapdl/core/inline_functions/scalar_queries.py @@ -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 # # diff --git a/src/ansys/mapdl/core/inline_functions/selection_queries.py b/src/ansys/mapdl/core/inline_functions/selection_queries.py index 10b5b1b30e..bba1882fd4 100644 --- a/src/ansys/mapdl/core/inline_functions/selection_queries.py +++ b/src/ansys/mapdl/core/inline_functions/selection_queries.py @@ -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 # # diff --git a/src/ansys/mapdl/core/jupyter.py b/src/ansys/mapdl/core/jupyter.py index 3ccec5e20d..72a3818f50 100644 --- a/src/ansys/mapdl/core/jupyter.py +++ b/src/ansys/mapdl/core/jupyter.py @@ -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 # # diff --git a/src/ansys/mapdl/core/krylov.py b/src/ansys/mapdl/core/krylov.py index c035c82968..82ea6b430a 100644 --- a/src/ansys/mapdl/core/krylov.py +++ b/src/ansys/mapdl/core/krylov.py @@ -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 # # diff --git a/src/ansys/mapdl/core/launcher.py b/src/ansys/mapdl/core/launcher.py index c1fe799fc3..55a3efb8bc 100644 --- a/src/ansys/mapdl/core/launcher.py +++ b/src/ansys/mapdl/core/launcher.py @@ -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 # # diff --git a/src/ansys/mapdl/core/licensing.py b/src/ansys/mapdl/core/licensing.py index 6fd4d8beea..a459096cd4 100644 --- a/src/ansys/mapdl/core/licensing.py +++ b/src/ansys/mapdl/core/licensing.py @@ -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 # # diff --git a/src/ansys/mapdl/core/logging.py b/src/ansys/mapdl/core/logging.py index 9c5b8f62f2..d695bcd36d 100644 --- a/src/ansys/mapdl/core/logging.py +++ b/src/ansys/mapdl/core/logging.py @@ -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 # # diff --git a/src/ansys/mapdl/core/mapdl.py b/src/ansys/mapdl/core/mapdl.py index 5f0b58005e..57b0684f8e 100644 --- a/src/ansys/mapdl/core/mapdl.py +++ b/src/ansys/mapdl/core/mapdl.py @@ -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 # # diff --git a/src/ansys/mapdl/core/mapdl_console.py b/src/ansys/mapdl/core/mapdl_console.py index 9457143068..6931d8cfca 100644 --- a/src/ansys/mapdl/core/mapdl_console.py +++ b/src/ansys/mapdl/core/mapdl_console.py @@ -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 # # diff --git a/src/ansys/mapdl/core/mapdl_core.py b/src/ansys/mapdl/core/mapdl_core.py index 3d745a09ee..afce90bf67 100644 --- a/src/ansys/mapdl/core/mapdl_core.py +++ b/src/ansys/mapdl/core/mapdl_core.py @@ -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 # # diff --git a/src/ansys/mapdl/core/mapdl_extended.py b/src/ansys/mapdl/core/mapdl_extended.py index a12ba23392..1f184150b2 100644 --- a/src/ansys/mapdl/core/mapdl_extended.py +++ b/src/ansys/mapdl/core/mapdl_extended.py @@ -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 # # diff --git a/src/ansys/mapdl/core/mapdl_geometry.py b/src/ansys/mapdl/core/mapdl_geometry.py index fca96f5861..59b727a911 100644 --- a/src/ansys/mapdl/core/mapdl_geometry.py +++ b/src/ansys/mapdl/core/mapdl_geometry.py @@ -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 # # diff --git a/src/ansys/mapdl/core/mapdl_grpc.py b/src/ansys/mapdl/core/mapdl_grpc.py index 466317f181..2ff727025c 100644 --- a/src/ansys/mapdl/core/mapdl_grpc.py +++ b/src/ansys/mapdl/core/mapdl_grpc.py @@ -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 # # diff --git a/src/ansys/mapdl/core/mapdl_inprocess.py b/src/ansys/mapdl/core/mapdl_inprocess.py index f9f500ce25..ca486cf9f4 100644 --- a/src/ansys/mapdl/core/mapdl_inprocess.py +++ b/src/ansys/mapdl/core/mapdl_inprocess.py @@ -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 # # diff --git a/src/ansys/mapdl/core/mapdl_types.py b/src/ansys/mapdl/core/mapdl_types.py index 22afd033fc..09a54db7ed 100644 --- a/src/ansys/mapdl/core/mapdl_types.py +++ b/src/ansys/mapdl/core/mapdl_types.py @@ -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 # # diff --git a/src/ansys/mapdl/core/mesh/__init__.py b/src/ansys/mapdl/core/mesh/__init__.py index aa3054dc1b..b55dfdc012 100644 --- a/src/ansys/mapdl/core/mesh/__init__.py +++ b/src/ansys/mapdl/core/mesh/__init__.py @@ -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 # # diff --git a/src/ansys/mapdl/core/mesh/mesh.py b/src/ansys/mapdl/core/mesh/mesh.py index 6853d237d6..0c989bbe6c 100644 --- a/src/ansys/mapdl/core/mesh/mesh.py +++ b/src/ansys/mapdl/core/mesh/mesh.py @@ -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 # # diff --git a/src/ansys/mapdl/core/mesh_grpc.py b/src/ansys/mapdl/core/mesh_grpc.py index 93e98654ad..dc24f30639 100644 --- a/src/ansys/mapdl/core/mesh_grpc.py +++ b/src/ansys/mapdl/core/mesh_grpc.py @@ -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 # # diff --git a/src/ansys/mapdl/core/misc.py b/src/ansys/mapdl/core/misc.py index 1c14e05610..610f6821ff 100644 --- a/src/ansys/mapdl/core/misc.py +++ b/src/ansys/mapdl/core/misc.py @@ -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 # # diff --git a/src/ansys/mapdl/core/parameters.py b/src/ansys/mapdl/core/parameters.py index 8178e44a0b..7b33bd3a8d 100644 --- a/src/ansys/mapdl/core/parameters.py +++ b/src/ansys/mapdl/core/parameters.py @@ -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 # # diff --git a/src/ansys/mapdl/core/plotting/__init__.py b/src/ansys/mapdl/core/plotting/__init__.py index 88dcdee1f1..a3f379af20 100644 --- a/src/ansys/mapdl/core/plotting/__init__.py +++ b/src/ansys/mapdl/core/plotting/__init__.py @@ -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 # # diff --git a/src/ansys/mapdl/core/plotting/consts.py b/src/ansys/mapdl/core/plotting/consts.py index d091473eaf..8d1ee9d427 100644 --- a/src/ansys/mapdl/core/plotting/consts.py +++ b/src/ansys/mapdl/core/plotting/consts.py @@ -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 # # diff --git a/src/ansys/mapdl/core/plotting/plotting_defaults.py b/src/ansys/mapdl/core/plotting/plotting_defaults.py index a734355e36..801ff6fca4 100644 --- a/src/ansys/mapdl/core/plotting/plotting_defaults.py +++ b/src/ansys/mapdl/core/plotting/plotting_defaults.py @@ -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 # # diff --git a/src/ansys/mapdl/core/plotting/theme.py b/src/ansys/mapdl/core/plotting/theme.py index 1b8ed546f6..9dab277cc1 100644 --- a/src/ansys/mapdl/core/plotting/theme.py +++ b/src/ansys/mapdl/core/plotting/theme.py @@ -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 # # diff --git a/src/ansys/mapdl/core/plotting/visualizer.py b/src/ansys/mapdl/core/plotting/visualizer.py index 6f36a527bd..f4df50e8d8 100644 --- a/src/ansys/mapdl/core/plotting/visualizer.py +++ b/src/ansys/mapdl/core/plotting/visualizer.py @@ -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 # # diff --git a/src/ansys/mapdl/core/pool.py b/src/ansys/mapdl/core/pool.py index 40e22ae2b1..5a53d5f9f8 100755 --- a/src/ansys/mapdl/core/pool.py +++ b/src/ansys/mapdl/core/pool.py @@ -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 # # diff --git a/src/ansys/mapdl/core/post.py b/src/ansys/mapdl/core/post.py index 3beca9c2d6..18ebc102c4 100644 --- a/src/ansys/mapdl/core/post.py +++ b/src/ansys/mapdl/core/post.py @@ -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 # # diff --git a/src/ansys/mapdl/core/report.py b/src/ansys/mapdl/core/report.py index bfa9382185..0cc3a6d3dc 100644 --- a/src/ansys/mapdl/core/report.py +++ b/src/ansys/mapdl/core/report.py @@ -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 # # diff --git a/src/ansys/mapdl/core/solution.py b/src/ansys/mapdl/core/solution.py index 09d6478e44..4b7534827f 100644 --- a/src/ansys/mapdl/core/solution.py +++ b/src/ansys/mapdl/core/solution.py @@ -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 # # diff --git a/src/ansys/mapdl/core/xpl.py b/src/ansys/mapdl/core/xpl.py index 76d6086039..a7e0542bf2 100644 --- a/src/ansys/mapdl/core/xpl.py +++ b/src/ansys/mapdl/core/xpl.py @@ -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 # # diff --git a/tests/common.py b/tests/common.py index a42b29a27e..9c90fdd9de 100644 --- a/tests/common.py +++ b/tests/common.py @@ -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 # # diff --git a/tests/conftest.py b/tests/conftest.py index 023bbddd10..660a088a23 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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 # # diff --git a/tests/test_cli.py b/tests/test_cli.py index bd3c9377b0..a59b957038 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -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 # # diff --git a/tests/test_commands.py b/tests/test_commands.py index ffc4047e98..1b154470c1 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -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 # # diff --git a/tests/test_component.py b/tests/test_component.py index da5ebd91f6..aa790c4ff7 100644 --- a/tests/test_component.py +++ b/tests/test_component.py @@ -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 # # diff --git a/tests/test_console.py b/tests/test_console.py index 0153ffb60f..02aae3c419 100644 --- a/tests/test_console.py +++ b/tests/test_console.py @@ -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 # # diff --git a/tests/test_convert.py b/tests/test_convert.py index a1eae9a8f5..3f659315bc 100644 --- a/tests/test_convert.py +++ b/tests/test_convert.py @@ -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 # # diff --git a/tests/test_database.py b/tests/test_database.py index f489c31650..a7fd1edc63 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -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 # # diff --git a/tests/test_dpf.py b/tests/test_dpf.py index 23c27a6598..882e4e1f7e 100644 --- a/tests/test_dpf.py +++ b/tests/test_dpf.py @@ -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 # # diff --git a/tests/test_element.py b/tests/test_element.py index 9df3aa4d10..a078c76cd6 100644 --- a/tests/test_element.py +++ b/tests/test_element.py @@ -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 # # diff --git a/tests/test_errors.py b/tests/test_errors.py index 4cb65fdec5..cf862464cd 100644 --- a/tests/test_errors.py +++ b/tests/test_errors.py @@ -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 # # diff --git a/tests/test_examples.py b/tests/test_examples.py index 43b769776a..a7c9bdcf9a 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -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 # # diff --git a/tests/test_geometry.py b/tests/test_geometry.py index 9d69f86a90..59c6e5589f 100644 --- a/tests/test_geometry.py +++ b/tests/test_geometry.py @@ -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 # # diff --git a/tests/test_grpc.py b/tests/test_grpc.py index d5cc35e4ca..808de4afab 100644 --- a/tests/test_grpc.py +++ b/tests/test_grpc.py @@ -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 # # diff --git a/tests/test_importing_geometries.py b/tests/test_importing_geometries.py index adcd622686..f142482685 100644 --- a/tests/test_importing_geometries.py +++ b/tests/test_importing_geometries.py @@ -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 # # diff --git a/tests/test_information.py b/tests/test_information.py index 8d2f5cfebf..d09a67f420 100644 --- a/tests/test_information.py +++ b/tests/test_information.py @@ -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 # # diff --git a/tests/test_inline_functions/test_component_queries.py b/tests/test_inline_functions/test_component_queries.py index 212e835049..5749fced27 100644 --- a/tests/test_inline_functions/test_component_queries.py +++ b/tests/test_inline_functions/test_component_queries.py @@ -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 # # diff --git a/tests/test_inline_functions/test_connectivity_queries.py b/tests/test_inline_functions/test_connectivity_queries.py index 3f638e08ef..127a9c7d38 100644 --- a/tests/test_inline_functions/test_connectivity_queries.py +++ b/tests/test_inline_functions/test_connectivity_queries.py @@ -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 # # diff --git a/tests/test_inline_functions/test_field_component_queries.py b/tests/test_inline_functions/test_field_component_queries.py index f67606d5bf..5b4dd3fe52 100644 --- a/tests/test_inline_functions/test_field_component_queries.py +++ b/tests/test_inline_functions/test_field_component_queries.py @@ -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 # # diff --git a/tests/test_inline_functions/test_geometry_queries.py b/tests/test_inline_functions/test_geometry_queries.py index a6cdd4a56e..6a4e823bdd 100644 --- a/tests/test_inline_functions/test_geometry_queries.py +++ b/tests/test_inline_functions/test_geometry_queries.py @@ -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 # # diff --git a/tests/test_inline_functions/test_line_component_queries.py b/tests/test_inline_functions/test_line_component_queries.py index f3719f23e9..c8e4186a87 100644 --- a/tests/test_inline_functions/test_line_component_queries.py +++ b/tests/test_inline_functions/test_line_component_queries.py @@ -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 # # diff --git a/tests/test_inline_functions/test_nearest_queries.py b/tests/test_inline_functions/test_nearest_queries.py index 4b0b69fec0..cc4b0720a6 100644 --- a/tests/test_inline_functions/test_nearest_queries.py +++ b/tests/test_inline_functions/test_nearest_queries.py @@ -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 # # diff --git a/tests/test_inline_functions/test_normals_queries.py b/tests/test_inline_functions/test_normals_queries.py index 3cf7a453d8..dae67e190d 100644 --- a/tests/test_inline_functions/test_normals_queries.py +++ b/tests/test_inline_functions/test_normals_queries.py @@ -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 # # diff --git a/tests/test_inline_functions/test_query.py b/tests/test_inline_functions/test_query.py index 442e9ecf18..fe3b3c0d8b 100644 --- a/tests/test_inline_functions/test_query.py +++ b/tests/test_inline_functions/test_query.py @@ -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 # # diff --git a/tests/test_inline_functions/test_selection_queries.py b/tests/test_inline_functions/test_selection_queries.py index 7a754fc666..23e4a2b92a 100644 --- a/tests/test_inline_functions/test_selection_queries.py +++ b/tests/test_inline_functions/test_selection_queries.py @@ -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 # # diff --git a/tests/test_krylov.py b/tests/test_krylov.py index cab575a733..9a3c83c456 100644 --- a/tests/test_krylov.py +++ b/tests/test_krylov.py @@ -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 # # diff --git a/tests/test_launcher.py b/tests/test_launcher.py index 8fbe9a0c54..c1de62b542 100644 --- a/tests/test_launcher.py +++ b/tests/test_launcher.py @@ -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 # # diff --git a/tests/test_launcher_remote.py b/tests/test_launcher_remote.py index f653f78fb4..fa5e937085 100644 --- a/tests/test_launcher_remote.py +++ b/tests/test_launcher_remote.py @@ -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 # # diff --git a/tests/test_licensing.py b/tests/test_licensing.py index b730ec6b2f..3bd1bbfd77 100644 --- a/tests/test_licensing.py +++ b/tests/test_licensing.py @@ -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 # # diff --git a/tests/test_logging.py b/tests/test_logging.py index 0b97a7c5c6..35069035d4 100644 --- a/tests/test_logging.py +++ b/tests/test_logging.py @@ -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 # # diff --git a/tests/test_mapdl.py b/tests/test_mapdl.py index 9565247f13..01ffef4650 100644 --- a/tests/test_mapdl.py +++ b/tests/test_mapdl.py @@ -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 # # diff --git a/tests/test_mesh_grpc.py b/tests/test_mesh_grpc.py index afbf339b4a..a0aaf421f7 100644 --- a/tests/test_mesh_grpc.py +++ b/tests/test_mesh_grpc.py @@ -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 # # diff --git a/tests/test_misc.py b/tests/test_misc.py index ed2be5c6bb..e891c2e94f 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -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 # # diff --git a/tests/test_parameters.py b/tests/test_parameters.py index f0c66f2dc8..f797b89173 100644 --- a/tests/test_parameters.py +++ b/tests/test_parameters.py @@ -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 # # diff --git a/tests/test_plotting.py b/tests/test_plotting.py index e210f6ed23..d9e8a6a29d 100644 --- a/tests/test_plotting.py +++ b/tests/test_plotting.py @@ -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 # # diff --git a/tests/test_pool.py b/tests/test_pool.py index 61d920144c..5e73940a30 100644 --- a/tests/test_pool.py +++ b/tests/test_pool.py @@ -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 # # diff --git a/tests/test_post.py b/tests/test_post.py index 7eca8fcbba..42619bb036 100644 --- a/tests/test_post.py +++ b/tests/test_post.py @@ -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 # # diff --git a/tests/test_report.py b/tests/test_report.py index 4857dbf345..c32bb7a37f 100644 --- a/tests/test_report.py +++ b/tests/test_report.py @@ -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 # # diff --git a/tests/test_solution.py b/tests/test_solution.py index 985a0939fb..00a9e64a0e 100644 --- a/tests/test_solution.py +++ b/tests/test_solution.py @@ -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 # # diff --git a/tests/test_theme.py b/tests/test_theme.py index 9046634a04..25073c34ee 100644 --- a/tests/test_theme.py +++ b/tests/test_theme.py @@ -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 # # diff --git a/tests/test_xpl.py b/tests/test_xpl.py index 6c85f14e53..979b58d594 100644 --- a/tests/test_xpl.py +++ b/tests/test_xpl.py @@ -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 # # From 841313d8d4aff7f790320825f41d3d3fe2a00a03 Mon Sep 17 00:00:00 2001 From: Maxime Rey <87315832+MaxJPRey@users.noreply.github.com> Date: Tue, 7 Jan 2025 14:33:03 +0100 Subject: [PATCH 08/17] refactor: Iterate over the dictionary directly instead of using .keys(). (#3631) * Iterate over the dictionay directly instead of using .keys(). * chore: adding changelog file 3631.added.md [dependabot-skip] * chore: adding changelog file 3631.added.md [dependabot-skip] * chore: update src/ansys/mapdl/core/pool.py * ci: auto fixes from pre-commit.com hooks. for more information, see https://pre-commit.ci * ci: auto fixes from pre-commit.com hooks. for more information, see https://pre-commit.ci * chore: empty commit to trigger CICD --------- Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Co-authored-by: German <28149841+germa89@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- doc/changelog.d/3631.added.md | 1 + src/ansys/mapdl/core/commands.py | 4 ++-- src/ansys/mapdl/core/mapdl_grpc.py | 12 +++++------- src/ansys/mapdl/core/pool.py | 6 ++++-- 4 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 doc/changelog.d/3631.added.md diff --git a/doc/changelog.d/3631.added.md b/doc/changelog.d/3631.added.md new file mode 100644 index 0000000000..58c163cb3c --- /dev/null +++ b/doc/changelog.d/3631.added.md @@ -0,0 +1 @@ +refactor: Iterate over the dictionary directly instead of using .keys(). \ No newline at end of file diff --git a/src/ansys/mapdl/core/commands.py b/src/ansys/mapdl/core/commands.py index c4be09cf26..c6c7c489cf 100644 --- a/src/ansys/mapdl/core/commands.py +++ b/src/ansys/mapdl/core/commands.py @@ -845,8 +845,8 @@ def bc_colnames(self) -> Optional[List[str]]: title = self._get_body()[0] - _bcType = [i for i in bc_type.keys() if i in title] - _entity = [i for i in entity.keys() if i in title] + _bcType = [i for i in bc_type if i in title] + _entity = [i for i in entity if i in title] if _bcType and _entity: diff --git a/src/ansys/mapdl/core/mapdl_grpc.py b/src/ansys/mapdl/core/mapdl_grpc.py index 2ff727025c..4660d69e1e 100644 --- a/src/ansys/mapdl/core/mapdl_grpc.py +++ b/src/ansys/mapdl/core/mapdl_grpc.py @@ -2941,7 +2941,7 @@ def _mat_data(self, pname, raw=False): @property def locked(self): - """Instance is in use within a pool""" + """Instance is in use within a pool.""" return self._locked @locked.setter @@ -2987,7 +2987,7 @@ def _generate_iges(self): @property def _distributed_result_file(self): - """Path of the distributed result file""" + """Path of the distributed result file.""" if not self._distributed: return @@ -3022,7 +3022,7 @@ def _distributed_result_file(self): @property def thermal_result(self): - """The thermal result object""" + """The thermal result object.""" self._prioritize_thermal = True result = self.result self._prioritize_thermal = False @@ -3045,7 +3045,7 @@ def list_error_file(self): return open(os.path.join(self.directory, error_file)).read() elif self._exited: raise MapdlExitedError( - "Cannot list error file when MAPDL Service has " "exited" + "Cannot list error file when MAPDL Service has exited" ) return self._download_as_raw(error_file).decode("latin-1") @@ -3060,9 +3060,7 @@ def cmatrix( capname="", **kwargs, ): - """Run CMATRIX in non-interactive mode and return the response - from file. - """ + """Run CMATRIX in non-interactive mode and return the response from file.""" # The CMATRIX command needs to run in non-interactive mode if not self._store_commands: diff --git a/src/ansys/mapdl/core/pool.py b/src/ansys/mapdl/core/pool.py index 5a53d5f9f8..963e5bcf06 100755 --- a/src/ansys/mapdl/core/pool.py +++ b/src/ansys/mapdl/core/pool.py @@ -614,8 +614,10 @@ def run(): try: self._exiting_i += 1 instance.exit() - except Exception as e: - LOG.error("Failed to close instance", exc_info=True) + except Exception: + LOG.error( + f"Failed to close instance due to:\n{e}", exc_info=True + ) self._exiting_i -= 1 else: From 7b544b4c24c582e23dce56fefd5d5ce6c7304c89 Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Tue, 7 Jan 2025 14:42:47 +0100 Subject: [PATCH 09/17] refactor: small improvements to test settings (#3577) * ci: adding timeout to each test * chore: adding changelog file 3577.dependencies.md [dependabot-skip] * test: avoid checking command output * test: avoid checking command output * fix: unpack * feat: disabling subscription to channel * fix: components typo * chore: adding changelog file 3577.documentation.md [dependabot-skip] * feat: avoid checking on not set channel * ci: automate logging when testing * fix: reading nset when no RST is generated * fix: detecting comments as parameters sets when they have =. * fix: avoid fail on reading rst file * feat: setting verbosity when debug env var * feat: using non-interactive for using iterable in XSEL commands * fix: running post.__repr__ as post1 * feat: logging non_interactive in MAPDL logging and APDL logging * fix: post_processing repr * test: post string * fix: test * feat: showing a warning when rebooting MAPDL. * tests: skip some test Temporary * fix: initial channel state * fix: removing APDL comment so it does not interfere on the last_respone * fix: database tests * fix: path test * feat: stripping spaces from the command output * fix: checking pids when there is no cleanup file. * fix: make sure we are properly comparing paths when MAPDL is also installed on a machine. * ci: auto fixes from pre-commit.com hooks. for more information, see https://pre-commit.ci * fix: small fixes in database tests * fix: skip testing on windows for the moment * ci: auto fixes from pre-commit.com hooks. for more information, see https://pre-commit.ci * fix: precommit * fix: xpl not loading full file * refactor: moving xpl tests to a class * feat: adding apdl output * tests: removing redundant test * chore: merge fix/avoid-error-when-retriving-routine * chore: adding changelog file 3596.miscellaneous.md [dependabot-skip] * revert: "revert: "Merge branches 'feat/piping-MAPDL-output-to-a-given-file', 'main' and 'main' of https://github.com/ansys/pymapdl" (#3607)" This reverts commit afad43efc8b5ea0bac4f71d9a462e08a1071259a. * chore: adding changelog file 3577.dependencies.md [dependabot-skip] * refactor: reorg allowed arguments order * fix: removing `file` call. * feat: apply suggestions from code review * feat: apply suggestions from code review * chore: adding changelog file 3577.added.md [dependabot-skip] * fix: removing left behind code --------- Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Co-authored-by: gayuso Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- doc/changelog.d/3577.added.md | 1 + src/ansys/mapdl/core/database/database.py | 5 +- src/ansys/mapdl/core/launcher.py | 4 +- src/ansys/mapdl/core/mapdl_core.py | 4 +- src/ansys/mapdl/core/mapdl_grpc.py | 7 +- src/ansys/mapdl/core/misc.py | 7 +- src/ansys/mapdl/core/parameters.py | 2 +- src/ansys/mapdl/core/post.py | 34 ++- tests/common.py | 7 +- tests/conftest.py | 13 +- tests/test_database.py | 25 ++- tests/test_mapdl.py | 2 +- tests/test_post.py | 17 +- tests/test_xpl.py | 247 ++++++++++++---------- 15 files changed, 238 insertions(+), 139 deletions(-) create mode 100644 doc/changelog.d/3577.added.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61f9b768e7..90ecdf738f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,7 @@ env: 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=180' + BUILD_CHEATSHEET: True PYMAPDL_DEBUG_TESTING: True @@ -63,7 +64,6 @@ permissions: jobs: - update-changelog: name: "Update CHANGELOG (on release)" if: github.event_name == 'push' && contains(github.ref, 'refs/tags') diff --git a/doc/changelog.d/3577.added.md b/doc/changelog.d/3577.added.md new file mode 100644 index 0000000000..5299553dfa --- /dev/null +++ b/doc/changelog.d/3577.added.md @@ -0,0 +1 @@ +refactor: small improvements to test settings \ No newline at end of file diff --git a/src/ansys/mapdl/core/database/database.py b/src/ansys/mapdl/core/database/database.py index 3e395a6297..d35bf5c94d 100644 --- a/src/ansys/mapdl/core/database/database.py +++ b/src/ansys/mapdl/core/database/database.py @@ -313,8 +313,9 @@ def stop(self): self._mapdl._log.debug("Closing the connection with the MAPDL DB Server") self._stop() - self._channel.close() - self._channel = None + if self._channel: + self._channel.close() + self._channel = None self._stub = None self._state = None diff --git a/src/ansys/mapdl/core/launcher.py b/src/ansys/mapdl/core/launcher.py index 55a3efb8bc..a38cfc15aa 100644 --- a/src/ansys/mapdl/core/launcher.py +++ b/src/ansys/mapdl/core/launcher.py @@ -105,7 +105,6 @@ def version_from_path(*args, **kwargs): "additional_switches", "cleanup_on_exit", "clear_on_connect", - "running_on_hpc", "exec_file", "force_intel" "ip", "ip", @@ -125,6 +124,7 @@ def version_from_path(*args, **kwargs): "remove_temp_dir_on_exit", "replace_env_vars", "run_location", + "running_on_hpc", "scheduler_options", "set_no_abort", "start_instance", @@ -554,7 +554,7 @@ def check_mapdl_launch( MAPDL did not start. """ LOG.debug("Generating queue object for stdout") - stdout_queue, _ = _create_queue_for_std(process.stdout) + stdout_queue, thread = _create_queue_for_std(process.stdout) # Checking connection try: diff --git a/src/ansys/mapdl/core/mapdl_core.py b/src/ansys/mapdl/core/mapdl_core.py index afce90bf67..4201a0fc3d 100644 --- a/src/ansys/mapdl/core/mapdl_core.py +++ b/src/ansys/mapdl/core/mapdl_core.py @@ -1396,7 +1396,8 @@ def __init__(self, parent): self._parent = weakref.ref(parent) def __enter__(self): - self._parent()._log.debug("Entering non-interactive mode") + self._parent()._log.debug("Entering in non-interactive mode") + self._parent().com("Entering in non_interactive mode") self._parent()._store_commands = True def __exit__(self, *args): @@ -2283,6 +2284,7 @@ def run( self._before_run(command) short_cmd = parse_to_short_cmd(command) + self._log.debug(f"Running (verbose: {verbose}, mute={mute}): '{command}'") text = self._run(command, verbose=verbose, mute=mute) if ( diff --git a/src/ansys/mapdl/core/mapdl_grpc.py b/src/ansys/mapdl/core/mapdl_grpc.py index 4660d69e1e..c8682296b4 100644 --- a/src/ansys/mapdl/core/mapdl_grpc.py +++ b/src/ansys/mapdl/core/mapdl_grpc.py @@ -1334,7 +1334,12 @@ def _cache_pids(self): pids = set(re.findall(r"-9 (\d+)", raw)) self._pids = [int(pid) for pid in pids] - if not self._pids: + if not self._pids and not self._mapdl_process: + self._log.debug( + f"MAPDL process is not provided. PIDs could not be retrieved." + ) + return + elif not self._pids: # For the cases where the cleanup file is not generated, # we relay on the process. parent_pid = self._mapdl_process.pid diff --git a/src/ansys/mapdl/core/misc.py b/src/ansys/mapdl/core/misc.py index 610f6821ff..63b2e35b61 100644 --- a/src/ansys/mapdl/core/misc.py +++ b/src/ansys/mapdl/core/misc.py @@ -571,9 +571,10 @@ def wrapper(self, *args, **kwargs): # assuming you want to select nothing because you supplied an empty list/tuple/array return original_sel_func(self, "none") - self._perform_entity_list_selection( - entity, original_sel_func, type_, item, comp, vmin, kabs - ) + with self.non_interactive: # to speed up + self._perform_entity_list_selection( + entity, original_sel_func, type_, item, comp, vmin, kabs + ) if kwargs.pop("Used_P", False): # we want to return the diff --git a/src/ansys/mapdl/core/parameters.py b/src/ansys/mapdl/core/parameters.py index 7b33bd3a8d..594b40188e 100644 --- a/src/ansys/mapdl/core/parameters.py +++ b/src/ansys/mapdl/core/parameters.py @@ -558,7 +558,7 @@ def _get_parameter_array(self, parm_name, shape): f"that could not be read using '{format_str}'." ) - arr_flat = np.fromstring(output, sep="\n").reshape(shape) + arr_flat = np.fromstring(output.strip(), sep="\n").reshape(shape) if len(shape) == 3: if shape[2] == 1: diff --git a/src/ansys/mapdl/core/post.py b/src/ansys/mapdl/core/post.py index 18ebc102c4..8110ec6f8a 100644 --- a/src/ansys/mapdl/core/post.py +++ b/src/ansys/mapdl/core/post.py @@ -139,13 +139,37 @@ def _mapdl(self): @supress_logging def __repr__(self): info = "PyMAPDL PostProcessing Instance\n" - info += "\tActive Result File: %s\n" % self.filename - info += "\tNumber of result sets: %d\n" % self.nsets - info += "\tCurrent load step: %d\n" % self.load_step - info += "\tCurrent sub step: %d\n" % self.sub_step + info += f"\tActive Result File: {self.filename}\n" + + # If there is no result file, this fails. + try: + nsets = int(self.nsets) + except MapdlRuntimeError as error: + self._mapdl.logger.debug( + f"Error when obtaining the number of sets:\n{error}" + ) + nsets = "NA" + + info += f"\tNumber of result sets: {nsets}\n" + info += f"\tCurrent load step: {self.load_step}\n" + info += f"\tCurrent sub step: {self.sub_step}\n" if self._mapdl.parameters.routine == "POST1": - info += "\n\n" + self._mapdl.set("LIST") + try: + nlist = self._mapdl.set("LIST") + except MapdlRuntimeError as err: + if ( + "An error occurred while attempting to open the results file" + in str(err) + ): + self._mapdl.logger.debug( + f"List of steps could not be obtained due to error:\n{err}" + ) + nlist = "Results file is not available" + else: + raise err + + info += "\n\n" + nlist else: info += "\n\nEnable routine POST1 to see a table of available results" diff --git a/tests/common.py b/tests/common.py index 9c90fdd9de..51ed2e2185 100644 --- a/tests/common.py +++ b/tests/common.py @@ -274,7 +274,10 @@ def is_exited(mapdl: Mapdl): # we cannot connect. # Kill the instance - mapdl.exit() + try: + mapdl.exit() + except Exception as e: + LOG.error(f"An error occurred when killing the instance:\n{str(e)}") # Relaunching MAPDL mapdl = launch_mapdl( @@ -285,6 +288,8 @@ def is_exited(mapdl: Mapdl): log_apdl=log_apdl(), ) + LOG.info("Successfully re-connected to MAPDL") + # Restoring the local configuration mapdl._local = local_ mapdl._exited = False diff --git a/tests/conftest.py b/tests/conftest.py index 660a088a23..deebfcaa27 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -193,7 +193,9 @@ def requires_dependency(dependency: str): # the following files are also generated by MAPDL gRPC: # - "pymapdl.apdl": The APDL commands sent to MAPDL by PyMAPDL - # - "apdl.out" : MAPDL console output. Very likely only contains the output until connected. + # - "apdl.out" : MAPDL console output. Very likely only contains the output + # until connected. + ################################################################ # # Importing packages @@ -230,14 +232,12 @@ def requires_dependency(dependency: str): viz_interface.TESTING_MODE = True - ################################################################ # # Pytest configuration # -------------------- # - # check if the user wants to permit pytest to start MAPDL START_INSTANCE = get_start_instance() @@ -558,7 +558,10 @@ def mapdl_console(request): ) mapdl = launch_mapdl( - console_path, mode="console", log_apdl="pymapdl.apdl" if DEBUG_TESTING else None + console_path, + mode="console", + log_apdl="pymapdl.apdl" if DEBUG_TESTING else None, + loglevel="DEBUG" if DEBUG_TESTING else "ERROR", ) from ansys.mapdl.core.mapdl_console import MapdlConsole @@ -604,7 +607,7 @@ def mapdl(request, tmpdir_factory): if ON_CI: mapdl._local = ON_LOCAL # CI: override for testing - if mapdl.is_local: + if ON_LOCAL and mapdl.is_local: assert Path(mapdl.directory) == Path(run_path) # using yield rather than return here to be able to test exit diff --git a/tests/test_database.py b/tests/test_database.py index a7fd1edc63..7cb8440eae 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -63,6 +63,9 @@ def db(mapdl): ) mapdl.clear() + if mapdl.db.active or mapdl.db._stub is None: + mapdl.db.stop() + mapdl.db.start() return mapdl.db @@ -91,6 +94,9 @@ def test_database_start_stop(mapdl, cleared): f"This MAPDL version ({mapdl_version}) docker image seems to not support DB, but local does." ) + if MapdlDb(mapdl).active: + MapdlDb(mapdl)._stop() + # verify it can be created twice mapdl.prep7() for _ in range(2): @@ -111,6 +117,9 @@ def test_database_start_stop(mapdl, cleared): with pytest.warns(UserWarning): database.stop() + # Starting the database for the rest of the test session + mapdl.db.start() + def test_database_repr(db): assert db._channel_str in str(db) @@ -138,8 +147,8 @@ def test_clear(db): def test__channel_str(db): assert db._channel_str is not None assert ":" in db._channel_str - assert re.search("\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", db._channel_str) - assert re.search("\d{4,6}", db._channel_str) + assert re.search(r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", db._channel_str) + assert re.search(r"\d{4,6}", db._channel_str) def test_off_db(mapdl, cleared, db): @@ -186,6 +195,10 @@ def test_repr(mapdl, cleared, db): def gen_block(mapdl): """Generate nodes and elements in a simple block.""" + from conftest import clear + + clear(mapdl) + mapdl.block(0, 1, 0, 1, 0, 1) mapdl.et(1, 186) mapdl.esize(0.25) @@ -226,8 +239,8 @@ def test_nodes_next(nodes): def test_nodes_info(nodes): assert nodes.info(1, DBDef.DB_SELECTED) == 1 - @pytest.mark.parametrize("selected", [True, False]) @staticmethod + @pytest.mark.parametrize("selected", [True, False]) def test_nodes_num(nodes, selected): assert nodes.num(selected=selected) == 425 @@ -250,7 +263,7 @@ def test_nodes_asarray(nodes): assert np.allclose(angles, 0) @staticmethod - def test_nodes_push(nodes): + def test_nodes_push(mapdl, nodes): nnum = 100000 x, y, z, xang, yang, zang = 1, 5, 10, 30, 40, 50 nodes.push(nnum, x, y, z, xang, yang, zang) @@ -265,6 +278,10 @@ def test_nodes_push(nodes): with pytest.raises(ValueError, match="X and Y angles must be input"): nodes.push(nnum, x, y, z, zang=1) + # this test changes the database, so let's restore it back + # as in `nodes` fixture. + gen_block(mapdl) + class Test_Elems(TestClass): diff --git a/tests/test_mapdl.py b/tests/test_mapdl.py index 01ffef4650..3455e816d2 100644 --- a/tests/test_mapdl.py +++ b/tests/test_mapdl.py @@ -2219,7 +2219,7 @@ def test_inquire_invalid(mapdl, cleared): def test_inquire_default(mapdl, cleared): mapdl.title("heeeelloo") - assert Path(mapdl.directory) == Path(mapdl.inquire()) + assert str(Path(mapdl.directory)) == str(Path(mapdl.inquire())) def test_vwrite_error(mapdl, cleared): diff --git a/tests/test_post.py b/tests/test_post.py index 42619bb036..489123e589 100644 --- a/tests/test_post.py +++ b/tests/test_post.py @@ -55,9 +55,10 @@ def test_repr(mapdl, cleared): assert "Enable routine POST1 to see a table of available results" in repr_ mapdl.post1() - repr_ = mapdl.post_processing.__repr__() - assert "Enable routine POST1 to see a table of available results" not in repr_ - assert mapdl.set("LIST") in repr_ + assert ( + "Enable routine POST1 to see a table of available results" + not in mapdl.post_processing.__repr__() + ) class Test_static_solve(TestClass): @@ -770,6 +771,16 @@ def resume(mapdl, plastic_solve): nsigfig = 10 mapdl.format("", "E", nsigfig + 9, nsigfig) + @staticmethod + def test_list_in_repr(mapdl, resume): + mapdl.finish() + assert "Enable routine POST1 to see a table of available results" in str( + mapdl.post_processing + ) + + mapdl.post1() + assert mapdl.set("LIST") in mapdl.post_processing.__str__() + @staticmethod @pytest.mark.parametrize("comp", COMPONENT_STRESS_TYPE) def test_nodal_plastic_component_strain(mapdl, resume, comp): diff --git a/tests/test_xpl.py b/tests/test_xpl.py index 979b58d594..639e6f9a3e 100644 --- a/tests/test_xpl.py +++ b/tests/test_xpl.py @@ -39,114 +39,143 @@ def check_supports_extract(mapdl): pytest.skip("command not supported") -@pytest.fixture(scope="function") -def xpl(mapdl, cube_solve): - xpl = mapdl.xpl - xpl.open("file.full") - return xpl +class Test_xpl: + + @staticmethod + @pytest.fixture(scope="class") + def cube_solve(mapdl): + from conftest import clear + + clear(mapdl) + + # set up the full file + mapdl.block(0, 1, 0, 1, 0, 1) + mapdl.et(1, 186) + mapdl.esize(0.5) + mapdl.vmesh("all") + + # Define a material (nominal steel in SI) + mapdl.mp("EX", 1, 210e9) # Elastic modulus in Pa (kg/(m*s**2)) + mapdl.mp("DENS", 1, 7800) # Density in kg/m3 + mapdl.mp("NUXY", 1, 0.3) # Poisson's Ratio + + # solve first 10 non-trivial modes + mapdl.modal_analysis(nmode=10, freqb=1) + mapdl.save("cube_solve_xpl") + + @staticmethod + @pytest.fixture(scope="function") + def xpl(mapdl, cube_solve): + mapdl.prep7() + mapdl.resume("cube_solve_xpl") + + xpl = mapdl.xpl + xpl.open("file.full") + + return xpl + + @staticmethod + def test_close(xpl): + xpl.close() + with pytest.raises(MapdlCommandIgnoredError): + xpl.list() + + @staticmethod + def test_xpl_str(xpl): + assert "file.full" in str(xpl) + + @staticmethod + @requires("ansys-math-core") + def test_read_int32(xpl): + vec = xpl.read("MASS") + arr = vec.asarray() + assert arr.size + assert arr.dtype == np.int32 + + @staticmethod + @requires("ansys-math-core") + def test_read_double(xpl): + vec = xpl.read("DIAGK") + arr = vec.asarray() + assert arr.size + assert arr.dtype == np.double + + @staticmethod + @requires("ansys-math-core") + def test_read_asarray(xpl): + vec1 = xpl.read("MASS", asarray=True) + vec2 = xpl.read("MASS") + assert np.allclose(vec1, vec2.asarray()) + + @staticmethod + def test_save(xpl): + xpl.save() + with pytest.raises(MapdlCommandIgnoredError): + xpl.list() + + @staticmethod + def test_copy(mapdl, cleared, xpl): + filename = "tmpfile.full" + xpl.copy(filename) + assert filename in mapdl.list_files() + + @staticmethod + def test_list(xpl): + assert "::FULL::" in xpl.list(1) + + @staticmethod + def test_help(xpl): + assert "SAVE" in xpl.help() + + @staticmethod + def test_step_where(xpl): + xpl.step("MASS") + assert "FULL::MASS" in xpl.where() + + with pytest.raises(MapdlRuntimeError): + xpl.step("notarecord") + + @staticmethod + def test_info(xpl): + assert "Record Size" in xpl.info("NGPH") + + @staticmethod + def test_print(xpl): + assert "10" in xpl.print("MASS") + + @staticmethod + def test_json(xpl): + json_out = xpl.json() + assert json_out["name"] == "FULL" + assert "children" in json_out + + @staticmethod + def test_up(xpl): + xpl.step("MASS") + xpl.up() + assert "Current Location : FULL" in xpl.where() + + xpl.up("TOP") + assert "Current Location : FULL" in xpl.where() + + @staticmethod + def test_goto(xpl): + xpl.goto("MASS") + assert "Current Location : FULL::MASS" in xpl.where() + + @staticmethod + @requires("ansys-math-core") + @pytest.mark.usefixtures("check_supports_extract") + def test_extract(xpl): + # expecting fixture to already have a non-result file open + assert xpl._filename[-3:] != "rst" + with pytest.raises(MapdlRuntimeError, match="result files"): + mat = xpl.extract("NSL") + + xpl.open("file.rst") + + with pytest.raises(ValueError, match="the only supported recordname is 'NSL'"): + xpl.extract("NOD") - -def test_close(xpl): - xpl.close() - with pytest.raises(MapdlCommandIgnoredError): - xpl.list() - - -def test_xpl_str(xpl): - assert "file.full" in str(xpl) - - -@requires("ansys-math-core") -def test_read_int32(xpl): - vec = xpl.read("MASS") - arr = vec.asarray() - assert arr.size - assert arr.dtype == np.int32 - - -@requires("ansys-math-core") -def test_read_double(xpl): - vec = xpl.read("DIAGK") - arr = vec.asarray() - assert arr.size - assert arr.dtype == np.double - - -@requires("ansys-math-core") -def test_read_asarray(xpl): - vec1 = xpl.read("MASS", asarray=True) - vec2 = xpl.read("MASS") - assert np.allclose(vec1, vec2.asarray()) - - -def test_save(xpl): - xpl.save() - with pytest.raises(MapdlCommandIgnoredError): - xpl.list() - - -def test_copy(mapdl, cleared, xpl): - filename = "tmpfile.full" - xpl.copy(filename) - assert filename in mapdl.list_files() - - -def test_list(xpl): - assert "::FULL::" in xpl.list(1) - - -def test_help(xpl): - assert "SAVE" in xpl.help() - - -def test_step_where(xpl): - xpl.step("MASS") - assert "FULL::MASS" in xpl.where() - - with pytest.raises(MapdlRuntimeError): - xpl.step("notarecord") - - -def test_info(xpl): - assert "Record Size" in xpl.info("NGPH") - - -def test_print(xpl): - assert "10" in xpl.print("MASS") - - -def test_json(xpl): - json_out = xpl.json() - assert json_out["name"] == "FULL" - assert "children" in json_out - - -def test_up(xpl): - xpl.step("MASS") - xpl.up() - assert "Current Location : FULL" in xpl.where() - - xpl.up("TOP") - assert "Current Location : FULL" in xpl.where() - - -def test_goto(xpl): - xpl.goto("MASS") - assert "Current Location : FULL::MASS" in xpl.where() - - -@requires("ansys-math-core") -@pytest.mark.usefixtures("check_supports_extract") -def test_extract(xpl): - # expecting fixture to already have a non-result file open - assert xpl._filename[-3:] != "rst" - with pytest.raises(MapdlRuntimeError, match="result files"): mat = xpl.extract("NSL") - - xpl.open("file.rst") - - with pytest.raises(ValueError, match="the only supported recordname is 'NSL'"): - xpl.extract("NOD") - - mat = xpl.extract("NSL") - assert mat.shape == (243, 10) + assert mat.shape == (243, 10) From 4606bb16b6173c96727f7e90ee841d304e9a3e96 Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Tue, 7 Jan 2025 17:28:44 +0100 Subject: [PATCH 10/17] ci: fix safety issue (#3638) * fix: safety issue * chore: adding changelog file 3638.maintenance.md [dependabot-skip] --------- Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> --- doc/changelog.d/3638.maintenance.md | 1 + src/ansys/mapdl/core/launcher.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 doc/changelog.d/3638.maintenance.md diff --git a/doc/changelog.d/3638.maintenance.md b/doc/changelog.d/3638.maintenance.md new file mode 100644 index 0000000000..c8234bd4d6 --- /dev/null +++ b/doc/changelog.d/3638.maintenance.md @@ -0,0 +1 @@ +ci: fix safety issue \ No newline at end of file diff --git a/src/ansys/mapdl/core/launcher.py b/src/ansys/mapdl/core/launcher.py index a38cfc15aa..23dc24633c 100644 --- a/src/ansys/mapdl/core/launcher.py +++ b/src/ansys/mapdl/core/launcher.py @@ -2876,7 +2876,7 @@ def submitter( stdout=stdout, stderr=stderr, env=env_vars, - ) # nosec B603 B607 + ) def check_console_start_parameters(start_parm): From e83f46c706f4245fa569740d8fdf45636eae6974 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 17:29:00 +0100 Subject: [PATCH 11/17] build: bump pyfakefs from 5.7.2 to 5.7.3 (#3630) * build: bump pyfakefs from 5.7.2 to 5.7.3 Bumps [pyfakefs](https://github.com/pytest-dev/pyfakefs) from 5.7.2 to 5.7.3. - [Release notes](https://github.com/pytest-dev/pyfakefs/releases) - [Changelog](https://github.com/pytest-dev/pyfakefs/blob/main/CHANGES.md) - [Commits](https://github.com/pytest-dev/pyfakefs/compare/v5.7.2...v5.7.3) --- updated-dependencies: - dependency-name: pyfakefs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * ci: auto fixes from pre-commit.com hooks. for more information, see https://pre-commit.ci * chore: adding changelog file 3630.documentation.md [dependabot-skip] * chore: adding changelog file 3630.dependencies.md [dependabot-skip] --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Co-authored-by: German <28149841+germa89@users.noreply.github.com> --- doc/changelog.d/3630.dependencies.md | 1 + pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 doc/changelog.d/3630.dependencies.md diff --git a/doc/changelog.d/3630.dependencies.md b/doc/changelog.d/3630.dependencies.md new file mode 100644 index 0000000000..c5144c76c7 --- /dev/null +++ b/doc/changelog.d/3630.dependencies.md @@ -0,0 +1 @@ +build: bump pyfakefs from 5.7.2 to 5.7.3 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 2986d25d0b..1aeb4c21be 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ tests = [ "matplotlib==3.10.0", "pandas==2.2.3", "pyansys-tools-report==0.8.1", - "pyfakefs==5.7.2", + "pyfakefs==5.7.3", "pyiges[full]==0.3.1", "pytest-cov==6.0.0", "pytest-pyvista==0.1.9", From 3df78012d23120cf3fdff9d38ce83af8aa414570 Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Wed, 8 Jan 2025 11:19:02 +0100 Subject: [PATCH 12/17] fix: changelog (#3640) * fix: changelog * chore: adding changelog file 3640.fixed.md [dependabot-skip] --------- Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> --- doc/changelog.d/3247.fixed.md | 2 +- doc/changelog.d/3640.fixed.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 doc/changelog.d/3640.fixed.md diff --git a/doc/changelog.d/3247.fixed.md b/doc/changelog.d/3247.fixed.md index 99baa95369..f2775eac84 100644 --- a/doc/changelog.d/3247.fixed.md +++ b/doc/changelog.d/3247.fixed.md @@ -1 +1 @@ -fix: not deleting temporary file when ``remove_temp_dir_on_exit``=True \ No newline at end of file +fix: not deleting temporary file when ``remove_temp_dir_on_exit`` =True \ No newline at end of file diff --git a/doc/changelog.d/3640.fixed.md b/doc/changelog.d/3640.fixed.md new file mode 100644 index 0000000000..675de3185e --- /dev/null +++ b/doc/changelog.d/3640.fixed.md @@ -0,0 +1 @@ +fix: changelog \ No newline at end of file From ce34c76de5b73f213b01e1c25b7252d803dda114 Mon Sep 17 00:00:00 2001 From: Muhammed Adedigba <68085496+moe-ad@users.noreply.github.com> Date: Wed, 8 Jan 2025 12:40:48 +0100 Subject: [PATCH 13/17] feat: node/element selection commands returning selected ids (#3636) * feat: changes to source code * chore: adding changelog file 3636.miscellaneous.md [dependabot-skip] * ci: auto fixes from pre-commit.com hooks. for more information, see https://pre-commit.ci * chore: adding changelog file 3636.documentation.md [dependabot-skip] * ci: auto fixes from pre-commit.com hooks. for more information, see https://pre-commit.ci * chore: adding changelog file 3636.miscellaneous.md [dependabot-skip] * feat: added unit tests --------- Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: German <28149841+germa89@users.noreply.github.com> --- doc/changelog.d/3636.miscellaneous.md | 1 + src/ansys/mapdl/core/commands.py | 2 ++ src/ansys/mapdl/core/mapdl_core.py | 4 +++ tests/conftest.py | 18 +++++++++++++ tests/test_mesh_grpc.py | 39 +++++++++++++++++++++++++++ 5 files changed, 64 insertions(+) create mode 100644 doc/changelog.d/3636.miscellaneous.md diff --git a/doc/changelog.d/3636.miscellaneous.md b/doc/changelog.d/3636.miscellaneous.md new file mode 100644 index 0000000000..5d0e245a47 --- /dev/null +++ b/doc/changelog.d/3636.miscellaneous.md @@ -0,0 +1 @@ +feat: node/element selection commands returning selected ids \ No newline at end of file diff --git a/src/ansys/mapdl/core/commands.py b/src/ansys/mapdl/core/commands.py index c6c7c489cf..935284e19d 100644 --- a/src/ansys/mapdl/core/commands.py +++ b/src/ansys/mapdl/core/commands.py @@ -193,6 +193,8 @@ "LSEL", "ASEL", "VSEL", + "ESLN", + "NSLE", ] diff --git a/src/ansys/mapdl/core/mapdl_core.py b/src/ansys/mapdl/core/mapdl_core.py index 4201a0fc3d..ff50e89414 100644 --- a/src/ansys/mapdl/core/mapdl_core.py +++ b/src/ansys/mapdl/core/mapdl_core.py @@ -1321,6 +1321,10 @@ def wrap_xsel_function_output(method): return self.geometry.anum elif name == "VSEL": return self.geometry.vnum + elif name == "ESLN": + return self.mesh.enum + elif name == "NSLE": + return self.mesh.nnum else: return None diff --git a/tests/conftest.py b/tests/conftest.py index deebfcaa27..3f87e5fedd 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1157,6 +1157,24 @@ def create_geometry(mapdl): return areas, keypoints +@pytest.fixture(scope="function") +def two_dimensional_mesh(mapdl, cleared): + length = 4 + height = 1 + thickness = 0.2 + mesh_size = 0.1 + + mapdl.prep7() + + mapdl.r(r1=thickness) + mapdl.et(1, "PLANE182", kop3=3, kop6=0) + mapdl.rectng(0, length, 0, height) + mapdl.mshkey(1) + mapdl.mshape(0, "2D") + mapdl.esize(mesh_size) + mapdl.amesh("ALL") + + @pytest.fixture def query(mapdl, cleared): return mapdl.queries diff --git a/tests/test_mesh_grpc.py b/tests/test_mesh_grpc.py index a0aaf421f7..e914974b22 100644 --- a/tests/test_mesh_grpc.py +++ b/tests/test_mesh_grpc.py @@ -317,3 +317,42 @@ def test_nodal_rotation(mapdl, cleared): ] ) assert np.allclose(nrotation_ref, nrotations[:7, :]) + + +def test_esln(mapdl, two_dimensional_mesh): + mapdl.nsel("S", "LOC", "X", 0) + selected_ids = mapdl.esln("S", 0) + expected_selected_ids = np.array([1, 41, 81, 121, 161, 201, 241, 281, 321, 361]) + assert all(selected_ids == expected_selected_ids) + + +def test_nsle(mapdl, two_dimensional_mesh): + mapdl.esel("S", "CENT", "X", 0, 0.1) + selected_ids = mapdl.nsle("S") + expected_selected_ids = np.array( + [ + 1, + 3, + 52, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + ] + ) + assert all(selected_ids == expected_selected_ids) From 881dfa3cd4b69b356d8d8942f21c717986082950 Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:18:23 +0100 Subject: [PATCH 14/17] fix: increase timeout for checking output file --- src/ansys/mapdl/core/mapdl_grpc.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ansys/mapdl/core/mapdl_grpc.py b/src/ansys/mapdl/core/mapdl_grpc.py index c8682296b4..d3401106bb 100644 --- a/src/ansys/mapdl/core/mapdl_grpc.py +++ b/src/ansys/mapdl/core/mapdl_grpc.py @@ -119,6 +119,9 @@ SESSION_ID_NAME = "__PYMAPDL_SESSION_ID__" +DEFAULT_TIME_STEP_STREAM_NT = 500 +DEFAULT_TIME_STEP_STREAM_POSIX = 100 + # Retry policy for gRPC calls. SERVICE_DEFAULT_CONFIG = { # see https://github.com/grpc/proposal/blob/master/A6-client-retries.md#retry-policy-capabilities @@ -1935,8 +1938,11 @@ def input( return response.strip() # otherwise, not verbose - if time_step_stream is None: - time_step_stream = 50 + if time_step_stream is None and os.name == "nt": + time_step_stream = 500 + elif time_step_stream is None: + time_step_stream = 100 + metadata = [ ("time_step_stream", str(time_step_stream)), ("chunk_size", str(chunk_size)), From e60c38d81106a5302a9224af070cf06f44de7482 Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:55:20 +0100 Subject: [PATCH 15/17] feat: implement global defaults OS dependent. --- src/ansys/mapdl/core/mapdl_grpc.py | 72 +++++++++++++++++++----------- 1 file changed, 47 insertions(+), 25 deletions(-) diff --git a/src/ansys/mapdl/core/mapdl_grpc.py b/src/ansys/mapdl/core/mapdl_grpc.py index d3401106bb..b716182824 100644 --- a/src/ansys/mapdl/core/mapdl_grpc.py +++ b/src/ansys/mapdl/core/mapdl_grpc.py @@ -119,6 +119,7 @@ SESSION_ID_NAME = "__PYMAPDL_SESSION_ID__" +DEFAULT_TIME_STEP_STREAM = None DEFAULT_TIME_STEP_STREAM_NT = 500 DEFAULT_TIME_STEP_STREAM_POSIX = 100 @@ -1072,7 +1073,8 @@ def _send_command(self, cmd: str, mute: bool = False) -> Optional[str]: def _send_command_stream(self, cmd, verbose=False) -> str: """Send a command and expect a streaming response""" request = pb_types.CmdRequest(command=cmd) - metadata = [("time_step_stream", "100")] + time_step = self._get_time_step_stream() + metadata = [("time_step_stream", str(time_step))] stream = self._stub.SendCommandS(request, metadata=metadata) response = [] for item in stream: @@ -1778,13 +1780,14 @@ def input( execution time. Due to stability issues, the default time_step_stream is - dependent on verbosity. The defaults are: + dependent on the OS MAPDL is running on. The defaults are: - - ``verbose=True``: ``time_step_stream=500`` - - ``verbose=False``: ``time_step_stream=50`` + - Windows: ``time_step_stream=500`` + - Linux: ``time_step_stream=100`` These defaults will be ignored if ``time_step_stream`` is - manually set. + manually set. See the *Examples* section to learn how to change + the default value globally. orig_cmd : str, optional Original command. There are some cases, were input is @@ -1834,6 +1837,11 @@ def input( >>> with mapdl.non_interactive: mapdl.run("/input,inputtrigger,inp") # This inputs 'myinput.inp' + You can also change them globably using: + + >>> from ansys.mapdl.core import mapdl_grpc + >>> mapdl_grpc.DEFAULT_TIME_STEP_STREAM=100 # in milliseconds + """ # Checking compatibility # Checking the user is not reusing old api: @@ -1914,18 +1922,14 @@ def input( # are unclear filename = self._get_file_path(fname, progress_bar) - if time_step_stream is not None: - if time_step_stream <= 0: - raise ValueError("``time_step_stream`` must be greater than 0``") + time_step_stream = self._get_time_step_stream(time_step_stream) - if verbose: - if time_step_stream is None: - time_step_stream = 500 - metadata = [ - ("time_step_stream", str(time_step_stream)), - ("chunk_size", str(chunk_size)), - ] + metadata = [ + ("time_step_stream", str(time_step_stream)), + ("chunk_size", str(chunk_size)), + ] + if verbose: request = pb_types.InputFileRequest(filename=filename) strouts = self._stub.InputFileS(request, metadata=metadata) responses = [] @@ -1937,16 +1941,8 @@ def input( response = "\n".join(responses) return response.strip() - # otherwise, not verbose - if time_step_stream is None and os.name == "nt": - time_step_stream = 500 - elif time_step_stream is None: - time_step_stream = 100 - - metadata = [ - ("time_step_stream", str(time_step_stream)), - ("chunk_size", str(chunk_size)), - ] + ## + # Otherwise, not verbose # since we can't directly run /INPUT, we have to write a # temporary input file that tells MAPDL to read the input @@ -2020,6 +2016,32 @@ def input( return output + def _get_time_step_stream( + self, time_step: Optional[Union[int, float]] = None + ) -> str: + """Return the time step for checking if MAPDL is done writing the + output to the file which later will be returned as response + """ + if time_step is None: + if DEFAULT_TIME_STEP_STREAM is not None: + time_step = DEFAULT_TIME_STEP_STREAM + elif self.platform == "windows": + time_step = DEFAULT_TIME_STEP_STREAM_NT + elif self.platform == "linux": + time_step = DEFAULT_TIME_STEP_STREAM_POSIX + else: + raise ValueError( + f"The MAPDL platform ('{self.platform}') is not recognaised." + ) + + else: + if time_step_stream <= 0: + raise ValueError( + "``time_step_stream`` argument must be greater than 0``" + ) + + return time_step + def _get_file_path(self, fname: str, progress_bar: bool = False) -> str: """Find files in the Python and MAPDL working directories. From 10a726834e468b1568ceafbfe1a525608f14c460 Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Mon, 16 Dec 2024 17:16:51 +0100 Subject: [PATCH 16/17] feat: adding logging --- src/ansys/mapdl/core/mapdl_core.py | 1 + src/ansys/mapdl/core/mapdl_grpc.py | 1 + 2 files changed, 2 insertions(+) diff --git a/src/ansys/mapdl/core/mapdl_core.py b/src/ansys/mapdl/core/mapdl_core.py index ff50e89414..94626cf9c3 100644 --- a/src/ansys/mapdl/core/mapdl_core.py +++ b/src/ansys/mapdl/core/mapdl_core.py @@ -2919,6 +2919,7 @@ def _check_mapdl_os(self): self._platform = "windows" else: # pragma: no cover raise MapdlRuntimeError("Unknown platform: {}".format(platform)) + self.logger.debug(f"MAPDL is running on {self._platform} OS.") def _check_on_docker(self): """Check if MAPDL is running on docker.""" diff --git a/src/ansys/mapdl/core/mapdl_grpc.py b/src/ansys/mapdl/core/mapdl_grpc.py index b716182824..9b7810b2b1 100644 --- a/src/ansys/mapdl/core/mapdl_grpc.py +++ b/src/ansys/mapdl/core/mapdl_grpc.py @@ -2040,6 +2040,7 @@ def _get_time_step_stream( "``time_step_stream`` argument must be greater than 0``" ) + self.logger.debug(f"The time_step_stream argument is set to: {time_step}") return time_step def _get_file_path(self, fname: str, progress_bar: bool = False) -> str: From 0030a08254d83c72f1964af3dac2cd91c6a7d8eb Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Wed, 8 Jan 2025 11:49:58 +0000 Subject: [PATCH 17/17] chore: adding changelog file 3642.fixed.md [dependabot-skip] --- doc/changelog.d/3642.fixed.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changelog.d/3642.fixed.md diff --git a/doc/changelog.d/3642.fixed.md b/doc/changelog.d/3642.fixed.md new file mode 100644 index 0000000000..526ce0df6e --- /dev/null +++ b/doc/changelog.d/3642.fixed.md @@ -0,0 +1 @@ +fix: timeout for file checking \ No newline at end of file