dataiku / dataiku/dataiku-api-client-python

Client list users method have attribute wrongly spell

未關閉
#282 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
Python
星號
44
分支
29
平均合併
3 小時 34 分鐘
30 天內合併 PR
2

描述

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

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 API 用戶端入口 list_users() 開始,檢查傳回的使用者字典中作用中 WebSocket 工作階段屬性的拼寫。完成的標準是傳回的鍵一致使用 activeWebSocketSessions,而且所示的 list_active_users() 用法能夠在不依賴拼寫錯誤的鍵的情況下識別作用中的使用者。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
api
Issue 類型
缺陷
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。