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

feat: port query to spec & other utils #43

Merged
merged 7 commits into from
Jun 8, 2022

Conversation

joao-conde
Copy link
Contributor

- -
Issue --
Dependencies --
Decisions Port of useful functions from the javascript RIPE SDK to our python SDK.
Animated GIF --

@joao-conde joao-conde added enhancement New feature or request back-port 🔮 Requires back-porting of functionality to other projects labels Jun 6, 2022
@joao-conde joao-conde requested a review from BeeMargarida June 6, 2022 15:42
@ripe-tobias-bot

This comment was marked as resolved.

@ripe-tobias-bot

This comment was marked as resolved.

@BeeMargarida
Copy link
Contributor

Unit testing would be great to check that everything is working as expected and since this is not API calls, it can be tested

@coveralls
Copy link

coveralls commented Jun 6, 2022

Pull Request Test Coverage Report for Build 245

  • 61 of 90 (67.78%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+35.8%) to 35.835%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/ripe/base.py 61 90 67.78%
Totals Coverage Status
Change from base Build 226: 35.8%
Covered Lines: 339
Relevant Lines: 946

💛 - Coveralls

@joao-conde joao-conde assigned BeeMargarida and unassigned joao-conde Jun 7, 2022
@BeeMargarida BeeMargarida requested a review from 3rdvision June 7, 2022 15:58
src/ripe/base.py Show resolved Hide resolved
src/ripe/base.py Outdated Show resolved Hide resolved
@3rdvision 3rdvision assigned joao-conde and unassigned 3rdvision Jun 7, 2022
@joao-conde joao-conde requested a review from 3rdvision June 7, 2022 16:37
@joao-conde joao-conde assigned 3rdvision and unassigned joao-conde Jun 7, 2022
@3rdvision 3rdvision assigned joamag and unassigned 3rdvision Jun 7, 2022
@3rdvision 3rdvision requested a review from joamag June 7, 2022 17:20
@joao-conde joao-conde assigned hugo-gomes and unassigned joamag Jun 8, 2022
@joao-conde joao-conde requested review from hugo-gomes and removed request for joamag June 8, 2022 10:38
@joao-conde joao-conde added fast-track Feature to be fixed or implemented ASAP labels Jun 8, 2022
@joao-conde joao-conde self-assigned this Jun 8, 2022
@ripe-tobias-bot
Copy link

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,
Tobias (Platforme's mascot)

Tobias Bot

@joao-conde joao-conde assigned joao-conde and unassigned hugo-gomes Jun 8, 2022
@joao-conde joao-conde merged commit 1d26dd2 into master Jun 8, 2022
@delete-merged-branch delete-merged-branch bot deleted the jc/feat-port-query-to-spec branch June 8, 2022 14:38
@@ -54,6 +54,127 @@ class API(
transport_rule.TransportRuleAPI,
availability_rule.AvailabilityRuleAPI,
):
@classmethod
def _query_to_spec(cls, query):
Copy link
Contributor

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

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back-port 🔮 Requires back-porting of functionality to other projects enhancement New feature or request fast-track Feature to be fixed or implemented ASAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants