From e3a4e8492297a058890e1f26298b32ea58e5e402 Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Mon, 26 Aug 2024 13:11:13 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com> --- doc/source/user_guide/mapdl.rst | 2 +- src/ansys/mapdl/core/launcher.py | 8 ++++---- tests/test_launcher.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/source/user_guide/mapdl.rst b/doc/source/user_guide/mapdl.rst index c593158446..d6c279d38f 100644 --- a/doc/source/user_guide/mapdl.rst +++ b/doc/source/user_guide/mapdl.rst @@ -1168,7 +1168,7 @@ These are described in the following table: | | | +---------------------------------------+---------------------------------------------------------------------+ | :envvar:`PYMAPDL_ON_SLURM` | With this environment variable set to ``FALSE``, you can avoid | -| | PyMAPDL to detect that it is running on a SLURM HPC cluster. | +| | PyMAPDL from detecting that it is running on a SLURM HPC cluster. | +---------------------------------------+---------------------------------------------------------------------+ | :envvar:`PYMAPDL_MAX_MESSAGE_LENGTH` | Maximum gRPC message length. If your | | | connection terminates when running | diff --git a/src/ansys/mapdl/core/launcher.py b/src/ansys/mapdl/core/launcher.py index 8264f213c2..2aa1430e82 100644 --- a/src/ansys/mapdl/core/launcher.py +++ b/src/ansys/mapdl/core/launcher.py @@ -1455,7 +1455,7 @@ def launch_mapdl( # Unless the env var is false, it will be true. ON_SLURM = not (ON_SLURM.lower() == "false") - # Let's require the following env vars to exists to go into slurm mode. + # Let's require the following env vars to exist to go into slurm mode. ON_SLURM = ( ON_SLURM and bool(os.environ.get("SLURM_JOB_NAME", "")) @@ -1483,7 +1483,7 @@ def launch_mapdl( if remove_temp_files is not None: warnings.warn( - "The option ``remove_temp_files`` is being deprecated and it will be removed by PyMAPDL version 0.66.0.\n" + "The ``remove_temp_files`` option is being deprecated. It is to be removed in PyMAPDL version 0.66.0.\n" "Please use ``remove_temp_dir_on_exit`` instead.", DeprecationWarning, stacklevel=2, @@ -1779,7 +1779,7 @@ def launch_mapdl( else: if machine_cores < int(nproc): raise NotEnoughResources( - f"The machine has {machine_cores} cores and PyMAPDL is asking for {nproc} cores." + f"The machine has {machine_cores} cores. PyMAPDL is asking for {nproc} cores." ) start_parm.update( @@ -2274,7 +2274,7 @@ def get_value( except Exception as e: LOG.info( - f"The machines list could not be obtained.\nFollowing error happened:\n{str(e)}" + f"The machines list could not be obtained.\nThis error occurred:\n{str(e)}" ) return exec_file, jobname, nproc, ram, additional_switches diff --git a/tests/test_launcher.py b/tests/test_launcher.py index 99d33cf503..f497d9ca3e 100644 --- a/tests/test_launcher.py +++ b/tests/test_launcher.py @@ -643,7 +643,7 @@ def test_deprecate_verbose(): id="Testing NPROCS only", ), pytest.param( - # This test does not do probably a good memory mapping between + # This test probably does not do a good memory mapping between # MEM_PER_NODE and "ram" { "SLURM_NNODES": 4,