Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

Commit 6fb7c2f

Browse files
AlejandroFernandezLucespre-commit-ci[bot]pyansys-ci-botRobPasMue
authored
chore: Deprecate library (#342)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: pyansys-ci-bot <[email protected]> Co-authored-by: Roberto Pastor Muela <[email protected]>
1 parent 8155f1c commit 6fb7c2f

File tree

16 files changed

+89
-1288
lines changed

16 files changed

+89
-1288
lines changed

.github/workflows/ci_cd.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,6 @@ jobs:
8585
run: |
8686
python -m pytest -vx --cov=${{ env.PACKAGE_NAMESPACE }} --cov-report=term --cov-report=xml:.cov/coverage.xml --cov-report=html:.cov/html
8787
88-
- name: Upload coverage reports to Codecov
89-
uses: codecov/codecov-action@v5
90-
with:
91-
files: .cov/coverage.xml
92-
9388
docs-style:
9489
name: Documentation style check
9590
runs-on: ubuntu-latest
@@ -108,7 +103,6 @@ jobs:
108103
uses: ansys/actions/doc-build@v10
109104
with:
110105
python-version: ${{ env.MAIN_PYTHON_VERSION }}
111-
dependencies: "build-essential zip pandoc texlive-latex-extra latexmk texlive-pstricks"
112106

113107
package:
114108
name: Package library

README.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
ansys-tools-path
2-
================
1+
[DEPRECATED] ansys-tools-path
2+
=============================
3+
This library is deprecated and will no longer be maintained. Please consider using alternatives. For more information check
4+
`this issue <https://github.com/ansys/ansys-tools-path/issues/341>`_.
5+
36

47
|pyansys| |python| |pypi| |GH-CI| |codecov| |MIT| |black|
58

doc/changelog.d/342.maintenance.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Deprecate library

doc/source/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@
7272
numpydoc_show_class_members = False
7373
numpydoc_xref_param_type = True
7474

75+
suppress_warnings = ["autoapi.python_import_resolution"]
76+
7577
# Consider enabling numpydoc validation. See:
7678
# https://numpydoc.readthedocs.io/en/latest/validation.html#
7779
numpydoc_validate = True

doc/source/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
=====================================================
1717
``ansys-tools-path``: A tool to locate Ansys products
1818
=====================================================
19+
.. warning::
20+
21+
This library is deprecated and will no longer be maintained. Please consider using alternatives.
22+
For more information, check the `deprecation issue <https://github.com/ansys/ansys-tools-path/issues/341>`_.
1923

2024
How to install
2125
==============

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ classifiers = [
2323
"Operating System :: OS Independent",
2424
]
2525
dependencies = [
26-
"platformdirs>=3.6.0",
27-
"click>=8.1.3", # for CLI interface
26+
"ansys-tools-common"
2827
]
2928

3029

src/ansys/tools/path/__init__.py

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

29+
import warnings
30+
31+
warnings.warn(
32+
"This library is deprecated and will no longer be maintained. "
33+
"Functionality from this library has been migrated to ``ansys-tools-common``. "
34+
"Please consider migrating to ``ansys-tools-common``. "
35+
"For more information check https://github.com/ansys/ansys-tools-path/issues/341",
36+
DeprecationWarning,
37+
)
2938
import importlib.metadata as importlib_metadata
3039

3140
__version__ = importlib_metadata.version(__name__.replace(".", "-"))
32-
33-
34-
from ansys.tools.path.path import (
41+
from ansys.tools.common.path.path import (
3542
LOG,
3643
SETTINGS_DIR,
3744
SUPPORTED_ANSYS_VERSIONS,
@@ -53,10 +60,10 @@
5360
save_mechanical_path,
5461
version_from_path,
5562
)
56-
from ansys.tools.path.path import change_default_ansys_path # deprecated
57-
from ansys.tools.path.path import find_ansys # deprecated
58-
from ansys.tools.path.path import get_ansys_path # deprecated
59-
from ansys.tools.path.path import save_ansys_path # deprecated
63+
from ansys.tools.common.path.path import change_default_ansys_path # deprecated
64+
from ansys.tools.common.path.path import find_ansys # deprecated
65+
from ansys.tools.common.path.path import get_ansys_path # deprecated
66+
from ansys.tools.common.path.path import save_ansys_path # deprecated
6067

6168
__all__ = [
6269
"LOG",

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,17 @@
2222

2323
"""
2424
Application plugin for ansys-tools-path.
25-
2625
This defines the interface of a plugin, which is implemented using a module.
2726
"""
2827

29-
# TODO - consider using pluggy?
28+
import warnings
3029

30+
from ansys.tools.common.path.applications import * # noqa
3131

32-
class ApplicationPlugin:
33-
def is_valid_executable_path(exe_loc: str) -> bool:
34-
raise Exception("This is just a base class.")
32+
warnings.warn(
33+
"This module is deprecated and will no longer be maintained. "
34+
"Functionality from this module has been migrated to ``ansys-tools-common``. "
35+
"Please consider migrating to ``ansys-tools-common``. "
36+
"For more information check https://github.com/ansys/ansys-tools-path/issues/341",
37+
DeprecationWarning,
38+
)

src/ansys/tools/path/applications/dyna.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@
2222

2323
"""dyna-specific logic for ansys-tools-path."""
2424

25+
import warnings
2526

26-
def is_valid_executable_path(exe_loc: str) -> bool:
27-
# dyna paths can be anything
28-
return True
27+
from ansys.tools.common.path.applications.dyna import * # noqa
28+
29+
warnings.warn(
30+
"This module is deprecated and will no longer be maintained. "
31+
"Functionality from this module has been migrated to ``ansys-tools-common``. "
32+
"Please consider migrating to ``ansys-tools-common``. "
33+
"For more information check https://github.com/ansys/ansys-tools-path/issues/341",
34+
DeprecationWarning,
35+
)

src/ansys/tools/path/applications/mapdl.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Copyright (C) 2023 - 2025 ANSYS, Inc. and/or its affiliates.
22
# SPDX-License-Identifier: MIT
33
#
4-
#
54
# Permission is hereby granted, free of charge, to any person obtaining a copy
65
# of this software and associated documentation files (the "Software"), to deal
76
# in the Software without restriction, including without limitation the rights
@@ -22,12 +21,14 @@
2221

2322
"""MAPDL-specific logic for ansys-tools-path."""
2423

25-
import os
26-
import re
24+
import warnings
2725

26+
from ansys.tools.common.path.applications.mapdl import * # noqa
2827

29-
def is_valid_executable_path(exe_loc: str) -> bool:
30-
return (
31-
os.path.isfile(exe_loc)
32-
and re.search(r"ansys\d\d\d", os.path.basename(os.path.normpath(exe_loc))) is not None
33-
)
28+
warnings.warn(
29+
"This module is deprecated and will no longer be maintained. "
30+
"Functionality from this module has been migrated to ``ansys-tools-common``. "
31+
"Please consider migrating to ``ansys-tools-common``. "
32+
"For more information check https://github.com/ansys/ansys-tools-path/issues/341",
33+
DeprecationWarning,
34+
)

0 commit comments

Comments
 (0)