Skip to content

Commit

Permalink
edit docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
meghanhickey committed Nov 7, 2023
1 parent e867a2c commit 6ecc07c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 22 deletions.
20 changes: 4 additions & 16 deletions indico/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ class IndicoConfig:
Configuration for the IndicoClient.
Args:
host= (str, optional): Indico Platform hostname (ie indico.myco.com)
api_token_path= (str, optional): Path to the Indico API token file indico_api_token.txt
api_token= (str, optional): The actual text of the API Token
host= (str, optional): Indico Platform hostname (eg mycluster.indico.io )
api_token_path= (str, optional): Path to the Indico API token file indico_api_token.txt. Defaults to user's home directory. Ignored if api_token is provided.
api_token= (str, optional): The actual text of the API Token. Takes precedence over api_token_path
verify_ssl= (bool, optional): Verify the host's SSL certificate? Default=True
requests_params= (dict, optional): Dictionary of requests.Session parameters to set
Expand All @@ -22,18 +22,6 @@ class IndicoConfig:
Raises:
RuntimeError: If api_token_path does not exist.
Notes:
By default, the IndicoConfig constructor will set host and api_token_path from the
INDICO_HOST and INDICO_API_TOKEN_PATH environment variables. If these variable are
not set then it will use ``app.indico.io`` as the host and will look for the
indico_api_token.txt file in the user's home directory.
If your Indico Platform host is configured to use http instead of https or if the
host has an invalid SSL certificate then be sure to set verify_ssl=False
The requests_params dictionary should have keys that are valid attributes of the Session
object from the requests library.
"""

host: str
Expand All @@ -47,7 +35,7 @@ class IndicoConfig:

def __init__(self, **kwargs):

self.host: str = os.getenv("INDICO_HOST", "app.indico.io")
self.host: str = os.getenv("INDICO_HOST")
self.protocol: str = os.getenv("INDICO_PROTOCOL", "https")
self.serializer: str = os.getenv("INDICO_SERIALIZER", "msgpack")
self.api_token_path: str = os.getenv("INDICO_API_TOKEN_PATH", Path.home())
Expand Down
10 changes: 4 additions & 6 deletions indico/queries/usermetrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ class _PagedUserChangelog(BaseType):

class GetUserSummary(GraphQLRequest):
"""
Requests summary level information per-date of users in the app.
Includes enabled/disabled user counts, names of roles,
and number of users assigned to that role.
Requests summary-level information of users in the app on a specific date.
Args:
date (datetime): specific day to summarize.
Expand Down Expand Up @@ -62,7 +60,7 @@ def process_response(self, response) -> UserSummary:
class GetUserSnapshots(PagedRequest):
"""
Requests per-date detailed information about app users.
Requests paged detailed information about app users on a specific date.
Args:
filters (UserMetricsFilter): filter the query based on UserMetricsFilter criteria.
Expand Down Expand Up @@ -110,7 +108,7 @@ def process_response(self, response) -> List[UserSnapshot]:
class GetUserChangelog(PagedRequest):
"""
Requests per-date detailed information about app users.
Gets paged detailed information about app users.
Args:
filters (UserSnapshotFilter): filter the query based on UserMetricsFilter criteria.
Expand Down Expand Up @@ -159,7 +157,7 @@ def process_response(self, response) -> List[UserSnapshot]:
class GenerateChangelogReport(GraphQLRequest):
"""
Requests per-date detailed information about app users.
Create a job to generate a report of detailed information about app users
Args:
filters (UserSnapshotFilter): filter the query based on UserMetricsFilter criteria.
Expand Down

0 comments on commit 6ecc07c

Please sign in to comment.