Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PENG-3689 - Introducing support for datasets functionality #122

Merged
merged 6 commits into from
Feb 14, 2024

Conversation

cpontes-ns1
Copy link
Contributor

No description provided.

@@ -45,7 +45,7 @@ def _rateLimitHeaders(self, headers):
"remaining": int(headers.get("X-RateLimit-Remaining", 100)),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my case, I have a response that is not JSON. Currently all responses are assumed to be JSON so I needed a way to handle this

ns1/dataset.py Outdated
:param str id: dataset id to load
"""
if not reload and self.data:
raise DatasetException("dataset already loaded")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If data is already loaded does it really need to raise exception or should we make this a no-op function because the intended target condition already met?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

ns1/dataset.py Show resolved Hide resolved
def retrieveReport(self, rp_id, dt_id=None, callback=None, errback=None):
"""
Retrieves a generated report given a dataset id and a report id
:return: generated report

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include param types.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@hmodi-ns1
Copy link

Not a blocker, just a nitpick: I know this isn't a pattern of this repo, but I think adding typing to all methods can be helpful, e.g.

def get(id: int, name: str) -> str:
    pass

@shane-ns1 shane-ns1 merged commit ac1e417 into ns1:master Feb 14, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants