Skip to content

Commit 7ab4a01

Browse files
fix: numpydoc warnings (#1556)
Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent 8d9d805 commit 7ab4a01

29 files changed

+365
-355
lines changed

doc/changelog.d/1556.fixed.md

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

doc/source/conf.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,6 @@ def get_wheelhouse_assets_dictionary():
8484
def intersphinx_pyansys_geometry(switcher_version: str):
8585
"""Auxiliary method to build the intersphinx mapping for PyAnsys Geometry.
8686
87-
Notes
88-
-----
89-
If the objects.inv file is not found whenever it is a release, the method
90-
will default to the "dev" version. If the objects.inv file is not found
91-
for the "dev" version, the method will return an empty string.
92-
9387
Parameters
9488
----------
9589
switcher_version : str
@@ -99,6 +93,12 @@ def intersphinx_pyansys_geometry(switcher_version: str):
9993
-------
10094
str
10195
The intersphinx mapping for PyAnsys Geometry.
96+
97+
Notes
98+
-----
99+
If the objects.inv file is not found whenever it is a release, the method
100+
will default to the "dev" version. If the objects.inv file is not found
101+
for the "dev" version, the method will return an empty string.
102102
"""
103103
prefix = "https://geometry.docs.pyansys.com/version"
104104

@@ -230,13 +230,22 @@ def intersphinx_pyansys_geometry(switcher_version: str):
230230
"GL10", # reST directives {directives} must be followed by two colons
231231
"SS01", # No summary found
232232
"SS02", # Summary does not start with a capital letter
233-
# "SS03", # Summary does not end with a period
233+
"SS03", # Summary does not end with a period
234234
"SS04", # Summary contains heading whitespaces
235235
# "SS05", # Summary must start with infinitive verb, not third person
236236
"RT02", # The first line of the Returns section should contain only the
237237
# type, unless multiple values are being returned"
238238
}
239239

240+
# Ignoring numpydoc validation on built-in methods from Python
241+
numpydoc_validation_exclude = {
242+
"add_note",
243+
"isEnabledFor",
244+
"validate",
245+
"__cause__",
246+
"__context__",
247+
}
248+
240249
# static path
241250
html_static_path = ["_static"]
242251

src/ansys/geometry/core/connection/docker_instance.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,15 @@ class LocalDockerInstance:
115115
def docker_client() -> "DockerClient":
116116
"""Get the initialized ``__DOCKER_CLIENT__`` object.
117117
118-
Notes
119-
-----
120-
The ``LocalDockerInstance`` class performs a lazy initialization of the
121-
``__DOCKER_CLIENT__`` class variable.
122-
123118
Returns
124119
-------
125120
~docker.client.DockerClient
126121
Initialized Docker client.
122+
123+
Notes
124+
-----
125+
The ``LocalDockerInstance`` class performs a lazy initialization of the
126+
``__DOCKER_CLIENT__`` class variable.
127127
"""
128128
if not LocalDockerInstance.__DOCKER_CLIENT__:
129129
LocalDockerInstance.__DOCKER_CLIENT__ = DockerClient.from_env()
@@ -327,10 +327,6 @@ def existed_previously(self) -> bool:
327327
def get_geometry_container_type(instance: LocalDockerInstance) -> GeometryContainers | None:
328328
"""Provide back the ``GeometryContainers`` value.
329329
330-
Notes
331-
-----
332-
This method returns the first hit on the available tags.
333-
334330
Parameters
335331
----------
336332
instance : LocalDockerInstance
@@ -341,6 +337,10 @@ def get_geometry_container_type(instance: LocalDockerInstance) -> GeometryContai
341337
GeometryContainers or None
342338
The GeometryContainer value corresponding to the previous image or None
343339
if not match.
340+
341+
Notes
342+
-----
343+
This method returns the first hit on the available tags.
344344
"""
345345
for tag in instance.container.image.tags:
346346
for geom_services in GeometryContainers:

