Skip to content

Commit a3cf025

Browse files
fix: Update module paths
1 parent 28d263f commit a3cf025

File tree

6 files changed

+25
-25
lines changed

6 files changed

+25
-25
lines changed

doc/source/user_guide/ansys_downloader.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Ansys example downloader
66
You can use any of the functions available in the
77
to identify the path of the local Ansys installation.
88

9-
For example you can use :func:`find_ansys <ansys.tools.path.find_ansys>`
9+
For example you can use :func:`find_ansys <ansys.tools.common.path.find_ansys>`
1010
to locate the path of the latest Ansys installation available:
1111

1212
.. code:: pycon

doc/source/user_guide/ansys_tools_path.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ How to use
1111
You can use any of the functions available in the
1212
to identify the path of the local Ansys installation.
1313

14-
For example you can use :func:`find_ansys <ansys.tools.path.find_ansys>`
14+
For example you can use :func:`find_ansys <ansys.tools.common.path.find_ansys>`
1515
to locate the path of the latest Ansys installation available:
1616

1717
.. code:: pycon
1818
19-
>>> from ansys.tools.path import find_ansys
19+
>>> from ansys.tools.common.path import find_ansys
2020
>>> find_ansys()
2121
'C:/Program Files/ANSYS Inc/v211/ANSYS/bin/winx64/ansys211.exe', 21.1

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ doc = [
6060
]
6161

6262
[project.scripts]
63-
save-ansys-path = "ansys.tools.path.save:cli"
63+
save-ansys-path = "ansys.tools.common.path.save:cli"
6464

6565
[project.urls]
6666
Source = "https://github.com/ansys/ansys-tools-common"

src/ansys/tools/common/path/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
WARNING: This is not concurrent-safe (multiple python processes might race on this data.)
2727
"""
2828

29-
from ansys.tools.path.path import (
29+
from ansys.tools.common.path.path import (
3030
LOG,
3131
SETTINGS_DIR,
3232
SUPPORTED_ANSYS_VERSIONS,

src/ansys/tools/common/path/path.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
import platformdirs
3434

35-
from ansys.tools.path.applications import ApplicationPlugin, dyna, mapdl, mechanical
35+
from ansys.tools.common.path.applications import ApplicationPlugin, dyna, mapdl, mechanical
3636

3737
PLUGINS: Dict[str, ApplicationPlugin] = {"mechanical": mechanical, "dyna": dyna, "mapdl": mapdl}
3838

@@ -305,7 +305,7 @@ def get_available_ansys_installations(
305305
306306
Examples
307307
--------
308-
>>> from ansys.tools.path import get_available_ansys_installations
308+
>>> from ansys.tools.common.path import get_available_ansys_installations
309309
>>> get_available_ansys_installations()
310310
{251: 'C:\\Program Files\\ANSYS Inc\\v251',
311311
242: 'C:\\Program Files\\ANSYS Inc\\v242',
@@ -371,7 +371,7 @@ def find_mechanical(
371371
--------
372372
On Windows:
373373
374-
>>> from ansys.tools.path import find_mechanical
374+
>>> from ansys.tools.common.path import find_mechanical
375375
>>> find_mechanical()
376376
('C:/Program Files/ANSYS Inc/v251/aisol/bin/winx64/AnsysWBU.exe', 25.1)
377377
@@ -425,7 +425,7 @@ def find_mapdl(
425425
--------
426426
Within Windows
427427
428-
>>> from ansys.tools.path import find_mapdl
428+
>>> from ansys.tools.common.path import find_mapdl
429429
>>> find_mapdl()
430430
'C:/Program Files/ANSYS Inc/v251/ANSYS/bin/winx64/ansys251.exe', 25.1
431431
@@ -479,7 +479,7 @@ def find_dyna(
479479
--------
480480
Within Windows
481481
482-
>>> from ansys.tools.path import find_dyna
482+
>>> from ansys.tools.common.path import find_dyna
483483
>>> find_dyna()
484484
'C:/Program Files/ANSYS Inc/v251/ANSYS/bin/winx64/LSDYNA251.exe', 25.1
485485
@@ -659,7 +659,7 @@ def change_default_mapdl_path(exe_loc: str) -> None:
659659
--------
660660
Change default Ansys MAPDL location on Linux
661661
662-
>>> from ansys.tools.path import change_default_mapdl_path, get_mapdl_path
662+
>>> from ansys.tools.common.path import change_default_mapdl_path, get_mapdl_path
663663
>>> change_default_mapdl_path("/ansys_inc/v251/ansys/bin/ansys251")
664664
>>> get_mapdl_path()
665665
'/ansys_inc/v251/ansys/bin/ansys251'
@@ -686,7 +686,7 @@ def change_default_dyna_path(exe_loc: str) -> None:
686686
--------
687687
Change default Ansys LS-Dyna location on Linux
688688
689-
>>> from ansys.tools.path import change_default_dyna_path, get_dyna_path
689+
>>> from ansys.tools.common.path import change_default_dyna_path, get_dyna_path
690690
>>> change_default_dyna_path("/ansys_inc/v251/ansys/bin/lsdyna251")
691691
>>> get_dyna_path()
692692
'/ansys_inc/v251/ansys/bin/lsdyna251'
@@ -712,14 +712,14 @@ def change_default_mechanical_path(exe_loc: str) -> None:
712712
--------
713713
On Windows:
714714
715-
>>> from ansys.tools.path import change_default_mechanical_path, get_mechanical_path
715+
>>> from ansys.tools.common.path import change_default_mechanical_path, get_mechanical_path
716716
>>> change_default_mechanical_path("C:/Program Files/ANSYS Inc/v251/aisol/bin/win64/AnsysWBU.exe")
717717
>>> get_mechanical_path()
718718
'C:/Program Files/ANSYS Inc/v251/aisol/bin/win64/AnsysWBU.exe'
719719
720720
On Linux:
721721
722-
>>> from ansys.tools.path import change_default_mechanical_path, get_mechanical_path
722+
>>> from ansys.tools.common.path import change_default_mechanical_path, get_mechanical_path
723723
>>> change_default_mechanical_path("/ansys_inc/v251/aisol/.workbench")
724724
>>> get_mechanical_path()
725725
'/ansys_inc/v251/aisol/.workbench'
@@ -779,11 +779,11 @@ def save_mechanical_path(exe_loc: Optional[str] = None, allow_prompt: bool = Tru
779779
Notes
780780
-----
781781
The location of the configuration file ``config.txt`` can be found in
782-
``ansys.tools.path.SETTINGS_DIR``. For example:
782+
``ansys.tools.common.path.SETTINGS_DIR``. For example:
783783
784784
.. code:: pycon
785785
786-
>>> from ansys.tools.path import SETTINGS_DIR
786+
>>> from ansys.tools.common.path import SETTINGS_DIR
787787
>>> import os
788788
>>> print(os.path.join(SETTINGS_DIR, "config.txt"))
789789
C:/Users/[username]]/AppData/Local/Ansys/ansys_tools_path/config.txt
@@ -793,7 +793,7 @@ def save_mechanical_path(exe_loc: Optional[str] = None, allow_prompt: bool = Tru
793793
794794
.. code:: pycon
795795
796-
>>> from ansys.tools.path import save_mechanical_path
796+
>>> from ansys.tools.common.path import save_mechanical_path
797797
>>> save_mechanical_path("/new/path/to/executable")
798798
799799
"""
@@ -826,11 +826,11 @@ def save_dyna_path(exe_loc: Optional[str] = None, allow_prompt: bool = True) ->
826826
Notes
827827
-----
828828
The location of the configuration file ``config.txt`` can be found in
829-
``ansys.tools.path.SETTINGS_DIR``. For example:
829+
``ansys.tools.common.path.SETTINGS_DIR``. For example:
830830
831831
.. code:: pycon
832832
833-
>>> from ansys.tools.path import SETTINGS_DIR
833+
>>> from ansys.tools.common.path import SETTINGS_DIR
834834
>>> import os
835835
>>> print(os.path.join(SETTINGS_DIR, "config.txt"))
836836
C:/Users/[username]/AppData/Local/Ansys/ansys_tools_path/config.txt
@@ -840,7 +840,7 @@ def save_dyna_path(exe_loc: Optional[str] = None, allow_prompt: bool = True) ->
840840
You can change the default ``exe_loc`` either by modifying the mentioned
841841
``config.txt`` file or by executing:
842842
843-
>>> from ansys.tools.path import save_dyna_path
843+
>>> from ansys.tools.common.path import save_dyna_path
844844
>>> save_dyna_path("/new/path/to/executable")
845845
846846
"""
@@ -873,11 +873,11 @@ def save_mapdl_path(exe_loc: Optional[str] = None, allow_prompt: bool = True) ->
873873
Notes
874874
-----
875875
The location of the configuration file ``config.txt`` can be found in
876-
``ansys.tools.path.SETTINGS_DIR``. For example:
876+
``ansys.tools.common.path.SETTINGS_DIR``. For example:
877877
878878
.. code:: pycon
879879
880-
>>> from ansys.tools.path import SETTINGS_DIR
880+
>>> from ansys.tools.common.path import SETTINGS_DIR
881881
>>> import os
882882
>>> print(os.path.join(SETTINGS_DIR, "config.txt"))
883883
C:/Users/[username]/AppData/Local/Ansys/ansys_tools_path/config.txt
@@ -887,7 +887,7 @@ def save_mapdl_path(exe_loc: Optional[str] = None, allow_prompt: bool = True) ->
887887
You can change the default ``exe_loc`` either by modifying the mentioned
888888
``config.txt`` file or by executing:
889889
890-
>>> from ansys.tools.path import save_mapdl_path
890+
>>> from ansys.tools.common.path import save_mapdl_path
891891
>>> save_mapdl_path("/new/path/to/executable")
892892
893893
"""
@@ -951,7 +951,7 @@ def _prompt_path(product: PRODUCT_TYPE) -> str: # pragma: no cover
951951
print(
952952
"\nIf you experience problems with the input path you can overwrite the configuration\n"
953953
"file by typing:\n"
954-
f">>> from ansys.tools.path import save_{product}_path\n"
954+
f">>> from ansys.tools.common.path import save_{product}_path\n"
955955
f">>> save_{product}_path('/new/path/to/executable/')\n"
956956
)
957957
while True:

src/ansys/tools/common/path/save.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
import click
2626

27-
from ansys.tools.path.path import _save_path
27+
from ansys.tools.common.path.path import _save_path
2828

2929

3030
@click.command()

0 commit comments

Comments
 (0)