Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
beacac9
maint: Deprecate library
AlejandroFernandezLuces Nov 4, 2025
fb6aca1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 4, 2025
c014791
chore: adding changelog file 342.maintenance.md [dependabot-skip]
pyansys-ci-bot Nov 4, 2025
b4ef999
ci: Skip unit tests
AlejandroFernandezLuces Nov 4, 2025
5b939dd
Merge branch 'maint/deprecation' of https://github.com/ansys/ansys-to…
AlejandroFernandezLuces Nov 4, 2025
57ff895
ci: Skip tests
AlejandroFernandezLuces Nov 4, 2025
db9d7e4
ci: Fix docs
AlejandroFernandezLuces Nov 4, 2025
1098fcb
fix: Add warn suppress
AlejandroFernandezLuces Nov 4, 2025
dde14b3
fix: Warning message
AlejandroFernandezLuces Nov 4, 2025
8822d96
fix: Removed unneeded test, warn message
AlejandroFernandezLuces Nov 4, 2025
fa8e47a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 4, 2025
85121dd
fix: pre-commit
AlejandroFernandezLuces Nov 4, 2025
a55d044
Merge branch 'maint/deprecation' of https://github.com/ansys/ansys-to…
AlejandroFernandezLuces Nov 4, 2025
887c02c
fix: ci
AlejandroFernandezLuces Nov 4, 2025
d928805
fix: Remove codecov
AlejandroFernandezLuces Nov 4, 2025
4ab816f
fix: revert files
AlejandroFernandezLuces Nov 5, 2025
8b71a22
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 5, 2025
9251ade
fix: pre-commit
AlejandroFernandezLuces Nov 5, 2025
37755b7
Apply suggestions from code review
AlejandroFernandezLuces Nov 5, 2025
9d5d71e
fix: Revert misc file
AlejandroFernandezLuces Nov 5, 2025
5d7cc55
Merge branch 'maint/deprecation' of https://github.com/ansys/ansys-to…
AlejandroFernandezLuces Nov 5, 2025
a6c755d
Apply suggestions from code review
AlejandroFernandezLuces Nov 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@ jobs:
run: |
python -m pytest -vx --cov=${{ env.PACKAGE_NAMESPACE }} --cov-report=term --cov-report=xml:.cov/coverage.xml --cov-report=html:.cov/html

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
files: .cov/coverage.xml

docs-style:
name: Documentation style check
runs-on: ubuntu-latest
Expand All @@ -108,7 +103,6 @@ jobs:
uses: ansys/actions/doc-build@v10
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
dependencies: "build-essential zip pandoc texlive-latex-extra latexmk texlive-pstricks"

package:
name: Package library
Expand Down
7 changes: 5 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
ansys-tools-path
================
[DEPRECATED] ansys-tools-path
=============================
This library is deprecated and will no longer be maintained. Please consider using alternatives. For more information check
`this issue <https://github.com/ansys/ansys-tools-path/issues/341>`_.


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

Expand Down
1 change: 1 addition & 0 deletions doc/changelog.d/342.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deprecate library
2 changes: 2 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@
numpydoc_show_class_members = False
numpydoc_xref_param_type = True

suppress_warnings = ["autoapi.python_import_resolution"]

# Consider enabling numpydoc validation. See:
# https://numpydoc.readthedocs.io/en/latest/validation.html#
numpydoc_validate = True
Expand Down
4 changes: 4 additions & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
=====================================================
``ansys-tools-path``: A tool to locate Ansys products
=====================================================
.. warning::

This library is deprecated and will no longer be maintained. Please consider using alternatives.

Check warning on line 21 in doc/source/index.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] doc/source/index.rst#L21

