diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5dbfd31c7eb6..1b8f54b27b78 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,6 +8,24 @@ updates: labels: - "Maintenance" - "Dependencies" + ignore: + # Exclude main project dependencies and optional dependencies (like reader) + - dependency-name: "ansys-api-fluent" + - dependency-name: "ansys-platform-instancemanagement" + - dependency-name: "ansys-tools-filetransfer" + - dependency-name: "ansys-units" + - dependency-name: "defusedxml" + - dependency-name: "deprecated" + - dependency-name: "docker" + - dependency-name: "grpcio" + - dependency-name: "grpcio-health-checking" + - dependency-name: "grpcio-status" + - dependency-name: "nltk" + - dependency-name: "numpy" + - dependency-name: "pandas" + - dependency-name: "pyansys-tools-report" + - dependency-name: "pyyaml" + - dependency-name: "h5py" groups: dependencies: patterns: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c33a37774e58..0da0eaeb194f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -149,6 +149,7 @@ jobs: env: DOC_DEPLOYMENT_IMAGE_TAG: v25.2.3 PYFLUENT_CONTAINER_MOUNT_SOURCE: "/home/ansys/Downloads/ansys_fluent_core_examples" + PYTHONDONTWRITEBYTECODE: 1 steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 @@ -273,6 +274,8 @@ jobs: name: Build if: ${{ !contains(github.event.pull_request.title, '[skip tests]') }} runs-on: [self-hosted, pyfluent] + env: + PYTHONDONTWRITEBYTECODE: 1 steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 diff --git a/.github/workflows/execute-examples-weekly.yml b/.github/workflows/execute-examples-weekly.yml index 702b8e29eaca..05c36aa64fdd 100644 --- a/.github/workflows/execute-examples-weekly.yml +++ b/.github/workflows/execute-examples-weekly.yml @@ -173,7 +173,7 @@ jobs: - name: Execute Modeling_solidification_workflow.py run: | python examples/00-fluent/Modeling_solidification_workflow.py - + - name: Execute catalytic_converter_workflow.py run: | python examples/00-fluent/catalytic_converter_workflow.py @@ -194,6 +194,10 @@ jobs: run: | python examples/00-fluent/battery_pack.py + - name: Execute lid_driven_cavity.py + run: | + python examples/00-fluent/lid_driven_cavity.py + # https://github.com/ansys/pyfluent/issues/4157 # - name: Execute conjugate_heat_transfer.py # run: | diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index 5dc2c0059aa3..56defda43505 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -21,21 +21,21 @@ permissions: issues: read jobs: - label-syncer: - # Sync the labels name, colours with the file ``labels.yml`` - name: Syncer - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - with: - persist-credentials: false - - uses: micnncim/action-label-syncer@3abd5ab72fda571e69fffd97bd4e0033dd5f495c # v1.3.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # label-syncer: + # # Sync the labels name, colours with the file ``labels.yml`` + # name: Syncer + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + # with: + # persist-credentials: false + # - uses: micnncim/action-label-syncer@3abd5ab72fda571e69fffd97bd4e0033dd5f495c # v1.3.0 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} labeler: name: Set labels - needs: [label-syncer] + # needs: [label-syncer] permissions: contents: read pull-requests: write diff --git a/.github/workflows/test-run-custom.yml b/.github/workflows/test-run-custom.yml index f60138217a12..90f9b940a6e5 100644 --- a/.github/workflows/test-run-custom.yml +++ b/.github/workflows/test-run-custom.yml @@ -31,14 +31,14 @@ jobs: fail-fast: false matrix: include: - - image-tag: v24.2.0 - version: 242 - - image-tag: v25.1.0 + # - image-tag: v24.2.5 + # version: 242 + - image-tag: v25.1.4 version: 251 - - image-tag: v25.2.0 - version: 252 - - image-tag: v26.1.0 - version: 261 + # - image-tag: v25.2.3 + # version: 252 + # - image-tag: v26.1.latest + # version: 261 env: FLUENT_IMAGE_TAG: ${{ matrix.version == 261 && vars.FLUENT_STABLE_IMAGE_DEV || matrix.image-tag }} @@ -106,7 +106,7 @@ jobs: echo "Running custom unittest" sudo rm -rf /home/ansys/Downloads/ansys_fluent_core_examples/* make install-test - python -m pytest -v --no-cov --capture=no -k test_parametric_workflow --nightly + python -m pytest -v --no-cov --capture=no -k test_remote_grpc_fts_container - name: Clean Docker Data run: make docker-clean-all-except-supported-images diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index c647e75e0347..c7c7760b8258 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -47,6 +47,7 @@ * [Roberto Pastor Muela](https://github.com/RobPasMue) * [Stephen Fuqua](https://github.com/smf2001) * [sujal-tipnis](https://github.com/sujal-tipnis) +* [Sébastien Morais](https://github.com/SMoraisAnsys) * [Tejal Prabhu](https://github.com/tejalprabhu01) * [Varun Dandekar](https://github.com/V-Dandekar) * [Yogesh Patel](https://github.com/ypatel-qa) diff --git a/doc/api_rstgen.py b/doc/api_rstgen.py index 61a02be550f9..c72a2d1ff1f8 100644 --- a/doc/api_rstgen.py +++ b/doc/api_rstgen.py @@ -28,13 +28,8 @@ def _write_rst_file(output_path: str, version: str): Meshing mode ------------ -The following interfaces are specific to meshing mode. - -* :ref:`meshing ` -* :ref:`PartManagement ` -* :ref:`PMFileManagement ` -* :ref:`workflow ` -* :ref:`meshing utilities ` +The :ref:`meshing workflow ` and :ref:`meshing utilities ` provide the primary interface for +creating, editing, managing, and querying mesh data. Solution mode ------------- @@ -77,7 +72,7 @@ def _write_rst_file(output_path: str, version: str): session_utilities system_coupling pyfluent_warnings - workflow + workflow_new deprecated_apis """ @@ -137,7 +132,11 @@ def _get_file_path(folder_name: str, file_name: str): "standalone_launcher", "watchdog", ], - "meshing": ["meshing_workflow", "datamodel/datamodel_contents", "tui/tui_contents"], + "meshing": [ + "meshing_workflow_new", + "datamodel/datamodel_contents", + "tui/tui_contents", + ], "scheduler": ["load_machines", "machine_list"], "services": [ "api_upgrade", @@ -207,7 +206,7 @@ def _get_file_path(folder_name: str, file_name: str): "session", "system_coupling", "pyfluent_warnings", - "workflow", + "workflow_new", ], } @@ -243,14 +242,16 @@ def _generate_api_source_rst_files(folder: str, files: list): "other settings objects in a hierarchical structure.\n" ) else: - rst.write(f"{file}\n") - rst.write(f'{"="*(len(f"{file}"))}\n\n') + temp_file_name = file.removesuffix("_new") + rst.write(f"{temp_file_name}\n") + rst.write(f'{"="*(len(temp_file_name))}\n\n') rst.write( f".. automodule:: ansys.fluent.core.{folder}.{file}\n" ) else: - rst.write(f"{file}\n") - rst.write(f'{"="*(len(f"{file}"))}\n\n') + temp_file_name = file.removesuffix("_new") + rst.write(f"{temp_file_name}\n") + rst.write(f'{"="*(len(temp_file_name))}\n\n') rst.write(f".. automodule:: ansys.fluent.core.{file}\n") if "root" not in file: _write_common_rst_members(rst_file=rst) diff --git a/doc/changelog.d/4579.fixed.md b/doc/changelog.d/4579.fixed.md deleted file mode 100644 index e5dd7a60da25..000000000000 --- a/doc/changelog.d/4579.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Example deprecation warnings and improvements diff --git a/doc/changelog.d/4600.added.md b/doc/changelog.d/4600.added.md deleted file mode 100644 index 2ab20b97f75d..000000000000 --- a/doc/changelog.d/4600.added.md +++ /dev/null @@ -1 +0,0 @@ -Update client side 'enhanced' meshing workflow to use server side 'meshing_workflow' root. diff --git a/doc/changelog.d/4686.documentation.md b/doc/changelog.d/4686.documentation.md deleted file mode 100644 index 973703451242..000000000000 --- a/doc/changelog.d/4686.documentation.md +++ /dev/null @@ -1 +0,0 @@ -Update AUTHORS typo diff --git a/doc/changelog.d/4709.maintenance.md b/doc/changelog.d/4709.maintenance.md deleted file mode 100644 index 54b3a4d5e745..000000000000 --- a/doc/changelog.d/4709.maintenance.md +++ /dev/null @@ -1 +0,0 @@ -Update CHANGELOG for v0.38.dev2 diff --git a/doc/changelog.d/4713.added.md b/doc/changelog.d/4713.added.md deleted file mode 100644 index f9317b035bdb..000000000000 --- a/doc/changelog.d/4713.added.md +++ /dev/null @@ -1 +0,0 @@ -Make sure slurm launcher works even if Slurm is not available in client diff --git a/doc/changelog.d/4718.fixed.md b/doc/changelog.d/4718.fixed.md deleted file mode 100644 index 78a6a72be86e..000000000000 --- a/doc/changelog.d/4718.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Fix test_cad_to_post tests [skip tests] diff --git a/doc/changelog.d/4719.maintenance.md b/doc/changelog.d/4719.maintenance.md deleted file mode 100644 index b3e9518fe182..000000000000 --- a/doc/changelog.d/4719.maintenance.md +++ /dev/null @@ -1 +0,0 @@ -Update CHANGELOG for v0.37.1 diff --git a/doc/changelog.d/4720.maintenance.md b/doc/changelog.d/4720.maintenance.md deleted file mode 100644 index bca0b76dc343..000000000000 --- a/doc/changelog.d/4720.maintenance.md +++ /dev/null @@ -1 +0,0 @@ -Log all ImportError/ModuleNotFoundError from PyFluent diff --git a/doc/changelog.d/4721.documentation.md b/doc/changelog.d/4721.documentation.md deleted file mode 100644 index 349d8b00a51a..000000000000 --- a/doc/changelog.d/4721.documentation.md +++ /dev/null @@ -1 +0,0 @@ -Handle the case when deprecated version in Fluent is less than minimum supported version. diff --git a/doc/changelog.d/4729.fixed.md b/doc/changelog.d/4729.fixed.md deleted file mode 100644 index 9595f87a94e2..000000000000 --- a/doc/changelog.d/4729.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Block inactive object access via builtin classes. diff --git a/doc/changelog.d/4732.documentation.md b/doc/changelog.d/4732.documentation.md new file mode 100644 index 000000000000..90abbb725dd0 --- /dev/null +++ b/doc/changelog.d/4732.documentation.md @@ -0,0 +1 @@ +Update \`\`CONTRIBUTORS.md\`\` with the latest contributors diff --git a/doc/changelog.d/4749.fixed.md b/doc/changelog.d/4749.fixed.md deleted file mode 100644 index a367abdb58f4..000000000000 --- a/doc/changelog.d/4749.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Suppress user warnings from NLTK diff --git a/doc/changelog.d/4752.fixed.md b/doc/changelog.d/4752.fixed.md deleted file mode 100644 index d90354f3b13a..000000000000 --- a/doc/changelog.d/4752.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Update argument names as per Fluent change. diff --git a/doc/changelog.d/4762.fixed.md b/doc/changelog.d/4762.fixed.md new file mode 100644 index 000000000000..b94ec5e06a5a --- /dev/null +++ b/doc/changelog.d/4762.fixed.md @@ -0,0 +1 @@ +Updated the dependabot.yml file diff --git a/doc/changelog.d/4763.fixed.md b/doc/changelog.d/4763.fixed.md deleted file mode 100644 index b094f721916b..000000000000 --- a/doc/changelog.d/4763.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Some issues .is_active +1385523 diff --git a/doc/changelog.d/4767.fixed.md b/doc/changelog.d/4767.fixed.md deleted file mode 100644 index b070c6026834..000000000000 --- a/doc/changelog.d/4767.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Viz Mesh in CHT example. diff --git a/doc/changelog.d/4774.dependencies.md b/doc/changelog.d/4774.dependencies.md deleted file mode 100644 index ec64399c474b..000000000000 --- a/doc/changelog.d/4774.dependencies.md +++ /dev/null @@ -1 +0,0 @@ -Bump the actions group across 1 directory with 11 updates diff --git a/doc/changelog.d/4777.documentation.md b/doc/changelog.d/4777.documentation.md deleted file mode 100644 index 2c7c65796b62..000000000000 --- a/doc/changelog.d/4777.documentation.md +++ /dev/null @@ -1 +0,0 @@ -Updated meshing docs for 26R1. [skip-tests] diff --git a/doc/changelog.d/4778.fixed.md b/doc/changelog.d/4778.fixed.md deleted file mode 100644 index f8bb6de2bea4..000000000000 --- a/doc/changelog.d/4778.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Remove dry_run from PIM launcher diff --git a/doc/changelog.d/4779.added.md b/doc/changelog.d/4779.added.md deleted file mode 100644 index 5fa2e4429613..000000000000 --- a/doc/changelog.d/4779.added.md +++ /dev/null @@ -1 +0,0 @@ -Update server based enhanced meshing workflow. diff --git a/doc/changelog.d/4780.documentation.md b/doc/changelog.d/4780.documentation.md deleted file mode 100644 index 88e42b1d8600..000000000000 --- a/doc/changelog.d/4780.documentation.md +++ /dev/null @@ -1 +0,0 @@ -Update logging docs [skip tests] diff --git a/doc/changelog.d/4781.documentation.md b/doc/changelog.d/4781.documentation.md deleted file mode 100644 index 39f4d9482b7a..000000000000 --- a/doc/changelog.d/4781.documentation.md +++ /dev/null @@ -1 +0,0 @@ -Update units docs [skip tests] diff --git a/doc/changelog.d/4782.fixed.md b/doc/changelog.d/4782.fixed.md deleted file mode 100644 index 874dd2aa02ab..000000000000 --- a/doc/changelog.d/4782.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Update logger configurations diff --git a/doc/changelog.d/4783.fixed.md b/doc/changelog.d/4783.fixed.md deleted file mode 100644 index 57484cfb964e..000000000000 --- a/doc/changelog.d/4783.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Update create_launcher function diff --git a/doc/changelog.d/4785.maintenance.md b/doc/changelog.d/4785.maintenance.md deleted file mode 100644 index 3ac2c700dfbc..000000000000 --- a/doc/changelog.d/4785.maintenance.md +++ /dev/null @@ -1 +0,0 @@ -Update year in LICENSE. diff --git a/doc/changelog.d/4789.fixed.md b/doc/changelog.d/4789.fixed.md deleted file mode 100644 index 8d5b3484cdce..000000000000 --- a/doc/changelog.d/4789.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Disable deprecation warning in no-ops mode diff --git a/doc/changelog.d/4790.fixed.md b/doc/changelog.d/4790.fixed.md new file mode 100644 index 000000000000..f7b28d9536da --- /dev/null +++ b/doc/changelog.d/4790.fixed.md @@ -0,0 +1 @@ +Dimensional check for pim not supporting ints diff --git a/doc/changelog.d/4791.documentation.md b/doc/changelog.d/4791.documentation.md deleted file mode 100644 index 8c997e81a718..000000000000 --- a/doc/changelog.d/4791.documentation.md +++ /dev/null @@ -1 +0,0 @@ -Minor update on example diff --git a/doc/changelog.d/4796.fixed.md b/doc/changelog.d/4796.fixed.md deleted file mode 100644 index 0b7612a2a66c..000000000000 --- a/doc/changelog.d/4796.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Python dunder method access via inactive session. diff --git a/doc/changelog.d/4798.added.md b/doc/changelog.d/4798.added.md deleted file mode 100644 index a840dabdd8c3..000000000000 --- a/doc/changelog.d/4798.added.md +++ /dev/null @@ -1 +0,0 @@ -Use cyberchannel module from ansys.tools.common diff --git a/doc/changelog.d/4802.maintenance.md b/doc/changelog.d/4802.maintenance.md deleted file mode 100644 index 8b4cd23da06b..000000000000 --- a/doc/changelog.d/4802.maintenance.md +++ /dev/null @@ -1 +0,0 @@ -Fix image tag in Podman workflow [skip tests] diff --git a/doc/changelog.d/4806.added.md b/doc/changelog.d/4806.added.md deleted file mode 100644 index 95d12ee4c823..000000000000 --- a/doc/changelog.d/4806.added.md +++ /dev/null @@ -1 +0,0 @@ -Separate container images [skip tests] diff --git a/doc/changelog.d/4808.maintenance.md b/doc/changelog.d/4808.maintenance.md deleted file mode 100644 index 68b6f6dfb8a1..000000000000 --- a/doc/changelog.d/4808.maintenance.md +++ /dev/null @@ -1 +0,0 @@ -Clean up and update client-side meshing workflow w.r.t. 2R61 for release diff --git a/doc/changelog.d/4809.maintenance.md b/doc/changelog.d/4809.maintenance.md deleted file mode 100644 index 0fac7890f468..000000000000 --- a/doc/changelog.d/4809.maintenance.md +++ /dev/null @@ -1 +0,0 @@ -Use argument to use legacy interface. diff --git a/doc/changelog.d/4810.maintenance.md b/doc/changelog.d/4810.maintenance.md deleted file mode 100644 index a2fae0fd711f..000000000000 --- a/doc/changelog.d/4810.maintenance.md +++ /dev/null @@ -1 +0,0 @@ -Move current workflow's logic to specific workflows. diff --git a/doc/changelog.d/4811.documentation.md b/doc/changelog.d/4811.documentation.md deleted file mode 100644 index 14791e13a2ca..000000000000 --- a/doc/changelog.d/4811.documentation.md +++ /dev/null @@ -1 +0,0 @@ -Update meshing workflow docs and some dostrings [skip tests] diff --git a/doc/changelog.d/4815.dependencies.md b/doc/changelog.d/4815.dependencies.md deleted file mode 100644 index 80d889614dd9..000000000000 --- a/doc/changelog.d/4815.dependencies.md +++ /dev/null @@ -1 +0,0 @@ -Bump version to v0.38.dev3 diff --git a/doc/changelog.d/4816.maintenance.md b/doc/changelog.d/4816.maintenance.md deleted file mode 100644 index 32f056a9bbf8..000000000000 --- a/doc/changelog.d/4816.maintenance.md +++ /dev/null @@ -1 +0,0 @@ -Update ansys-units version diff --git a/doc/changelog.d/4821.maintenance.md b/doc/changelog.d/4821.maintenance.md new file mode 100644 index 000000000000..cc84e7e18648 --- /dev/null +++ b/doc/changelog.d/4821.maintenance.md @@ -0,0 +1 @@ +Update CHANGELOG for v0.38.dev3 diff --git a/doc/changelog.d/4822.maintenance.md b/doc/changelog.d/4822.maintenance.md deleted file mode 100644 index 04ea50b3105a..000000000000 --- a/doc/changelog.d/4822.maintenance.md +++ /dev/null @@ -1 +0,0 @@ -Update 'range' from scalar fields to take Variable Descriptors. diff --git a/doc/changelog.d/4824.dependencies.md b/doc/changelog.d/4824.dependencies.md deleted file mode 100644 index ca010376b520..000000000000 --- a/doc/changelog.d/4824.dependencies.md +++ /dev/null @@ -1 +0,0 @@ -Limit major version on ansys-tools-filetransfer project diff --git a/doc/changelog.d/4825.dependencies.md b/doc/changelog.d/4825.dependencies.md deleted file mode 100644 index cde30e74008e..000000000000 --- a/doc/changelog.d/4825.dependencies.md +++ /dev/null @@ -1 +0,0 @@ -Remove dependency on pyansys-tools-report diff --git a/doc/changelog.d/4826.maintenance.md b/doc/changelog.d/4826.maintenance.md deleted file mode 100644 index fe2625ab1087..000000000000 --- a/doc/changelog.d/4826.maintenance.md +++ /dev/null @@ -1 +0,0 @@ -Update the usage of Variable Descriptors in svars. diff --git a/doc/changelog.d/4832.maintenance.md b/doc/changelog.d/4832.maintenance.md deleted file mode 100644 index 8002aa434ccb..000000000000 --- a/doc/changelog.d/4832.maintenance.md +++ /dev/null @@ -1 +0,0 @@ -Update battery pack and transient compressible nozzle examples [skip tests] diff --git a/doc/changelog.d/4835.documentation.md b/doc/changelog.d/4835.documentation.md new file mode 100644 index 000000000000..967be9ae128f --- /dev/null +++ b/doc/changelog.d/4835.documentation.md @@ -0,0 +1 @@ +Update Meshing workflow's api docs. diff --git a/doc/changelog.d/4838.fixed.md b/doc/changelog.d/4838.fixed.md deleted file mode 100644 index 3a5313ebf9f1..000000000000 --- a/doc/changelog.d/4838.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Fix standalone linux connection diff --git a/doc/changelog.d/4847.maintenance.md b/doc/changelog.d/4847.maintenance.md new file mode 100644 index 000000000000..8bee1bbcaffc --- /dev/null +++ b/doc/changelog.d/4847.maintenance.md @@ -0,0 +1 @@ +Update CHANGELOG for v0.38.dev4 diff --git a/doc/changelog.d/4848.documentation.md b/doc/changelog.d/4848.documentation.md new file mode 100644 index 000000000000..a75810cc7320 --- /dev/null +++ b/doc/changelog.d/4848.documentation.md @@ -0,0 +1 @@ +Example on lid driven cavity [skip tests] diff --git a/doc/changelog.d/4853.maintenance.md b/doc/changelog.d/4853.maintenance.md new file mode 100644 index 000000000000..c3be66fa847c --- /dev/null +++ b/doc/changelog.d/4853.maintenance.md @@ -0,0 +1 @@ +Change ansys-units range diff --git a/doc/changelog.d/4858.dependencies.md b/doc/changelog.d/4858.dependencies.md new file mode 100644 index 000000000000..fc7a3a028df0 --- /dev/null +++ b/doc/changelog.d/4858.dependencies.md @@ -0,0 +1 @@ +Bump version to v0.38.dev5 diff --git a/doc/changelog.d/4867.fixed.md b/doc/changelog.d/4867.fixed.md new file mode 100644 index 000000000000..af866c48290d --- /dev/null +++ b/doc/changelog.d/4867.fixed.md @@ -0,0 +1 @@ +Remove insecure options diff --git a/doc/changelog.d/4874.maintenance.md b/doc/changelog.d/4874.maintenance.md new file mode 100644 index 000000000000..537e3ad7d811 --- /dev/null +++ b/doc/changelog.d/4874.maintenance.md @@ -0,0 +1 @@ +Update existing instance of \"pyfluent.EXAMPLES_PATH\" and \"source_terms\" diff --git a/doc/changelog.d/4880.maintenance.md b/doc/changelog.d/4880.maintenance.md new file mode 100644 index 000000000000..16b75d0318dd --- /dev/null +++ b/doc/changelog.d/4880.maintenance.md @@ -0,0 +1 @@ +Potential fix for CI caching by disabling generation of .pyc files [skip tests] diff --git a/doc/changelog.d/4886.maintenance.md b/doc/changelog.d/4886.maintenance.md new file mode 100644 index 000000000000..fe33dead284d --- /dev/null +++ b/doc/changelog.d/4886.maintenance.md @@ -0,0 +1 @@ +Disable label-syncer [skip tests] diff --git a/doc/changelog.d/4888.test.md b/doc/changelog.d/4888.test.md new file mode 100644 index 000000000000..e764baf84085 --- /dev/null +++ b/doc/changelog.d/4888.test.md @@ -0,0 +1 @@ +Standardize test skip reasons across test suite diff --git a/doc/rstgen.py b/doc/rstgen.py index d086f454710e..997e2a12a8a3 100644 --- a/doc/rstgen.py +++ b/doc/rstgen.py @@ -113,7 +113,7 @@ def _process_datamodel_path(full_name: str): """ path_string = re.findall("core.*", full_name) path = path_string[0].replace("core.generated.", "") - path = re.sub("[0-9]", "", path) + path = re.sub(r"\d+(?![A-Za-z])", "", path) path = path.replace("Root." if "Root." in path else "Root", "") path = path.replace("datamodel_.", "") path = path.rstrip(".") @@ -166,7 +166,9 @@ def _get_menu_name_path(menu: type, is_datamodel: bool): return full_name, full_path -def _get_docdir(mode: str, path: str | None = None, is_datamodel: bool | None = None): +def _get_docdir( + mode: str, path: str | None = None, is_datamodel: bool | None = None +) -> Path: """Get tui doc directory to generate all RST files. Parameters @@ -307,6 +309,12 @@ def _get_reference(menu: type, menu_path: str, mode: str, is_datamodel: bool): if menu["name"].__name__ == "Root": reference = f".. _ref_{mode}_datamodel_{menu_path}:\n\n" else: + temp_path = _get_task_object_name(menu["name"]) + menu_path = ( + menu_path.removesuffix("/_" + temp_path) + if temp_path and menu_path.endswith("/_" + temp_path) + else menu_path + ) reference = f".. _ref_{mode}_datamodel_{menu_path.rstrip('/').replace('/', '_')}:\n\n" else: if menu["name"].__name__ == "main_menu": @@ -345,6 +353,20 @@ def _get_title(mode: str, menu_path: str, menu: type, is_datamodel: bool): return title +def _get_task_object_name(menu_obj): + temp_path_list = menu_obj.__qualname__.split(".") + if ( + len(temp_path_list) > 3 + and temp_path_list[1] in ["task_object", "parts", "parts_files"] + and ( + menu_obj.__name__.startswith("_") + or menu_obj.__qualname__.split(".")[-2].startswith("_") + or menu_obj.__qualname__.split(".")[-3].startswith("_") + ) + ): + return temp_path_list[2] + + def _write_doc(menu: type, mode: str, is_datamodel: bool): """Write RST file for each menu. @@ -358,11 +380,23 @@ def _write_doc(menu: type, mode: str, is_datamodel: bool): Whether to generate datamodel RST files. """ menu_name, menu_path = _get_menu_name_path(menu["name"], is_datamodel) - full_folder_path = _get_docdir(mode, menu_path, is_datamodel) + temp_task_obj_name = _get_task_object_name(menu["name"]) + if temp_task_obj_name: + temp_folder_path = _get_docdir(mode, menu_path, is_datamodel) + full_folder_path = Path( + *(p for p in temp_folder_path.parts if p != f"_{temp_task_obj_name}") + ) + else: + full_folder_path = _get_docdir(mode, menu_path, is_datamodel) Path(full_folder_path).mkdir(parents=True, exist_ok=True) folder = Path(full_folder_path) index_file = folder / f"{folder.name}_contents.rst" title = _get_title(mode, menu_path, menu, is_datamodel) + title = ( + title.removeprefix("_") + if temp_task_obj_name and title == "_" + temp_task_obj_name + else title + ) with open(index_file, "w", encoding="utf8") as f: f.write(_get_reference(menu, menu_path, mode, is_datamodel)) f.write(f"{title}\n") @@ -381,8 +415,15 @@ def _write_doc(menu: type, mode: str, is_datamodel: bool): if menu["with_members"]: f.write(".. toctree::\n") f.write(" :hidden:\n\n") - for member in _get_sorted_members(menu["with_members"]): - f.write(f" {member}/{member}_contents\n") + for member in menu["with_members"]: + temp_member_name = _get_task_object_name(member) + if ( + temp_member_name + and temp_member_name == member.__name__.removeprefix("_") + ): + f.write(f" {temp_member_name}/{temp_member_name}_contents\n") + else: + f.write(f" {member.__name__}/{member.__name__}_contents\n") def _generate_all_attribute_classes(all_menus: list, main_menu: type): diff --git a/doc/source/_static/lid_driven_cavity_1.png b/doc/source/_static/lid_driven_cavity_1.png new file mode 100644 index 000000000000..e7eaa26a5d58 Binary files /dev/null and b/doc/source/_static/lid_driven_cavity_1.png differ diff --git a/doc/source/_static/lid_driven_cavity_2.png b/doc/source/_static/lid_driven_cavity_2.png new file mode 100644 index 000000000000..b18511206a8b Binary files /dev/null and b/doc/source/_static/lid_driven_cavity_2.png differ diff --git a/doc/source/_static/lid_driven_cavity_3.png b/doc/source/_static/lid_driven_cavity_3.png new file mode 100644 index 000000000000..a242c8d0010d Binary files /dev/null and b/doc/source/_static/lid_driven_cavity_3.png differ diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst index 8b8479eb5429..dbe293d15214 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -9,6 +9,171 @@ This document contains the release notes for the project. .. towncrier release notes start +`0.38.dev4 `_ - January 22, 2026 +`0.38.dev3 `_ - January 19, 2026 +=========================================================================================== + +.. tab-set:: + + + .. tab-item:: Added + + .. list-table:: + :header-rows: 0 + :widths: auto + + * - Update client side 'enhanced' meshing workflow to use server side 'meshing_workflow' root. + - `#4600 `_ + + * - Make sure slurm launcher works even if Slurm is not available in client + - `#4713 `_ + + * - Update server based enhanced meshing workflow. + - `#4779 `_ + + * - Use cyberchannel module from ansys.tools.common + - `#4798 `_ + + * - Separate container images [skip tests] + - `#4806 `_ + + + .. tab-item:: Fixed + + .. list-table:: + :header-rows: 0 + :widths: auto + + * - Example deprecation warnings and improvements + - `#4579 `_ + + * - Fix test_cad_to_post tests [skip tests] + - `#4718 `_ + + * - Block inactive object access via builtin classes. + - `#4729 `_ + + * - Suppress user warnings from NLTK + - `#4749 `_ + + * - Update argument names as per Fluent change. + - `#4752 `_ + + * - Some issues .is_active +1385523 + - `#4763 `_ + + * - Viz Mesh in CHT example. + - `#4767 `_ + + * - Remove dry_run from PIM launcher + - `#4778 `_ + + * - Update logger configurations + - `#4782 `_ + + * - Update create_launcher function + - `#4783 `_ + + * - Disable deprecation warning in no-ops mode + - `#4789 `_ + + * - Python dunder method access via inactive session. + - `#4796 `_ + + * - Fix standalone linux connection + - `#4838 `_ + + + .. tab-item:: Dependencies + + .. list-table:: + :header-rows: 0 + :widths: auto + + * - Bump the actions group across 1 directory with 11 updates + - `#4774 `_ + + * - Bump version to v0.38.dev3 + - `#4815 `_ + + * - Limit major version on ansys-tools-filetransfer project + - `#4824 `_ + + * - Remove dependency on pyansys-tools-report + - `#4825 `_ + + + .. tab-item:: Documentation + + .. list-table:: + :header-rows: 0 + :widths: auto + + * - Update AUTHORS typo + - `#4686 `_ + + * - Handle the case when deprecated version in Fluent is less than minimum supported version. + - `#4721 `_ + + * - Updated meshing docs for 26R1. [skip-tests] + - `#4777 `_ + + * - Update logging docs [skip tests] + - `#4780 `_ + + * - Update units docs [skip tests] + - `#4781 `_ + + * - Minor update on example + - `#4791 `_ + + * - Update meshing workflow docs and some dostrings [skip tests] + - `#4811 `_ + + + .. tab-item:: Maintenance + + .. list-table:: + :header-rows: 0 + :widths: auto + + * - Update CHANGELOG for v0.38.dev2 + - `#4709 `_ + + * - Update CHANGELOG for v0.37.1 + - `#4719 `_ + + * - Log all ImportError/ModuleNotFoundError from PyFluent + - `#4720 `_ + + * - Update year in LICENSE. + - `#4785 `_ + + * - Fix image tag in Podman workflow [skip tests] + - `#4802 `_ + + * - Clean up and update client-side meshing workflow w.r.t. 2R61 for release + - `#4808 `_ + + * - Use argument to use legacy interface. + - `#4809 `_ + + * - Move current workflow's logic to specific workflows. + - `#4810 `_ + + * - Update ansys-units version + - `#4816 `_ + + * - Update 'range' from scalar fields to take Variable Descriptors. + - `#4822 `_ + + * - Update the usage of Variable Descriptors in svars. + - `#4826 `_ + + * - Update battery pack and transient compressible nozzle examples [skip tests] + - `#4832 `_ + + `0.37.1 `_ - December 09, 2025 ====================================================================================== diff --git a/doc/source/conf.py b/doc/source/conf.py index 1fd83727991c..035d45faf72e 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -152,7 +152,7 @@ def _stop_fluent_container(gallery_conf, fname): # path where to save gallery generated examples "gallery_dirs": ["examples"], # Pattern to search for example files - "filename_pattern": r"exhaust_system_settings_api\.py|external_compressible_flow\.py|mixing_elbow_settings_api\.py|modeling_cavitation\.py|species_transport\.py|ahmed_body_workflow\.py|brake\.py|DOE_ML\.py|radiation_headlamp\.py|parametric_static_mixer_1\.py|conjugate_heat_transfer\.py|tyler_sofrin_modes\.py|lunar_lander_thermal\.py|modeling_ablation\.py|frozen_rotor_workflow\.py|mixing_tank_workflow\.py|single_battery_cell_workflow\.py|steady_vortex\.py|fsi_1way_workflow\.py|transient_compressible_nozzle_workflow\.py|Electrolysis_Modeling_workflow\.py|catalytic_convertor_workflow\.py|battery_pack\.py", + "filename_pattern": r"exhaust_system_settings_api\.py|external_compressible_flow\.py|mixing_elbow_settings_api\.py|modeling_cavitation\.py|species_transport\.py|ahmed_body_workflow\.py|brake\.py|DOE_ML\.py|radiation_headlamp\.py|parametric_static_mixer_1\.py|conjugate_heat_transfer\.py|tyler_sofrin_modes\.py|lunar_lander_thermal\.py|modeling_ablation\.py|frozen_rotor_workflow\.py|mixing_tank_workflow\.py|single_battery_cell_workflow\.py|steady_vortex\.py|fsi_1way_workflow\.py|transient_compressible_nozzle_workflow\.py|Electrolysis_Modeling_workflow\.py|catalytic_convertor_workflow\.py|battery_pack\.py|lid_driven_cavity\.py", # Do not execute examples "plot_gallery": False, # Remove the "Download all examples" button from the top level gallery diff --git a/doc/source/user_guide/solver_settings/solver_settings_contents.rst b/doc/source/user_guide/solver_settings/solver_settings_contents.rst index 85de7e829d10..6858467972f0 100644 --- a/doc/source/user_guide/solver_settings/solver_settings_contents.rst +++ b/doc/source/user_guide/solver_settings/solver_settings_contents.rst @@ -85,7 +85,7 @@ of container objects: :obj:`~ansys.fluent.core.solver.flobject.Group`, created unnamed objects of its specified child type (accessible via a ``child_object_type`` attribute) in a list. Children of a ``ListObject`` object can be accessed using the index operator. - For example, ``solver_session.settings.setup.cell_zone_conditions.fluid['fluid-1'].source_terms['mass'][2]`` + For example, ``solver_session.settings.setup.cell_zone_conditions.fluid['fluid-1'].sources.terms['mass'][2]`` refers to the third (starting from index 0) mass source entry for the fluid zone named ``fluid-1``. The current number of child objects can be accessed with the ``get_size()`` method. @@ -352,8 +352,8 @@ For named objects and list objects, for instance:: >>> from ansys.fluent.core.solver import FluidCellZone >>> fluid = FluidCellZone(settings_source=solver_session, name="*") - >>> fluid.source_terms["*mom*"]() - {'fluid': {'source_terms': {'x-momentum': [], 'y-momentum': [], 'z-momentum': []}}} + >>> fluid.sources.terms["*mom*"]() + {'fluid': {'sources': {'terms': {'x-momentum': [], 'y-momentum': [], 'z-momentum': []}}}} Also, when you have one or more velocity inlets with "inlet" in their names:: diff --git a/examples/00-fluent/conjugate_heat_transfer.py b/examples/00-fluent/conjugate_heat_transfer.py index 5780a2eb9396..65e87aaa8af0 100644 --- a/examples/00-fluent/conjugate_heat_transfer.py +++ b/examples/00-fluent/conjugate_heat_transfer.py @@ -466,7 +466,7 @@ # Save Mesh File # ============== -save_mesh_as = str(Path(pyfluent.EXAMPLES_PATH) / "hx-fin-2mm.msh.h5") +save_mesh_as = str(Path(pyfluent.config.examples_path) / "hx-fin-2mm.msh.h5") meshing_session.tui.file.write_mesh(save_mesh_as) ############################################################################# diff --git a/examples/00-fluent/lid_driven_cavity.py b/examples/00-fluent/lid_driven_cavity.py new file mode 100644 index 000000000000..fc1a1692819c --- /dev/null +++ b/examples/00-fluent/lid_driven_cavity.py @@ -0,0 +1,310 @@ +# Copyright (C) 2021 - 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# 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 the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +""".. _lid_driven_cavity_simulation: + +Lid Driven Flow in a Cavity +--------------------------- +""" +# %% +# Objective: +# ---------- +# +# This PyFluent simulation investigates the classical lid-driven cavity flow, +# a benchmark problem in computational fluid dynamics. The domain consists of +# a square cavity filled with an incompressible fluid, where the top wall moves +# at a constant velocity while the remaining walls are stationary. +# The motion of the lid drives the flow inside the cavity, producing a +# primary vortex and secondary corner vortices due to viscous effects and no-slip +# boundary conditions. This problem is widely used to validate CFD solvers because +# it combines simple geometry with complex flow physics governed by the incompressible +# Navier–Stokes equations. Through this simulation, we analyze vortex formation and velocity distribution. +# +# Problem Description +# ------------------- +# +# This simulation models a lid-driven cavity flow with the following +# configuration: +# +# - **Square cavity (1 m × 1 m)**: Completely filled with water +# - **Stationary walls**: Left, right, and bottom walls are fixed with no-slip conditions +# - **Moving top lid**: Translates horizontally at a constant velocity of **0.01 m/s** +# +# The PyFluent analysis focuses on: +# +# - Velocity vector distributions inside the cavity +# - Formation of the primary vortex at the cavity center +# - Development of secondary vortices near the bottom corners +# - Velocity variation along the horizontal centerline +# +# .. image:: ../../_static/lid_driven_cavity_1.png +# :align: center +# :alt: Schematic of lid-driven cavity geometry + +# %% +# Import modules +# ^^^^^^^^^^^^^^ + +import os + +import ansys.fluent.core as pyfluent +from ansys.fluent.core import Dimension, Precision, examples +from ansys.fluent.core.solver import ( + FluidCellZones, + General, + Graphics, + Initialization, + LineSurfaces, + Materials, + Methods, + Residual, + RunCalculation, + Vector, + Viscous, + WallBoundaries, +) +from ansys.fluent.visualization import GraphicsWindow, XYPlot + +# %% +# Launch Fluent +# ^^^^^^^^^^^^^ + +solver = pyfluent.launch_fluent( + precision=Precision.DOUBLE, + dimension=Dimension.TWO, + mode=pyfluent.FluentMode.SOLVER, +) + +# %% +# Read mesh +# ^^^^^^^^^ + +mesh_file = examples.download_file( + "lid_driven_cavity.msh", + "pyfluent/lid_driven_cavity", + save_path=os.getcwd(), +) + +solver.file.read(file_type="mesh", file_name=mesh_file) + +# %% +# Viscous Model +# ^^^^^^^^^^^^^ + +viscous = Viscous(solver) + +viscous.model = viscous.model.LAMINAR + +# %% +# General settings +# ^^^^^^^^^^^^^^^^ + +g = 9.81 # m/s² +general_settings = General(solver) + +general_settings.operating_conditions.gravity.enable = True +general_settings.operating_conditions.gravity.components = [0.0, -g, 0.0] + +# %% +# Material definition +# ^^^^^^^^^^^^^^^^^^^ + +# %% +# Since the cavity is completely filled with water, the working fluid is defined +# as water liquid. The material properties are imported directly from the solver’s +# material database and applied to the fluid cell zone to ensure +# accurate density and viscosity representation. + +# %% +materials = Materials(solver) +fluid = FluidCellZones(solver) + +materials.database.copy_by_name(name="water-liquid", type="fluid") + +fluid["surface_body"].general.material = "water-liquid" + +# %% +# Boundary conditions +# ^^^^^^^^^^^^^^^^^^^ +# Define the top wall as a moving lid with velocity 0.01 m/s +wall_boundary = WallBoundaries(solver) + +wall_boundary["top_moving_wall"] = { + "momentum": {"wall_motion": "Moving Wall", "speed": {"value": 0.01}} # m/s +} +# Other walls remain stationary + +# %% +# Solution methods +# ^^^^^^^^^^^^^^^^ + +solution_methods = Methods(solver) + +solution_methods.p_v_coupling.flow_scheme = "SIMPLEC" +solution_methods.spatial_discretization = { + "gradient_scheme": "green-gauss-cell-based", +} + +# %% +# Residual convergence criteria +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +# %% +# Reason for choosing 1e-6: +# +# - Ensures that the numerical solution satisfies the governing equations to a high degree of accuracy. +# - Reduces numerical errors in velocity and pressure fields. +# - Helps capture delicate flow features, such as primary and secondary vortices in the cavity. + +# %% +monitor_residuals = Residual(solver) + +monitor_residuals.equations = { + eqn: {"absolute_criteria": 1e-6} + for eqn in ( + "continuity", + "x-velocity", + "y-velocity", + ) +} + +# %% +# Initialize and solve +# -------------------- + +solution_initialization = Initialization(solver) + +solution_initialization.initialization_type = "hybrid" +solution_initialization.initialize() + +# %% +# For this simulation, the prescribed convergence criterion of **1e-6**, +# the residuals stabilize after approximately **1000 iterations**, +# indicating that the governing equations are satisfied to the desired level of accuracy. +# Continuing the calculation up to **1500 iterations** provides an additional safety margin, +# ensuring that numerical errors in the velocity and pressure fields are minimized + +# %% +calculation = RunCalculation(solver) +calculation.iterate(iter_count=1500) + +# %% +# Post-processing +# --------------- + +vector = Vector(solver, new_instance_name="velocity-magnitude-vector") +graphics = Graphics(solver) + +# Define image resolution as named constants to improve maintainability. +# Updating these values will automatically apply to all image save operations. +image_width = 650 +image_height = 450 + +graphics.picture.x_resolution = image_width +graphics.picture.y_resolution = image_height + +vector.vector_field = "velocity" +vector.surfaces_list = [ + "bottom_wall", + "top_moving_wall", + "interior-surface_body", + "stationary_side_wall", +] +vector.options.vector_style = "arrow" +vector.options.scale = 0.02 # Scale factor for visibility +vector.vector_opt.fixed_length = True # Uniform arrow length +vector.display() + +graphics.picture.save_picture(file_name="lid_driven_cavity_2.png") + +# %% +# .. image:: ../../_static/lid_driven_cavity_2.png +# :align: center +# :alt: velocity vector + +# %% +# Create horizontal centerline +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +line_surfaces = LineSurfaces(solver) + +line_surfaces.create() +line_surfaces["line-1"] = { + "p0": [0, 0.5, 0], + "p1": [1, 0.5, 0], +} + +# %% +# Plot velocity magnitude along centerline +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +xy_plot = XYPlot( + solver=solver, + surfaces=["line-1"], + y_axis_function="velocity-magnitude", +) +plot_window = GraphicsWindow() +plot_window.add_plot(xy_plot, position=(0, 0), title="velocity along center line") +plot_window.show() + +# %% +# .. image:: ../../_static/lid_driven_cavity_3.png +# :align: center +# :alt: velocity magnitude at centerline + +# %% +# Save case and data +# ------------------ + +solver.settings.file.write_case_data(file_name="lid_driven_cavity_case_data") + +# %% +# Close session +# ------------- + +solver.exit() + +# %% +# Discussion +# ---------- +# +# The lid-driven cavity simulation successfully captures the fundamental +# flow physics associated with shear-driven recirculating flows. +# The motion of the top lid induces shear at the fluid–wall interface, +# transferring momentum into the cavity and generating a dominant recirculating motion within the fluid domain. +# +# The velocity vector plot shows a dominant **primary vortex** at the center of the +# cavity, driven by the motion of the top lid. Fluid moves in the direction of the +# lid near the top boundary and recirculates downward along the sidewalls, which is +# characteristic of lid-driven cavity flow at low Reynolds numbers. Reduced velocity +# magnitudes are observed near the stationary walls due to the **no-slip boundary condition**, +# where the fluid velocity approaches zero. The vector field also reveals **secondary vortices** +# near the bottom corners, formed due to viscous effects and local pressure gradients caused by +# interaction with the stationary walls. Overall, the flow remains smooth, +# symmetric, and indicative of a steady laminar regime. +# +# The velocity variation along the horizontal centerline provides quantitative +# insight into the internal flow structure. The velocity component along this +# line shows both positive and negative values, indicating upward and downward +# motions associated with the recirculating flow within the cavity. + +# sphinx_gallery_thumbnail_path = '_static/lid_driven_cavity_1.png' diff --git a/pyproject.toml b/pyproject.toml index b4dfccb1d9e3..0c406fc95ebe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ dependencies = [ "ansys-platform-instancemanagement~=1.1", "ansys-tools-common>=0.4.0", "ansys-tools-filetransfer>=0.2,<1.0", - "ansys-units>=0.10.0,<1.0", + "ansys-units~=0.10.0", "defusedxml>=0.7.1", "deprecated>=1.2.18", "docker>=7.1.0", @@ -40,9 +40,9 @@ dynamic = ["version"] include = ["src/ansys/fluent/core/generated/"] [project.optional-dependencies] -reader = ["h5py==3.15.1"] -ui-jupyter = ["ipywidgets"] -ui = ["panel"] +reader = ["h5py>=3.15.1"] +ui-jupyter = ["ipywidgets>=8.1.8"] +ui = ["panel>=1.8.1"] tests = [ "pytest==8.4.2", "pytest-cov==7.0.0", diff --git a/src/ansys/fluent/core/__init__.py b/src/ansys/fluent/core/__init__.py index e67a25802796..0865486f5313 100644 --- a/src/ansys/fluent/core/__init__.py +++ b/src/ansys/fluent/core/__init__.py @@ -81,7 +81,7 @@ from ansys.fluent.core.utils.fluent_version import FluentVersion # noqa: F401 from ansys.fluent.core.utils.setup_for_fluent import setup_for_fluent # noqa: F401 -__version__ = "0.38.dev4" +__version__ = "0.38.dev5" _VERSION_INFO = None """ diff --git a/src/ansys/fluent/core/launcher/pim_launcher.py b/src/ansys/fluent/core/launcher/pim_launcher.py index 15d1ffe8f07b..e8b84c41fa2b 100644 --- a/src/ansys/fluent/core/launcher/pim_launcher.py +++ b/src/ansys/fluent/core/launcher/pim_launcher.py @@ -293,7 +293,7 @@ def launch_remote_fluent( instance = create_fluent_instance( pim=pim, mode=mode, - dimensionality=dimensionality, + dimensionality=Dimension(dimensionality), product_version=product_version, ) @@ -333,7 +333,7 @@ def launch_remote_fluent( def create_fluent_instance( - pim, mode: FluentMode, dimensionality: Dimension | int, product_version: str | None + pim, mode: FluentMode, dimensionality: Dimension, product_version: str | None ): """Create a Fluent instance based on mode and dimensionality.""" diff --git a/src/ansys/fluent/core/utils/file_transfer_service.py b/src/ansys/fluent/core/utils/file_transfer_service.py index 83aefd6803c6..ae2ac215b988 100644 --- a/src/ansys/fluent/core/utils/file_transfer_service.py +++ b/src/ansys/fluent/core/utils/file_transfer_service.py @@ -249,6 +249,7 @@ def __init__( port: int | None = None, mount_target: str | None = None, mount_source: str | None = None, + certs_dir: str | None = None, ): """Provides the gRPC-based remote file transfer strategy. @@ -264,6 +265,8 @@ def __init__( Path inside the container where ``mount_source`` will be mounted to. mount_source: str | Path, optional Existing path in the host operating system that will be mounted to ``mount_target``. + certs_dir : str, optional + Directory containing the TLS certificates. The default is ``None``. """ import docker @@ -274,6 +277,17 @@ def __init__( self.image_tag = image_tag if image_tag else "latest" self.mount_target = mount_target if mount_target else "/home/container/workdir/" self.mount_source = mount_source if mount_source else MOUNT_SOURCE + server_command = [ + "--host=0.0.0.0", + "--port=50000", + "--allow-remote-host", + "--transport-mode=mtls", + "--certs-dir=/certs", + ] + + volumes = [f"{self.mount_source}:{self.mount_target}"] + if certs_dir: + volumes.append(f"{certs_dir}:/certs:ro") try: self.host_port = port if port else random.randint(5000, 6000) self.ports = {"50000/tcp": self.host_port} @@ -281,7 +295,8 @@ def __init__( image=f"{self.image_name}:{self.image_tag}", ports=self.ports, detach=True, - volumes=[f"{self.mount_source}:{self.mount_target}"], + volumes=volumes, + command=server_command, ) except docker.errors.DockerException: self.host_port = port if port else random.randint(6000, 7000) @@ -290,12 +305,14 @@ def __init__( image=f"{self.image_name}:{self.image_tag}", ports=self.ports, detach=True, - volumes=[f"{self.mount_source}:{self.mount_target}"], + volumes=volumes, + command=server_command, ) import ansys.tools.filetransfer as ft self.client = ft.Client.from_transport_options( - transport_options=ft.InsecureOptions( + transport_options=ft.MTLSOptions( + certs_dir=certs_dir, host="localhost", port=self.host_port, allow_remote_host=True, @@ -411,6 +428,7 @@ def __init__( self, server_ip: str | None = None, server_port: int | None = None, + certs_dir: str | None = None, ): """Provides the gRPC-based remote file transfer strategy. @@ -420,6 +438,8 @@ def __init__( IP address of the server. server_port : int Port of the server. + certs_dir : str, optional + Directory containing the TLS certificates. The default is ``None``. """ import ansys.tools.filetransfer as ft @@ -427,8 +447,9 @@ def __init__( self.server_port = server_port self._client = ft.Client.from_transport_options( - transport_options=ft.InsecureOptions( - host=self.server_ip, + transport_options=ft.MTLSOptions( + certs_dir=certs_dir, + host=self.server_ip if self.server_ip else "localhost", port=self.server_port, allow_remote_host=True, ) diff --git a/tests/conftest.py b/tests/conftest.py index bd9d071c3c8e..9c5157377ffc 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -41,6 +41,36 @@ sys.path.append(Path(__file__).parent / "util") +# ============================================================================ +# Test Skip Reasons - Centralized for consistency and searchability +# ============================================================================ +# Based on our understanding of the failure, tests are categorized into 3 groups: +# +# 1. Root cause completely unknown +# - Test behavior is unexplained; needs investigation from scratch +# - Examples: "Fails on CI", "Failing in GitHub" (with no further context) +# +# 2. Partially understood but unresolved +# - Some investigation done but root cause not fully identified +# - Active investigation may be ongoing +# - Example: "Wait for later implementation" +# +# 3. Root cause understood but test cannot be enabled due to an external blocker +# - e.g., upstream bug, CI/environment limitation, product constraint +# - An issue link may be present for tracking, but this does NOT imply active investigation +# - The blocker is known; we're waiting on external factors to resolve +# - Examples: "Currently only tested in backend", GitHub issue links, "Cannot read generated Python journals" +# ============================================================================ + +# 1. Root cause completely unknown +SKIP_UNKNOWN = "Skipped (root cause completely unknown)" + +# 2. Partially understood but unresolved +SKIP_INVESTIGATING = "Skipped (partially understood but unresolved)" + +# 3. Understood but blocked for other reasons +SKIP_BLOCKED = "Skipped (root cause understood but test cannot be enabled due to an external blocker)" + def pytest_addoption(parser): parser.addoption( diff --git a/tests/parametric/test_parametric_workflow.py b/tests/parametric/test_parametric_workflow.py index f054ae578d32..75da591f9846 100644 --- a/tests/parametric/test_parametric_workflow.py +++ b/tests/parametric/test_parametric_workflow.py @@ -23,6 +23,7 @@ from pathlib import Path, PurePosixPath import tempfile +from conftest import SKIP_INVESTIGATING import pytest from test_utils import pytest_approx @@ -32,7 +33,8 @@ from ansys.fluent.core.utils.fluent_version import FluentVersion -@pytest.mark.skip(reason="https://github.com/ansys/pyfluent/issues/3855") +@pytest.mark.skip(reason=SKIP_INVESTIGATING) +# https://github.com/ansys/pyfluent/issues/3855 @pytest.mark.nightly @pytest.mark.fluent_version("latest") def test_parametric_workflow(): diff --git a/tests/test_aero_session.py b/tests/test_aero_session.py index 12af8c243851..64194d329225 100644 --- a/tests/test_aero_session.py +++ b/tests/test_aero_session.py @@ -24,6 +24,7 @@ from pathlib import Path import shutil +from conftest import SKIP_BLOCKED import pytest import ansys.fluent.core as pyfluent @@ -40,7 +41,8 @@ def test_icing_session(): assert "aero" in dir(aero_session) -@pytest.mark.skip("Run this locally only as of now.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Run this locally only as of now. @pytest.mark.fluent_version(">=24.2") def test_sample_setup(): mesh_filepath = examples.download_file( diff --git a/tests/test_datamodel_api.py b/tests/test_datamodel_api.py index 5a86da9e0c9d..5ad58d704b1a 100644 --- a/tests/test_datamodel_api.py +++ b/tests/test_datamodel_api.py @@ -22,6 +22,7 @@ import time +from conftest import SKIP_INVESTIGATING import pytest from util import create_datamodel_root_in_server @@ -203,7 +204,8 @@ def cb(): assert called == 1 -@pytest.mark.skip(reason="https://github.com/ansys/pyfluent/issues/4298") +@pytest.mark.skip(reason=SKIP_INVESTIGATING) +# https://github.com/ansys/pyfluent/issues/4298 @pytest.mark.fluent_version(">=25.2") def test_datamodel_api_on_deleted( datamodel_api_version_all, request, new_solver_session @@ -276,7 +278,8 @@ def cb(val): assert value == "xyz" -@pytest.mark.skip(reason="https://github.com/ansys/pyfluent/issues/4298") +@pytest.mark.skip(reason=SKIP_INVESTIGATING) +# https://github.com/ansys/pyfluent/issues/4298 @pytest.mark.fluent_version(">=25.2") def test_datamodel_api_on_command_attribute_changed( datamodel_api_version_all, request, new_solver_session @@ -382,7 +385,8 @@ def test_datamodel_api_update_dict(datamodel_api_version_all, new_solver_session assert service.get_state(app_name, "/G/H") == {"X": "abc"} -@pytest.mark.skip(reason="https://github.com/ansys/pyfluent/issues/4298") +@pytest.mark.skip(reason=SKIP_INVESTIGATING) +# https://github.com/ansys/pyfluent/issues/4298 @pytest.mark.fluent_version(">=25.2") def test_datamodel_api_on_bad_input( datamodel_api_version_all, request, new_solver_session diff --git a/tests/test_datamodel_service.py b/tests/test_datamodel_service.py index 1066c6955ce5..e136716c39bb 100644 --- a/tests/test_datamodel_service.py +++ b/tests/test_datamodel_service.py @@ -23,6 +23,7 @@ import gc from time import sleep +from conftest import SKIP_INVESTIGATING from google.protobuf.json_format import MessageToDict import pytest from util import create_datamodel_root_in_server, create_root_using_datamodelgen @@ -289,7 +290,8 @@ def test_add_on_command_executed(new_meshing_session): assert data == [] -@pytest.mark.skip("https://github.com/ansys/pyfluent/issues/2999") +@pytest.mark.skip(reason=SKIP_INVESTIGATING) +# https://github.com/ansys/pyfluent/issues/2999 @pytest.mark.fluent_version(">=23.2") @pytest.mark.codegen_required def test_datamodel_streaming_full_diff_state( diff --git a/tests/test_field_data.py b/tests/test_field_data.py index cff35d2481b3..9629303606bb 100644 --- a/tests/test_field_data.py +++ b/tests/test_field_data.py @@ -20,6 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +from conftest import SKIP_INVESTIGATING import numpy as np import pytest from test_utils import pytest_approx @@ -717,7 +718,8 @@ def test_field_data_errors(new_solver_session) -> None: ) -@pytest.mark.skip("https://github.com/ansys/pyfluent/issues/2404") +@pytest.mark.skip(reason=SKIP_INVESTIGATING) +# https://github.com/ansys/pyfluent/issues/2404 @pytest.mark.fluent_version(">=24.2") def test_field_data_does_not_modify_case(new_solver_session): solver = new_solver_session diff --git a/tests/test_file_transfer_service.py b/tests/test_file_transfer_service.py index c1e4a7e5b38d..ea84c1b41fa4 100644 --- a/tests/test_file_transfer_service.py +++ b/tests/test_file_transfer_service.py @@ -25,17 +25,22 @@ import os from pathlib import Path +from conftest import SKIP_BLOCKED, SKIP_UNKNOWN import pytest from ansys.fluent.core import examples -from ansys.fluent.core.docker.utils import get_grpc_launcher_args_for_gh_runs from ansys.fluent.core.utils.file_transfer_service import ( ContainerFileTransferStrategy, StandaloneFileTransferStrategy, ) -@pytest.mark.skip(reason="https://github.com/ansys/pyfluent/issues/4649") +def _get_certs_folder(): + return os.path.join(os.getcwd(), "certs") + + +@pytest.mark.skip(reason=SKIP_UNKNOWN) +# Root cause is unknown - works fine locally and on Test Custom Run workflow, fails on CI. @pytest.mark.codegen_required @pytest.mark.fluent_version(">=24.2") def test_remote_grpc_fts_container(): @@ -53,14 +58,16 @@ def test_remote_grpc_fts_container(): if not source_path.exists(): source_path.mkdir(parents=True, exist_ok=True) - file_transfer_service = ContainerFileTransferStrategy(mount_source=str(source_path)) + file_transfer_service = ContainerFileTransferStrategy( + mount_source=str(source_path), certs_dir=_get_certs_folder() + ) container_dict = {"mount_source": file_transfer_service.mount_source} - grpc_kwds = get_grpc_launcher_args_for_gh_runs() session = pyfluent.launch_fluent( file_transfer_service=file_transfer_service, container_dict=container_dict, - **grpc_kwds, + certificates_folder=_get_certs_folder(), + insecure_mode=False, ) session.file.read_case(file_name=case_file) @@ -109,7 +116,8 @@ def test_read_case_and_data(monkeypatch): solver.exit() -@pytest.mark.skip(reason="Skips upload even after adding ImportGeometry task object.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Skips upload even after adding ImportGeometry task object. def test_datamodel_execute(): import ansys.fluent.core as pyfluent diff --git a/tests/test_flobject.py b/tests/test_flobject.py index cc7b7a1bec0b..7ecd13adf131 100644 --- a/tests/test_flobject.py +++ b/tests/test_flobject.py @@ -26,6 +26,7 @@ import io import weakref +from conftest import SKIP_INVESTIGATING import pytest from test_utils import MockTracingInterceptor, count_key_recursive @@ -892,7 +893,8 @@ def test_settings_api_names_exception(new_solver_session): solver.setup.boundary_conditions["cold-inlet"].name = "hot-inlet" -@pytest.mark.skip(reason="https://github.com/ansys/pyfluent/issues/4645") +@pytest.mark.skip(reason=SKIP_INVESTIGATING) +# https://github.com/ansys/pyfluent/issues/4645 @pytest.mark.fluent_version(">=24.2") def test_accessor_methods_on_settings_objects(new_solver_session): solver = new_solver_session diff --git a/tests/test_launcher.py b/tests/test_launcher.py index 93487263df62..d6b7c73f11fb 100644 --- a/tests/test_launcher.py +++ b/tests/test_launcher.py @@ -438,18 +438,17 @@ def test_fluent_launchers(): assert pim_meshing_session pim_meshing_session.exit() - pim_solver_launcher = create_launcher( - LaunchMode.PIM, mode=FluentMode.SOLVER, **kwargs - ) + pim_solver_launcher = create_launcher(LaunchMode.PIM, **kwargs, dimension=2) pim_solver_session = pim_solver_launcher() assert pim_solver_session pim_solver_session.exit() - pim_meshing_launcher = create_launcher( - LaunchMode.PIM, mode=FluentMode.MESHING, **kwargs, dimension=2, dry_run=True + two_d_pim_meshing_launcher = create_launcher( + LaunchMode.PIM, mode=FluentMode.MESHING, **kwargs, dimension=2 ) - args = pim_meshing_launcher() - assert args[0] == "fluent-2ddp" + two_d_pim_meshing_session = two_d_pim_meshing_launcher() + assert two_d_pim_meshing_session.dimension == pyfluent.Dimension.TWO + two_d_pim_meshing_session.exit() @pytest.mark.parametrize( diff --git a/tests/test_launcher_remote.py b/tests/test_launcher_remote.py index 9413ef283927..3f8c69ec4ed3 100644 --- a/tests/test_launcher_remote.py +++ b/tests/test_launcher_remote.py @@ -30,6 +30,7 @@ from unittest.mock import create_autospec import uuid +from conftest import SKIP_INVESTIGATING import grpc from grpc_health.v1 import health_pb2_grpc import pytest @@ -53,7 +54,8 @@ import ansys.platform.instancemanagement as pypim -@pytest.mark.skip("https://github.com/ansys/pyfluent/issues/4055") +@pytest.mark.skip(reason=SKIP_INVESTIGATING) +# https://github.com/ansys/pyfluent/issues/4055 def test_launch_remote_instance(monkeypatch, new_solver_session): monkeypatch.setattr(pyfluent.config, "check_health", False) fluent = new_solver_session diff --git a/tests/test_mapped_api.py b/tests/test_mapped_api.py index 893d987e2cf1..82bf9dec36ab 100644 --- a/tests/test_mapped_api.py +++ b/tests/test_mapped_api.py @@ -22,6 +22,7 @@ import time +from conftest import SKIP_BLOCKED import pytest from util import create_datamodel_root_in_server @@ -95,7 +96,8 @@ def get_error_state_message_from_remote_app(session, app_name, type_path): ) -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_datamodel_api_bool_for_str_has_correct_type( datamodel_api_version_new, new_solver_session @@ -114,7 +116,8 @@ def test_datamodel_api_bool_for_str_has_correct_type( assert arg0["type"] == "Logical" -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_datamodel_api_set_bool_for_str(datamodel_api_version_new, new_solver_session): solver = new_solver_session @@ -126,7 +129,8 @@ def test_datamodel_api_set_bool_for_str(datamodel_api_version_new, new_solver_se assert get_state_from_remote_app(solver, app_name, "/A/X") == "yes" -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_datamodel_api_set_bool_nested_for_str( datamodel_api_version_new, new_solver_session @@ -140,7 +144,8 @@ def test_datamodel_api_set_bool_nested_for_str( assert get_error_state_message_from_remote_app(solver, app_name, "/A/X") is None -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_datamodel_api_get_set_bool_for_str_with_flexible_strs_no_errors( datamodel_api_version_new, new_solver_session @@ -154,7 +159,8 @@ def test_datamodel_api_get_set_bool_for_str_with_flexible_strs_no_errors( assert get_error_state_message_from_remote_app(solver, app_name, "/A/X") is None -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_datamodel_api_get_attrs_bool_for_str( datamodel_api_version_new, new_solver_session @@ -167,7 +173,8 @@ def test_datamodel_api_get_attrs_bool_for_str( assert service.get_attribute_value(app_name, "/A/X", "allowedValues") is None -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_datamodel_api_get_and_set_int_for_str( datamodel_api_version_new, new_solver_session @@ -189,7 +196,8 @@ def test_datamodel_api_get_and_set_int_for_str( # testUpdateStateDictWithMapping -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_state_of_command_args_with_mapping( datamodel_api_version_new, new_solver_session @@ -214,7 +222,8 @@ def register_external_function_in_remote_app(session, app_name, func_name): ) -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_execute_command_with_args_mapping( datamodel_api_version_new, new_solver_session @@ -228,7 +237,8 @@ def test_execute_command_with_args_mapping( assert result == "yes" -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_execute_command_with_args_and_path_mapping( datamodel_api_version_new, new_solver_session @@ -242,7 +252,8 @@ def test_execute_command_with_args_and_path_mapping( assert result == "yes" -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_execute_query_with_args_mapping(datamodel_api_version_new, new_solver_session): rules_str = ( @@ -269,7 +280,8 @@ def test_execute_query_with_args_mapping(datamodel_api_version_new, new_solver_s assert result == "yes" -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_get_mapped_attr(datamodel_api_version_new, new_solver_session): solver = new_solver_session @@ -283,7 +295,8 @@ def test_get_mapped_attr(datamodel_api_version_new, new_solver_session): assert service.get_attribute_value(app_name, "/A/Y", "default") == 2 -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_get_mapped_attr_defaults(datamodel_api_version_new, new_solver_session): rules_str = ( @@ -318,7 +331,8 @@ def test_get_mapped_attr_defaults(datamodel_api_version_new, new_solver_session) assert service.get_attribute_value(app_name, "/A/Z", "default") == 42 -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_get_mapped_enum_attr(datamodel_api_version_new, new_solver_session): rules_str = ( @@ -347,7 +361,8 @@ def test_get_mapped_enum_attr(datamodel_api_version_new, new_solver_session): assert service.get_attribute_value(app_name, "/A/X", "default") == "yellow" -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_get_mapped_dynamic_enum_attr(datamodel_api_version_new, new_solver_session): rules_str = ( @@ -379,7 +394,8 @@ def test_get_mapped_dynamic_enum_attr(datamodel_api_version_new, new_solver_sess assert service.get_attribute_value(app_name, "/A/X", "default") == "yellow" -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_get_mapped_command_attr(datamodel_api_version_new, new_solver_session): rules_str = ( @@ -423,7 +439,8 @@ def test_get_mapped_command_attr(datamodel_api_version_new, new_solver_session): assert service.get_attribute_value(app_name, f"/C:{c_name}/Z", "default") == 42 -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_on_changed_is_mapped(datamodel_api_version_new, new_solver_session): solver = new_solver_session @@ -481,7 +498,8 @@ def on_changed_obj(value): assert state_obj == {"X": False, "Y": 2, "Z": None} -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_mapped_on_attribute_changed(datamodel_api_version_new, new_solver_session): rules_str = ( @@ -540,7 +558,8 @@ def cb(val): assert value is True -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_datamodel_api_on_command_executed_mapped_args( datamodel_api_version_new, new_solver_session @@ -629,7 +648,8 @@ def cb(cmd, args): ) -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_datamodel_api_with_mapped_names(datamodel_api_version_new, new_solver_session): solver = new_solver_session @@ -669,7 +689,8 @@ def test_datamodel_api_with_mapped_names(datamodel_api_version_new, new_solver_s # testMapperMapDMValueToAPI -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_datamodel_api_root_get_and_set_state_with_mapped_names( datamodel_api_version_new, new_solver_session @@ -685,7 +706,8 @@ def test_datamodel_api_root_get_and_set_state_with_mapped_names( assert service.get_state(app_name, "/") == {"aaa": {"xxx": False}} -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_datamodel_api_root_get_attrs_with_mapped_names( datamodel_api_version_new, new_solver_session @@ -699,7 +721,8 @@ def test_datamodel_api_root_get_attrs_with_mapped_names( assert service.get_attribute_value(app_name, "/B:b/yyy", "default") == 2 -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_datamodel_api_cmd_args_op_with_mapped_names( datamodel_api_version_new, new_solver_session @@ -717,7 +740,8 @@ def test_datamodel_api_cmd_args_op_with_mapped_names( assert service.get_attribute_value(app_name, f"/C__:{c_name}", "xxx/attr1") == 42.0 -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_datamodel_api_rename_with_mapped_names( datamodel_api_version_new, new_solver_session @@ -734,7 +758,8 @@ def test_datamodel_api_rename_with_mapped_names( assert service.get_state(app_name, "/eee:x/yyy") == 2 -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_datamodel_api_delete_object_with_mapped_names( datamodel_api_version_new, new_solver_session @@ -747,7 +772,8 @@ def test_datamodel_api_delete_object_with_mapped_names( service.delete_object(app_name, "/B:b") -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_datamodel_api_on_created_on_changed_on_deleted_with_mapped_names( datamodel_api_version_new, new_solver_session @@ -785,7 +811,8 @@ def changed_cb(value): assert changes == [42] -@pytest.mark.skip("Currently only tested in backend.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Currently only tested in backend. @pytest.mark.fluent_version(">=25.2") def test_datamodel_api_on_changed_with_mapped_names( datamodel_api_version_new, new_solver_session diff --git a/tests/test_meshing_workflow.py b/tests/test_meshing_workflow.py index 7e04b405c9af..0374d223dc8f 100644 --- a/tests/test_meshing_workflow.py +++ b/tests/test_meshing_workflow.py @@ -22,6 +22,7 @@ from functools import partial +from conftest import SKIP_INVESTIGATING import pytest from util.meshing_workflow import ( assign_task_arguments, @@ -204,7 +205,8 @@ def test_meshing_workflow_raises_exception_on_invalid_key_in_task_args_2( """ -@pytest.mark.skip("Wait for later implementation.") +@pytest.mark.skip(reason=SKIP_INVESTIGATING) +# Wait for later implementation. @pytest.mark.fluent_version(">=23.1") @pytest.mark.codegen_required def test_read_only_behaviour_of_command_arguments(new_meshing_session): diff --git a/tests/test_new_meshing_workflow.py b/tests/test_new_meshing_workflow.py index eded8880ce9c..40b214d011bf 100644 --- a/tests/test_new_meshing_workflow.py +++ b/tests/test_new_meshing_workflow.py @@ -23,6 +23,7 @@ import time from typing import Iterable +from conftest import SKIP_INVESTIGATING, SKIP_UNKNOWN import pytest from ansys.fluent.core import FluentVersion, examples @@ -1305,7 +1306,8 @@ def test_loaded_workflow(new_meshing_session): # assert loaded_workflow.import_boi_geometry_1.arguments() -@pytest.mark.skip("https://github.com/ansys/pyfluent/issues/3065") +@pytest.mark.skip(reason=SKIP_INVESTIGATING) +# https://github.com/ansys/pyfluent/issues/3065 @pytest.mark.codegen_required @pytest.mark.fluent_version(">=24.1") def test_created_workflow(new_meshing_session): @@ -1598,7 +1600,8 @@ def test_scenario_with_common_python_names_from_fdl(new_meshing_session): assert len(two_dimensional.task_names()) == len(set(two_dimensional.task_names())) -@pytest.mark.skip("Failing in GitHub") +@pytest.mark.skip(reason=SKIP_UNKNOWN) +# Failing in GitHub @pytest.mark.codegen_required @pytest.mark.fluent_version(">=25.1") def test_return_state_changes(new_meshing_session): diff --git a/tests/test_pre_post_session.py b/tests/test_pre_post_session.py index ca655362db0c..7c836da736d9 100644 --- a/tests/test_pre_post_session.py +++ b/tests/test_pre_post_session.py @@ -20,6 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +from conftest import SKIP_UNKNOWN import pytest import ansys.fluent.core as pyfluent @@ -27,7 +28,8 @@ from ansys.fluent.core.solver.flobject import InactiveObjectError -@pytest.mark.skip(reason="This test works fine locally but fails on CI") +@pytest.mark.skip(reason=SKIP_UNKNOWN) +# This test works fine locally but fails on CI @pytest.mark.fluent_version(">=23.1") def test_pre_post_session(): file_name = examples.download_file("mixing_elbow.cas.h5", "pyfluent/mixing_elbow") diff --git a/tests/test_server_meshing_workflow.py b/tests/test_server_meshing_workflow.py index d9bf33420ce8..13ce484b22c4 100644 --- a/tests/test_server_meshing_workflow.py +++ b/tests/test_server_meshing_workflow.py @@ -20,6 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +from conftest import SKIP_UNKNOWN import pytest from ansys.fluent.core import FluentVersion, PyFluentUserWarning, examples @@ -1946,7 +1947,8 @@ def test_accessors_for_argument_sub_items(new_meshing_session): assert import_geom.length_unit.min() -@pytest.mark.skip("Failing in Github randomly.") +@pytest.mark.skip(reason=SKIP_UNKNOWN) +# Failing in Github randomly. @pytest.mark.codegen_required @pytest.mark.fluent_version(">=26.1") def test_return_state_changes(new_meshing_session): diff --git a/tests/test_settings_api.py b/tests/test_settings_api.py index 3967e31dbf5d..4e3940e2e3f2 100644 --- a/tests/test_settings_api.py +++ b/tests/test_settings_api.py @@ -22,6 +22,7 @@ import warnings +from conftest import SKIP_INVESTIGATING import pytest from pytest import WarningsRecorder @@ -633,7 +634,8 @@ def test_deprecated_command_arguments(mixing_elbow_case_data_session): } -@pytest.mark.skip(reason="https://github.com/ansys/pyfluent/issues/4298") +@pytest.mark.skip(reason=SKIP_INVESTIGATING) +# https://github.com/ansys/pyfluent/issues/4298 @pytest.mark.fluent_version(">=25.2") def test_return_types_of_operations_on_named_objects(mixing_elbow_settings_session): solver = mixing_elbow_settings_session diff --git a/tests/test_topy.py b/tests/test_topy.py index 7ae81b03bb09..68985bd48013 100644 --- a/tests/test_topy.py +++ b/tests/test_topy.py @@ -24,12 +24,14 @@ from pathlib import Path import time +from conftest import SKIP_BLOCKED import pytest import ansys.fluent.core as pyfluent -@pytest.mark.skip(reason="Unable to read generated python journal from fluent.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Unable to read generated python journal from fluent. def test_single_jou(): file_name = os.path.join(pyfluent.config.examples_path, "jou1.jou") @@ -63,7 +65,8 @@ def test_single_jou(): break -@pytest.mark.skip(reason="Unable to read generated python journal from fluent.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Unable to read generated python journal from fluent. def test_single_scm(): file_name = os.path.join(pyfluent.config.examples_path, "jou1.scm") @@ -97,7 +100,8 @@ def test_single_scm(): break -@pytest.mark.skip(reason="Unable to read generated python journal from fluent.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Unable to read generated python journal from fluent. def test_2_jou(): file_name_1 = os.path.join(pyfluent.config.examples_path, "jou1.jou") file_name_2 = os.path.join(pyfluent.config.examples_path, "jou2.jou") @@ -149,7 +153,8 @@ def test_2_jou(): break -@pytest.mark.skip(reason="Unable to read generated python journal from fluent.") +@pytest.mark.skip(reason=SKIP_BLOCKED) +# Unable to read generated python journal from fluent. def test_2_scm(): file_name_1 = os.path.join(pyfluent.config.examples_path, "jou1.scm") file_name_2 = os.path.join(pyfluent.config.examples_path, "jou2.scm") diff --git a/tests/test_tui_api.py b/tests/test_tui_api.py index 3dc8fa96276f..32397fd5a135 100644 --- a/tests/test_tui_api.py +++ b/tests/test_tui_api.py @@ -22,6 +22,7 @@ import os +from conftest import SKIP_UNKNOWN import pytest from ansys.fluent.core import FluentVersion @@ -29,7 +30,8 @@ from ansys.fluent.core.services.datamodel_tui import TUIMenu -@pytest.mark.skip("Failing in github") +@pytest.mark.skip(reason=SKIP_UNKNOWN) +# Failing in github def test_report_system_proc_stats_tui(new_solver_session, capsys) -> None: new_solver_session.tui.report.system.sys_stats() captured = capsys.readouterr() @@ -52,7 +54,8 @@ def test_python_keyword_menu_name(new_meshing_session): meshing.tui.file.import_.cad_options.create_cad_assemblies("yes") -@pytest.mark.skip("Failing in github") +@pytest.mark.skip(reason=SKIP_UNKNOWN) +# Failing in github def test_api_upgrade_message(new_solver_session): solver = new_solver_session case_name = download_file(