-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: port query to spec & other utils #43
Conversation
joao-conde
commented
Jun 6, 2022
- | - |
---|---|
Issue | -- |
Dependencies | -- |
Decisions | Port of useful functions from the javascript RIPE SDK to our python SDK. |
Animated GIF | -- |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Unit testing would be great to check that everything is working as expected and since this is not API calls, it can be tested |
Pull Request Test Coverage Report for Build 245
💛 - Coveralls |
Woof, Woof! Oops! @joao-conde it looks like you've assigned the issue to multiple persons. There can only be one person assigned - @joao-conde was removed from issues assignees list. Your friend, |
@@ -54,6 +54,127 @@ class API( | |||
transport_rule.TransportRuleAPI, | |||
availability_rule.AvailabilityRuleAPI, | |||
): | |||
@classmethod | |||
def _query_to_spec(cls, query): |
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.
nothing should come before init
return spec | ||
|
||
@classmethod | ||
def _unpack_query(cls, query): |
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.
let's move all these methods to a util_api.py
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.
CC: @joao-conde
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.
Also didnt like these in the main class but didnt know what to call the new file since api was weird. util api it is 👍