[Google.Will] Avoid using 'will'.
Raw output
{"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "doc/source/index.rst", "range": {"start": {"line": 21, "column": 35}}}, "severity": "WARNING"}
For more information, check the `deprecation issue <https://github.com/ansys/ansys-tools-path/issues/341>`_.

How to install
==============
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ classifiers = [
"Operating System :: OS Independent",
]
dependencies = [
"platformdirs>=3.6.0",
"click>=8.1.3", # for CLI interface
"ansys-tools-common"
]


Expand Down
21 changes: 14 additions & 7 deletions src/ansys/tools/path/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,19 @@
WARNING: This is not concurrent-safe (multiple python processes might race on this data.)
"""

import warnings

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

__version__ = importlib_metadata.version(__name__.replace(".", "-"))


from ansys.tools.path.path import (
from ansys.tools.common.path.path import (
LOG,
SETTINGS_DIR,
SUPPORTED_ANSYS_VERSIONS,
Expand All @@ -53,10 +60,10 @@
save_mechanical_path,
version_from_path,
)
from ansys.tools.path.path import change_default_ansys_path # deprecated
from ansys.tools.path.path import find_ansys # deprecated
from ansys.tools.path.path import get_ansys_path # deprecated
from ansys.tools.path.path import save_ansys_path # deprecated
from ansys.tools.common.path.path import change_default_ansys_path # deprecated
from ansys.tools.common.path.path import find_ansys # deprecated
from ansys.tools.common.path.path import get_ansys_path # deprecated
from ansys.tools.common.path.path import save_ansys_path # deprecated

__all__ = [
"LOG",
Expand Down
14 changes: 9 additions & 5 deletions src/ansys/tools/path/applications/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@

"""
Application plugin for ansys-tools-path.

This defines the interface of a plugin, which is implemented using a module.
"""

# TODO - consider using pluggy?
import warnings

from ansys.tools.common.path.applications import * # noqa

class ApplicationPlugin:
def is_valid_executable_path(exe_loc: str) -> bool:
raise Exception("This is just a base class.")
warnings.warn(
"This module is deprecated and will no longer be maintained. "
"Functionality from this module has been migrated to ``ansys-tools-common``. "
"Please consider migrating to ``ansys-tools-common``. "
"For more information check https://github.com/ansys/ansys-tools-path/issues/341",
DeprecationWarning,
)
13 changes: 10 additions & 3 deletions src/ansys/tools/path/applications/dyna.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@

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

import warnings

def is_valid_executable_path(exe_loc: str) -> bool:
# dyna paths can be anything
return True
from ansys.tools.common.path.applications.dyna import * # noqa

warnings.warn(
"This module is deprecated and will no longer be maintained. "
"Functionality from this module has been migrated to ``ansys-tools-common``. "
"Please consider migrating to ``ansys-tools-common``. "
"For more information check https://github.com/ansys/ansys-tools-path/issues/341",
DeprecationWarning,
)
17 changes: 9 additions & 8 deletions src/ansys/tools/path/applications/mapdl.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Copyright (C) 2023 - 2025 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
Expand All @@ -22,12 +21,14 @@

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

import os
import re
import warnings

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

def is_valid_executable_path(exe_loc: str) -> bool:
return (
os.path.isfile(exe_loc)
and re.search(r"ansys\d\d\d", os.path.basename(os.path.normpath(exe_loc))) is not None
)
warnings.warn(
"This module is deprecated and will no longer be maintained. "
"Functionality from this module has been migrated to ``ansys-tools-common``. "
"Please consider migrating to ``ansys-tools-common``. "
"For more information check https://github.com/ansys/ansys-tools-path/issues/341",
DeprecationWarning,
)
26 changes: 9 additions & 17 deletions src/ansys/tools/path/applications/mechanical.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,14 @@

"""Mechanical-specific logic for ansys-tools-path."""

import os
import re
import warnings

from ansys.tools.path.misc import is_windows
from ansys.tools.common.path.applications.mechanical import * # noqa


def is_valid_executable_path(exe_loc: str) -> bool:
if is_windows(): # pragma: no cover
return (
os.path.isfile(exe_loc)
and re.search(
"AnsysWBU.exe", os.path.basename(os.path.normpath(exe_loc)), re.IGNORECASE
)
is not None
)
return (
os.path.isfile(exe_loc)
and re.search(".workbench", os.path.basename(os.path.normpath(exe_loc))) is not None
)
warnings.warn(
"This module is deprecated and will no longer be maintained. "
"Functionality from this module has been migrated to ``ansys-tools-common``. "
"Please consider migrating to ``ansys-tools-common``. "
"For more information check https://github.com/ansys/ansys-tools-path/issues/341",
DeprecationWarning,
)
10 changes: 9 additions & 1 deletion src/ansys/tools/path/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,15 @@

"""Miscellaneous functions used by ansys-tools-path."""

import os
import warnings

warnings.warn(
"This module is deprecated and will no longer be maintained. "
"Functionality from this module has been migrated to ``ansys-tools-common``. "
"Please consider migrating to ``ansys-tools-common``. "
"For more information check https://github.com/ansys/ansys-tools-path/issues/341",
DeprecationWarning,
)


def is_float(input_string: str) -> bool:
Expand Down
Loading