-
Notifications
You must be signed in to change notification settings - Fork 0
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
Nicole #2
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @nsmina914!
Thanks for putting this together. Overall it is quite nice. We needed a demo notebook and I'm glad we have one. Also you are on the right track with a convenience search function.
I do have some comments noted below. How about we use our upcoming meeting to go over them?
escalateclient/escalateclient.py
Outdated
@@ -54,6 +54,173 @@ def get(self, | |||
return r.json()['results'] | |||
print('Returning response object') | |||
return r | |||
|
|||
def search(self, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is a little long, and a quadruply nested if
will likely be hard to maintain. @nsmina914 can you shorten it somehow? Either factor out reused logic or break into subroutines, each with a clear name and docstring? (The method should have a docstring as well)
escalateclient/escalateclient.py
Outdated
@@ -89,6 +256,18 @@ def put(self, url=None, endpoint=None, resource_id=None, data=None): | |||
url = f'{self.base_url}/api/{endpoint}/{resource_id}' | |||
r = requests.api.put(url, data, headers=self._token_header) | |||
return r | |||
|
|||
def patch(self, url=None, endpoint=None, resource_id=None, data=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, thanks!
README.md
Outdated
@@ -17,8 +17,11 @@ escalate=ESCALATEClient(escalate_url, | |||
|
|||
escalate.list_endpoints() | |||
|
|||
escalate.search(endpoint, search_field, criteria, data=[], exact=False, negate=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rest of the methods are obvious, but its not clear from this what search
does. We should go through this file together and add some more comments and concrete examples
@@ -0,0 +1,815 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This notebook looks good. I have some suggestions to clean it up a bit
No description provided.