diff --git a/doc/changelog.d/4112.miscellaneous.md b/doc/changelog.d/4112.miscellaneous.md new file mode 100644 index 000000000000..3624dfc50835 --- /dev/null +++ b/doc/changelog.d/4112.miscellaneous.md @@ -0,0 +1 @@ +Rename meshing_rule_file_names [skip tests] \ No newline at end of file diff --git a/doc/source/user_guide/make_container_image.rst b/doc/source/user_guide/make_container_image.rst index 3640d715cc20..17ce4aecdca5 100644 --- a/doc/source/user_guide/make_container_image.rst +++ b/doc/source/user_guide/make_container_image.rst @@ -39,8 +39,8 @@ command line arguments and run this script to copy needed files from the Ansys i * These files indicate the files that are excluded during the copying: - * `excludeCEIList.txt `_ - * `excludeFluentList.txt `_ + * `excludeCEIList.txt `_ + * `excludeFluentList.txt `_ 1. Above excluded files are not needed to run typical Fluent workflows. diff --git a/docker/fluent_222/Dockerfile b/docker/fluent_222/Dockerfile index 2fa06d441e76..8244b6309bcf 100644 --- a/docker/fluent_222/Dockerfile +++ b/docker/fluent_222/Dockerfile @@ -22,19 +22,20 @@ LABEL org.opencontainers.image.documentation="https://fluent.docs.pyansys.com" # Install dependencies RUN apt-get -y update && apt-get -y install \ - csh \ - fontconfig \ - libxi-dev \ - libsm6 \ - libice-dev \ - libxrandr-dev \ - libxinerama-dev \ - libxcursor-dev \ - libglu1-mesa \ - libglvnd-dev && apt-get clean all + csh \ + fontconfig \ + libxi-dev \ + libsm6 \ + libice-dev \ + libxrandr-dev \ + libxinerama-dev \ + libxcursor-dev \ + libglu1-mesa \ + libglvnd-dev && apt-get clean all # Specify working directory -ENV WORKING_DIRECTORY=/home/$USERNAME/$WORKING_DIRECTORY +ARG WORK_DIR=fluent_work_dir +ENV WORKING_DIRECTORY=/home/$USERNAME/$WORK_DIR # Specify home directory ENV HOME=/home/$USERNAME diff --git a/docker/fluent_231/Dockerfile b/docker/fluent_231/Dockerfile index 3af72c2d974a..f9db2e594ec5 100644 --- a/docker/fluent_231/Dockerfile +++ b/docker/fluent_231/Dockerfile @@ -22,19 +22,20 @@ LABEL org.opencontainers.image.documentation="https://fluent.docs.pyansys.com" # Install dependencies RUN apt-get -y update && apt-get -y install \ - csh \ - fontconfig \ - libxi-dev \ - libsm6 \ - libice-dev \ - libxrandr-dev \ - libxinerama-dev \ - libxcursor-dev \ - libglu1-mesa \ - libglvnd-dev && apt-get clean all + csh \ + fontconfig \ + libxi-dev \ + libsm6 \ + libice-dev \ + libxrandr-dev \ + libxinerama-dev \ + libxcursor-dev \ + libglu1-mesa \ + libglvnd-dev && apt-get clean all # Specify working directory -ENV WORKING_DIRECTORY=/home/$USERNAME/$WORKING_DIRECTORY +ARG WORK_DIR=fluent_work_dir +ENV WORKING_DIRECTORY=/home/$USERNAME/$WORK_DIR # Specify home directory ENV HOME=/home/$USERNAME diff --git a/docker/fluent_232/Dockerfile b/docker/fluent_232/Dockerfile index 0f793fcc6873..086f8c01f5c4 100644 --- a/docker/fluent_232/Dockerfile +++ b/docker/fluent_232/Dockerfile @@ -22,19 +22,20 @@ LABEL org.opencontainers.image.documentation="https://fluent.docs.pyansys.com" # Install dependencies RUN apt-get -y update && apt-get -y install \ - csh \ - fontconfig \ - libxi-dev \ - libsm6 \ - libice-dev \ - libxrandr-dev \ - libxinerama-dev \ - libxcursor-dev \ - libglu1-mesa \ - libglvnd-dev && apt-get clean all + csh \ + fontconfig \ + libxi-dev \ + libsm6 \ + libice-dev \ + libxrandr-dev \ + libxinerama-dev \ + libxcursor-dev \ + libglu1-mesa \ + libglvnd-dev && apt-get clean all # Specify working directory -ENV WORKING_DIRECTORY=/home/$USERNAME/$WORKING_DIRECTORY +ARG WORK_DIR=fluent_work_dir +ENV WORKING_DIRECTORY=/home/$USERNAME/$WORK_DIR # Specify home directory ENV HOME=/home/$USERNAME diff --git a/docker/fluent_241/Dockerfile b/docker/fluent_241/Dockerfile index 84d2aeeaee31..481106984100 100644 --- a/docker/fluent_241/Dockerfile +++ b/docker/fluent_241/Dockerfile @@ -22,19 +22,20 @@ LABEL org.opencontainers.image.documentation="https://fluent.docs.pyansys.com" # Install dependencies RUN apt-get -y update && apt-get -y install \ - csh \ - fontconfig \ - libxi-dev \ - libsm6 \ - libice-dev \ - libxrandr-dev \ - libxinerama-dev \ - libxcursor-dev \ - libglu1-mesa \ - libglvnd-dev && apt-get clean all + csh \ + fontconfig \ + libxi-dev \ + libsm6 \ + libice-dev \ + libxrandr-dev \ + libxinerama-dev \ + libxcursor-dev \ + libglu1-mesa \ + libglvnd-dev && apt-get clean all # Specify working directory -ENV WORKING_DIRECTORY=/home/$USERNAME/$WORKING_DIRECTORY +ARG WORK_DIR=fluent_work_dir +ENV WORKING_DIRECTORY=/home/$USERNAME/$WORK_DIR # Specify home directory ENV HOME=/home/$USERNAME diff --git a/docker/fluent_242/Dockerfile b/docker/fluent_242/Dockerfile index f635194bb7a8..3d420d0f1ba8 100644 --- a/docker/fluent_242/Dockerfile +++ b/docker/fluent_242/Dockerfile @@ -22,19 +22,20 @@ LABEL org.opencontainers.image.documentation="https://fluent.docs.pyansys.com" # Install dependencies RUN apt-get -y update && apt-get -y install \ - csh \ - fontconfig \ - libxi-dev \ - libsm6 \ - libice-dev \ - libxrandr-dev \ - libxinerama-dev \ - libxcursor-dev \ - libglu1-mesa \ - libglvnd-dev && apt-get clean all + csh \ + fontconfig \ + libxi-dev \ + libsm6 \ + libice-dev \ + libxrandr-dev \ + libxinerama-dev \ + libxcursor-dev \ + libglu1-mesa \ + libglvnd-dev && apt-get clean all # Specify working directory -ENV WORKING_DIRECTORY=/home/$USERNAME/$WORKING_DIRECTORY +ARG WORK_DIR=fluent_work_dir +ENV WORKING_DIRECTORY=/home/$USERNAME/$WORK_DIR # Specify home directory ENV HOME=/home/$USERNAME diff --git a/docker/fluent_251/Dockerfile b/docker/fluent_251/Dockerfile index d6b3151327cd..d19ca11a9511 100644 --- a/docker/fluent_251/Dockerfile +++ b/docker/fluent_251/Dockerfile @@ -22,19 +22,20 @@ LABEL org.opencontainers.image.documentation="https://fluent.docs.pyansys.com" # Install dependencies RUN apt-get -y update && apt-get -y install \ - csh \ - fontconfig \ - libxi-dev \ - libsm6 \ - libice-dev \ - libxrandr-dev \ - libxinerama-dev \ - libxcursor-dev \ - libglu1-mesa \ - libglvnd-dev && apt-get clean all + csh \ + fontconfig \ + libxi-dev \ + libsm6 \ + libice-dev \ + libxrandr-dev \ + libxinerama-dev \ + libxcursor-dev \ + libglu1-mesa \ + libglvnd-dev && apt-get clean all # Specify working directory -ENV WORKING_DIRECTORY=/home/$USERNAME/$WORKING_DIRECTORY +ARG WORK_DIR=fluent_work_dir +ENV WORKING_DIRECTORY=/home/$USERNAME/$WORK_DIR # Specify home directory ENV HOME=/home/$USERNAME diff --git a/docker/fluent_252/Dockerfile b/docker/fluent_252/Dockerfile index 58e391bf01f3..00b7414affe8 100644 --- a/docker/fluent_252/Dockerfile +++ b/docker/fluent_252/Dockerfile @@ -22,19 +22,20 @@ LABEL org.opencontainers.image.documentation="https://fluent.docs.pyansys.com" # Install dependencies RUN apt-get -y update && apt-get -y install \ - csh \ - fontconfig \ - libxi-dev \ - libsm6 \ - libice-dev \ - libxrandr-dev \ - libxinerama-dev \ - libxcursor-dev \ - libglu1-mesa \ - libglvnd-dev && apt-get clean all + csh \ + fontconfig \ + libxi-dev \ + libsm6 \ + libice-dev \ + libxrandr-dev \ + libxinerama-dev \ + libxcursor-dev \ + libglu1-mesa \ + libglvnd-dev && apt-get clean all # Specify working directory -ENV WORKING_DIRECTORY=/home/$USERNAME/$WORKING_DIRECTORY +ARG WORK_DIR=fluent_work_dir +ENV WORKING_DIRECTORY=/home/$USERNAME/$WORK_DIR # Specify home directory ENV HOME=/home/$USERNAME diff --git a/docker/fluent_dev/Dockerfile b/docker/fluent_dev/Dockerfile index 5fc0f7072768..d83750449103 100644 --- a/docker/fluent_dev/Dockerfile +++ b/docker/fluent_dev/Dockerfile @@ -22,19 +22,20 @@ LABEL org.opencontainers.image.documentation="https://fluent.docs.pyansys.com" # Install dependencies RUN apt-get -y update && apt-get -y install \ - csh \ - fontconfig \ - libxi-dev \ - libsm6 \ - libice-dev \ - libxrandr-dev \ - libxinerama-dev \ - libxcursor-dev \ - libglu1-mesa \ - libglvnd-dev && apt-get clean all + csh \ + fontconfig \ + libxi-dev \ + libsm6 \ + libice-dev \ + libxrandr-dev \ + libxinerama-dev \ + libxcursor-dev \ + libglu1-mesa \ + libglvnd-dev && apt-get clean all # Specify working directory -ENV WORKING_DIRECTORY=/home/$USERNAME/$WORKING_DIRECTORY +ARG WORK_DIR=fluent_work_dir +ENV WORKING_DIRECTORY=/home/$USERNAME/$WORK_DIR # Specify home directory ENV HOME=/home/$USERNAME diff --git a/src/ansys/fluent/core/codegen/datamodelgen.py b/src/ansys/fluent/core/codegen/datamodelgen.py index aa787889e53a..43b16b4f28ed 100644 --- a/src/ansys/fluent/core/codegen/datamodelgen.py +++ b/src/ansys/fluent/core/codegen/datamodelgen.py @@ -179,7 +179,7 @@ def _build_command_query_docstring( return doc.getvalue() -meshing_rule_file_names = { +datamodel_file_name_map = { "workflow": "workflow", "meshing": "meshing", "PartManagement": "part_management", @@ -213,7 +213,7 @@ def __init__( datamodel_dir = (pyfluent.CODEGEN_OUTDIR / f"datamodel_{version}").resolve() datamodel_dir.mkdir(exist_ok=True) self.file_name = ( - datamodel_dir / f"{meshing_rule_file_names[rules_save_name]}.py" + datamodel_dir / f"{datamodel_file_name_map[rules_save_name]}.py" ).resolve() if rules == "MeshingUtilities": self.stub_file = (datamodel_dir / "meshing_utilities.pyi").resolve() diff --git a/src/ansys/fluent/core/launcher/launcher.py b/src/ansys/fluent/core/launcher/launcher.py index 1c601e16582c..fffe60cdab44 100644 --- a/src/ansys/fluent/core/launcher/launcher.py +++ b/src/ansys/fluent/core/launcher/launcher.py @@ -263,10 +263,11 @@ def launch_fluent( made by the user in the current Fluent solver session have been applied in the background Fluent solver session. This is all orchestrated by PyFluent and requires no special usage. This parameter is used only when ``case_file_name`` is provided. The default is ``False``. - mode : str, optional - Launch mode of Fluent to point to a specific session type. - The default value is ``None``. Options are ``"meshing"``, - ``"pure-meshing"`` and ``"solver"``. + mode : FluentMode or str or None, optional + Launch mode of Fluent to point to a specific session type. Can be a + ``FluentMode`` enum member or a string. The default value is ``None``. + Valid string options include ``"meshing"``, ``"pure-meshing"``, and + ``"solver"``. py : bool, optional If True, Fluent will run in Python mode. Default is None. gpu : bool or list, optional diff --git a/src/ansys/fluent/core/session_shared.py b/src/ansys/fluent/core/session_shared.py index 76dc92120fae..63885f28806b 100644 --- a/src/ansys/fluent/core/session_shared.py +++ b/src/ansys/fluent/core/session_shared.py @@ -63,9 +63,9 @@ def _make_tui_module(session, module_name): def _make_datamodel_module(session, module_name): try: from ansys.fluent.core import CODEGEN_OUTDIR - from ansys.fluent.core.codegen.datamodelgen import meshing_rule_file_names + from ansys.fluent.core.codegen.datamodelgen import datamodel_file_name_map - file_name = meshing_rule_file_names[module_name] + file_name = datamodel_file_name_map[module_name] module = pyfluent.utils.load_module( f"{module_name}_{session._version}", CODEGEN_OUTDIR / f"datamodel_{session._version}" / f"{file_name}.py", diff --git a/tests/test_codegen.py b/tests/test_codegen.py index 912f8e37bf7a..7618a9ae81fd 100644 --- a/tests/test_codegen.py +++ b/tests/test_codegen.py @@ -31,7 +31,7 @@ import ansys.fluent.core as pyfluent from ansys.fluent.core.codegen import StaticInfoType, allapigen -from ansys.fluent.core.codegen.datamodelgen import meshing_rule_file_names +from ansys.fluent.core.codegen.datamodelgen import datamodel_file_name_map from ansys.fluent.core.search import get_api_tree_file_name from ansys.fluent.core.utils.fluent_version import get_version_for_file_name @@ -388,12 +388,12 @@ def test_codegen_with_datamodel_static_info(monkeypatch, rules): datamodel_paths = list((codegen_outdir / f"datamodel_{version}").iterdir()) assert len(datamodel_paths) == 1 or 2 assert set(p.name for p in datamodel_paths) == { - f"{meshing_rule_file_names[rules]}.py" - } or {f"{meshing_rule_file_names[rules]}.pyi"} + f"{datamodel_file_name_map[rules]}.py" + } or {f"{datamodel_file_name_map[rules]}.pyi"} with open( codegen_outdir / f"datamodel_{version}" - / f"{meshing_rule_file_names[rules]}.py", + / f"{datamodel_file_name_map[rules]}.py", "r", ) as f: assert f.read().strip() == _expected_datamodel_api_output