Skip to content

Commit

Permalink
Docstring adaptations
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasFehring authored and tornede committed Apr 17, 2024
1 parent 8cb34b5 commit bfdbdd7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,10 @@
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"grammarly.selectors": [
{
"language": "restructuredtext",
"scheme": "file"
}
],
}
8 changes: 5 additions & 3 deletions py_experimenter/experimenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(
self,
experiment_configuration_file_path: str = os.path.join("config", "experiment_configuration.yml"),
database_credential_file_path: str = os.path.join("config", "database_credentials.yml"),
use_ssh_tunnel: bool = False,
use_ssh_tunnel: Optional[bool] = None,
table_name: str = None,
database_name: str = None,
use_codecarbon: bool = True,
Expand All @@ -49,9 +49,11 @@ def __init__(
for the database connection, i.e., host, user and password. Defaults to 'config/database_credentials.cfg'.
:type database_credential_file_path: str, optional
:param use_ssh_tunnel: If the used database is sqlite this parameter is ignored. Otherwise: If the database is mysql,
and `use_ssh_tunnel == True` the ssh credentials provided in `database_credential_file_path` are used to establish
and `use_ssh_tunnel == None` the ssh decision is based on the configuration file (defaults to false).
If `use_ssh_tunnel != True` the ssh credentials provided in `database_credential_file_path` are used to establish
an ssh tunnel to the database. If `use_ssh_tunnel == True` but no ssh credentials are provided in
`database_credential_file_path`, an error is raised. Defaults to True.
`database_credential_file_path`, an error is raised. If `use_shh_tunnel==False` PxExperimenter directly connects
to the databse. Defaults to None.
:type use_ssh_tunnel: bool
:param table_name: The name of the database table, if given it will overwrite the table_name given in the
`experiment_configuration_file_path`. If None, the table table name is taken from the experiment
Expand Down

0 comments on commit bfdbdd7

Please sign in to comment.