dataiku / dataiku/dataiku-api-client-python
Client list users method have attribute wrongly spell
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 44
- Forks
- 29
- Avg merge
- 3h 34m
- Merged PRs (30d)
- 2
Description
See I wanted to know all the users which are currently active.
Problem with the current code is, list_users() returns list of dictionary. And each dictionary has attribute activeWebSocketSesssions, ideally this should be activeWebSocketSessions.
Note - I wanted to make that change using the pull request, but I did not find this attribute in the current codebase, may be because you guys did not revel it, may be not. Aways this is my finding, that will help make this product a bit better.
def list_active_users(self):
"""
Get all the active users who currently login to the DSS
This method takes nothing and returns name of the users who are actively working now
Returns:
string: calculate all currently active users
"""
user_list = []
dss_users = self.client.list_users()
for user in dss_users:
if user["activeWebSocketSesssions"] != 0:
user_list.append(user["displayName"])
return user_list
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the list_users() API client entry point and inspect the returned user dictionaries for the spelling of the active WebSocket session attribute. Done means the returned key uses activeWebSocketSessions consistently and the shown list_active_users() usage can identify active users without relying on the misspelled key.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100