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

Nicole #2

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Nicole #2

wants to merge 17 commits into from

Conversation

nsmina914
Copy link

No description provided.

Copy link
Collaborator

@miketynes miketynes left a 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?

@@ -54,6 +54,173 @@ def get(self,
return r.json()['results']
print('Returning response object')
return r

def search(self,
Copy link
Collaborator

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)

@@ -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):
Copy link
Collaborator

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)
Copy link
Collaborator

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 @@
{
Copy link
Collaborator

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

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.

2 participants