src/ansys/geometry/core/connection/launcher.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,11 @@ def launch_modeler_with_geometry_service(
550550
Placeholder to prevent errors when passing additional arguments that
551551
are not compatible with this method.
552552
553+
Returns
554+
-------
555+
Modeler
556+
Instance of the Geometry service.
557+
553558
Raises
554559
------
555560
ConnectionError
@@ -559,11 +564,6 @@ def launch_modeler_with_geometry_service(
559564
If there is not an Ansys product 24.1 version or later installed
560565
a SystemError will be raised.
561566
562-
Returns
563-
-------
564-
Modeler
565-
Instance of the Geometry service.
566-
567567
Examples
568568
--------
569569
Starting a geometry service with the default parameters and getting back a ``Modeler``
@@ -683,6 +683,11 @@ def launch_modeler_with_discovery(
683683
Placeholder to prevent errors when passing additional arguments that
684684
are not compatible with this method.
685685
686+
Returns
687+
-------
688+
Modeler
689+
Instance of the Geometry service.
690+
686691
Raises
687692
------
688693
ConnectionError
@@ -692,11 +697,6 @@ def launch_modeler_with_discovery(
692697
or if a specific product's version is requested but not installed locally then
693698
a SystemError will be raised.
694699
695-
Returns
696-
-------
697-
Modeler
698-
Instance of the Geometry service.
699-
700700
Examples
701701
--------
702702
Starting an Ansys Discovery session with the default parameters and getting back a ``Modeler``
@@ -810,6 +810,11 @@ def launch_modeler_with_spaceclaim(
810810
Placeholder to prevent errors when passing additional arguments that
811811
are not compatible with this method.
812812
813+
Returns
814+
-------
815+
Modeler
816+
Instance of the Geometry service.
817+
813818
Raises
814819
------
815820
ConnectionError
@@ -819,11 +824,6 @@ def launch_modeler_with_spaceclaim(
819824
or if a specific product's version is requested but not installed locally then
820825
a SystemError will be raised.
821826
822-
Returns
823-
-------
824-
Modeler
825-
Instance of the Geometry service.
826-
827827
Examples
828828
--------
829829
Starting an Ansys SpaceClaim session with the default parameters and get back a ``Modeler``

src/ansys/geometry/core/connection/product_instance.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,11 @@ def prepare_and_start_backend(
237237
logs_folder : str, optional
238238
DEPRECATED. Use ``server_logs_folder`` instead.
239239
240+
Returns
241+
-------
242+
Modeler
243+
Instance of the Geometry service.
244+
240245
Raises
241246
------
242247
ConnectionError
@@ -245,11 +250,6 @@ def prepare_and_start_backend(
245250
If there is not an Ansys product 24.1 version or later installed
246251
or if a specific product's version is requested but not installed locally then
247252
a SystemError will be raised.
248-
249-
Returns
250-
-------
251-
Modeler
252-
Instance of the Geometry service.
253253
"""
254254
from ansys.geometry.core.modeler import Modeler
255255

@@ -464,10 +464,6 @@ def _manifest_path_provider(
464464
def __start_program(args: list[str], local_env: dict[str, str]) -> subprocess.Popen:
465465
"""Start the program.
466466
467-
Notes
468-
-----
469-
The path is the first item of the ``args`` array argument.
470-
471467
Parameters
472468
----------
473469
args : list[str]
@@ -480,6 +476,10 @@ def __start_program(args: list[str], local_env: dict[str, str]) -> subprocess.Po
480476
-------
481477
subprocess.Popen
482478
The subprocess object.
479+
480+
Notes
481+
-----
482+
The path is the first item of the ``args`` array argument.
483483
"""
484484
# private method and controlled input by library - excluding bandit check.
485485
return subprocess.Popen( # nosec B603

0 commit comments

Comments
 (0)