Skip to content

Commit

Permalink
fix for issue sassoftware#175
Browse files Browse the repository at this point in the history
  • Loading branch information
SilvestriStefano committed Oct 11, 2023
1 parent 5e8d8fd commit c06fe48
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
4 changes: 2 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.viewcode",
"numpydoc", # "sphinx.ext.napoleon",
"sphinx.ext.napoleon",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
]
Expand All @@ -54,7 +54,7 @@
"swat": ("https://sassoftware.github.io/python-swat/", None),
"pytest": ("https://docs.pytest.org/en/latest/", None),
"betamax": ("https://betamax.readthedocs.io/en/latest/", None),
"requests": ("https://2.python-requests.org/en/master/", None),
"requests": ("https://requests.readthedocs.io/en/latest/", None),
"tox": ("https://tox.readthedocs.io/en/latest/", None),
"flake8": ("http://flake8.pycqa.org/en/latest/", None),
}
Expand Down
30 changes: 18 additions & 12 deletions src/sasctl/_services/cas_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ def check_keys(valid_keys: list, input_keys: list, parameters: str):
String describing the type of parameters
that are being tested.
Returns
-------
raises ValueError if input_keys are not valid
Raises
------
ValueError
if input_keys are not valid
"""
if not all(key in valid_keys for key in input_keys):
raise ValueError(
Expand All @@ -55,10 +56,10 @@ def check_required_key(
String describing the type of parameters
that are being tested.
Returns
-------
raises ValueError if required_key is not present.
raises TypeError if required_key is neither a list or a string.
Raises
------
ValueError if required_key is not present.
TypeError if required_key is neither a list or a string.
"""
if isinstance(required_key, str):
if required_key not in input_keys:
Expand Down Expand Up @@ -93,7 +94,7 @@ def list_sessions(cls, query_params: dict = None, server: str = None):
Returns a collection of sessions available on the CAS server.
Parameters
------
----------
query_params : dict, optional
Query parameters.
Valid keys are `start`, `limit`, `filter`,
Expand Down Expand Up @@ -129,7 +130,7 @@ def create_session(cls, properties: dict, server: str = None):
"""Creates a new session on the CAS server.
Parameters
------
----------
properties : dict
Properties of the session.
Valid keys are `authenticationType` (required),
Expand Down Expand Up @@ -164,7 +165,7 @@ def delete_session(
"""Terminates a session on the CAS server.
Parameters
------
----------
sess_id : str
A string indicating the Session id.
server : str
Expand Down Expand Up @@ -225,7 +226,7 @@ def get_caslib(cls, name: str, server: str = None):
Returns
-------
RestObj
RestObj or None
"""
server = server or DEFAULT_SERVER
Expand Down Expand Up @@ -278,7 +279,7 @@ def get_table(cls, name: str, caslib: Union[str, dict] = None, server: str = Non
Returns
-------
RestObj
RestObj or None
"""
caslib = caslib or DEFAULT_CASLIB
Expand Down Expand Up @@ -637,6 +638,11 @@ def del_table(
Returns
-------
RestObj
Raises
------
ValueError
If `query_params` is empty
"""

server = server or DEFAULT_SERVER
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ deps =
# tests: lightgbm ; platform_system != "Darwin" # lightgmb seems to have build issues on MacOS
# doc skips install, so explicitly add minimum packages
doc: sphinx
doc: pydata_sphinx_theme
doc: pyyaml

setenv =
Expand Down

0 comments on commit c06fe48

Please sign in to comment.