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

Commit 784c141

Browse files
committed
Merge branch 'main' into release/0.7
2 parents 4f05a12 + 0b34d07 commit 784c141

File tree

9 files changed

+29
-31
lines changed

9 files changed

+29
-31
lines changed

.github/workflows/ci_cd.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ jobs:
4040
uses: ansys/actions/build-wheelhouse@v8
4141
with:
4242
library-name: ${{ env.PACKAGE_NAME }}
43-
library-namespace: ${{ env.PACKAGE_NAMESPACE }}
4443
operating-system: ${{ matrix.os }}
4544
python-version: ${{ matrix.python-version }}
4645

@@ -73,7 +72,7 @@ jobs:
7372
python -m pytest -vx --cov=${{ env.PACKAGE_NAMESPACE }} --cov-report=term --cov-report=xml:.cov/coverage.xml --cov-report=html:.cov/html
7473
7574
- name: Upload coverage reports to Codecov
76-
uses: codecov/codecov-action@v4
75+
uses: codecov/codecov-action@v5
7776
with:
7877
files: .cov/coverage.xml
7978

@@ -139,7 +138,6 @@ jobs:
139138
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
140139
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
141140
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
142-
python-version: ${{ env.MAIN_PYTHON_VERSION }}
143141

144142
upload_docs_release:
145143
name: Upload release documentation
@@ -154,4 +152,3 @@ jobs:
154152
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
155153
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
156154
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
157-
python-version: ${{ env.MAIN_PYTHON_VERSION }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ test-output.xml
4848

4949
.venv
5050
/env
51+
.env
5152
.DS_Store
5253
doc/_build/*/*
53-
54+
doc/source/api/*

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ repos:
3737

3838
# this validates our github workflow files
3939
- repo: https://github.com/python-jsonschema/check-jsonschema
40-
rev: 0.29.4
40+
rev: 0.30.0
4141
hooks:
4242
- id: check-github-workflows
4343

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ Further information about contributing to ansys-tools-path can be found in
1616

1717
[PyAnsys Developer's Guide]: https://dev.docs.pyansys.com/
1818

19+
## [Unreleased]()
20+
21+
### What's Changed
22+
Update docs with autoapi [#252](https://github.com/ansys/ansys-tools-path/pull/252)
23+
1924
## [v0.7.0]() - 13 November 2024
2025

2126
### What's Changed

doc/source/api.rst

Lines changed: 0 additions & 14 deletions
This file was deleted.

doc/source/conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,15 @@
4040
"additional_breadcrumbs": [
4141
("PyAnsys", "https://docs.pyansys.com/"),
4242
],
43+
"ansys_sphinx_theme_autoapi": {
44+
"project": project,
45+
"directory": "src/ansys",
46+
},
4347
}
4448

4549
# Sphinx extensions
4650
extensions = [
51+
"ansys_sphinx_theme.extension.autoapi",
4752
"sphinx.ext.autodoc",
4853
"sphinx.ext.autosummary",
4954
"numpydoc",
@@ -73,7 +78,7 @@
7378
numpydoc_validation_checks = {
7479
"GL06", # Found unknown section
7580
"GL07", # Sections are in the wrong order.
76-
"GL08", # The object does not have a docstring
81+
# "GL08", # The object does not have a docstring
7782
"GL09", # Deprecation warning should precede extended summary
7883
"GL10", # reST directives {directives} must be followed by two colons
7984
"SS01", # No summary found

doc/source/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
:hidden:
99
:maxdepth: 3
1010

11-
api
11+
api/index
1212
contribute
1313

1414

@@ -27,7 +27,7 @@ How to install
2727
How to use
2828
----------
2929

30-
You can use any of the functions available in the :ref:`ref_api`
30+
You can use any of the functions available in the
3131
to identify the path of the local Ansys installation.
3232

3333
For example you can use :func:`find_ansys <ansys.tools.path.find_ansys>`

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "flit_core.buildapi"
55
[project]
66
# Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections
77
name = "ansys-tools-path"
8-
version = "0.7.0"
8+
version = "0.8.dev0"
99
description = "Library to locate Ansys products in a local machine."
1010
readme = "README.rst"
1111
requires-python = ">=3.10,<4"
@@ -28,16 +28,16 @@ dependencies = [
2828

2929

3030
[project.optional-dependencies]
31-
tests = ["pytest==8.3.3", "pytest-cov==6.0.0", "pyfakefs==5.7.1"]
31+
tests = ["pytest==8.3.4", "pytest-cov==6.0.0", "pyfakefs==5.7.3"]
3232

3333
doc = [
3434
"Sphinx==8.1.3",
35-
"ansys-sphinx-theme==1.2.0",
35+
"ansys-sphinx-theme[autoapi]==1.2.3",
3636
"numpydoc==1.8.0",
3737
"sphinx-copybutton==0.5.2",
3838
]
3939

40-
build = ["build==1.2.2.post1", "twine==5.1.1"]
40+
build = ["build==1.2.2.post1", "twine==6.0.1"]
4141

4242
[tool.flit.module]
4343
name = "ansys.tools.path"

src/ansys/tools/path/path.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
PRODUCT_TYPE = Literal["mapdl", "mechanical", "dyna"]
4242
SUPPORTED_VERSIONS_TYPE = Dict[int, str]
4343

44-
LINUX_DEFAULT_DIRS = [["/", "usr", "ansys_inc"], ["/", "ansys_inc"], ["/", "install", "ansys_inc"]]
45-
LINUX_DEFAULT_DIRS = [os.path.join(*each) for each in LINUX_DEFAULT_DIRS]
44+
linux_default_dirs = [["/", "usr", "ansys_inc"], ["/", "ansys_inc"], ["/", "install", "ansys_inc"]]
45+
LINUX_DEFAULT_DIRS = [os.path.join(*each) for each in linux_default_dirs]
4646

4747
CONFIG_FILE_NAME = "config.txt"
4848

@@ -999,7 +999,7 @@ def _get_application_path(
999999
exe_loc = _prompt_path(product)
10001000
_change_default_path(product, exe_loc)
10011001
return exe_loc
1002-
1002+
warnings.warn(f"No path found for {product} in default locations.")
10031003
return None
10041004

10051005

@@ -1156,7 +1156,11 @@ def version_from_path(product: PRODUCT_TYPE, path: str) -> int:
11561156
11571157
"""
11581158
if not isinstance(path, str):
1159-
raise ValueError(f"Provided path '{path}' is not a string.")
1159+
raise ValueError(
1160+
f'The provided path, "{path}", is not a valid string. '
1161+
f'If "{product}" is not installed in the default location, use ``save-ansys-path`` '
1162+
f"to save the path so it can be found by ``ansys-tools-path``."
1163+
)
11601164
if product == "mechanical":
11611165
return _mechanical_version_from_path(path)
11621166
elif product == "mapdl":

0 commit comments

Comments
 (0)