Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reviewed new/changed docstrings #70

Merged
merged 1 commit into from
Jan 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 3 additions & 3 deletions src/ansys/grantami/bomanalytics/_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,12 @@ def run(self, query): # type: ignore[no-untyped-def]
Raises
------
:class:`~ansys.grantami.bomanalytics.GrantaMIException`
[TECHDOCS] If a message is returned with a severity of "critical". Granta MI is running and the BoM
If a message is returned with a severity of "critical". Granta MI is running and the BoM
Analytics Service is available, but it was not able to run the query. Possible causes include a missing
database or table.
:class:`~ansys.openapi.common.ApiException`
[TECHDOCS] If the Granta MI server was not able to return a response. Possible causes include an internal
configuration error, or that the BoM Analytics Service is not installed.
If the Granta MI server was not able to return a response. Possible causes include an internal
configuration error, or the BoM Analytics Service not being installed.
"""

logger.info(f"Running query {query} with connection {self}")
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/grantami/bomanalytics/_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@


class GrantaMIException(RuntimeError):
"""[TECHDOCS] A critical error occurred when processing a BoM Analytics query."""
"""A critical error occurred when processing a BoM Analytics query."""

pass
6 changes: 3 additions & 3 deletions src/ansys/grantami/bomanalytics/_query_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@


LogMessage = namedtuple("LogMessage", ["severity", "message"])
""" [TECHDOCS] A message returned by Granta MI when running the query.
""" A message returned by Granta MI when running the query.

Messages marked with the "error" severity are more likely to produce incorrect results and should be treated with
increased caution.
Expand Down Expand Up @@ -118,10 +118,10 @@ def __init__(self, log_messages: List[LogMessage]) -> None:

@property
def messages(self) -> List[LogMessage]:
"""[TECHDOCS] Messages generated by Granta MI when running the query. The presence of one or more messages means
"""Messages generated by Granta MI when running the query. The presence of one or more messages means
something unexpected happened when running the query, but the query could still be completed.

Messages are sorted in order of decreasing severity. Messages are also available in the Service Layer log file.
Messages are sorted in order of decreasing severity, and are available in the Service Layer log file.

Messages are also logged using the Python `logging` module to the "ansys.grantami.bomanalytics" logger. By
default, messages with a severity of "warning" or higher are printed on stderr.
Expand Down