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

Deprecate HyP3.check_quota in favor of HyP3.check_credits #261

Merged
merged 3 commits into from
Feb 2, 2024

Conversation

jhkennedy
Copy link
Contributor

This:

  • adds HyP3.check_credits method to check your remaining credits
  • deprecates HyP3.check_quota
  • changes HyP3.check_quota's return type from Optional[int] to Optional[float]
  • changes credits value to float in tests

@jhkennedy jhkennedy requested a review from a team as a code owner February 2, 2024 01:16
@@ -487,10 +488,20 @@ def my_info(self) -> dict:
_raise_for_hyp3_status(response)
return response.json()

def check_quota(self) -> Optional[int]:
def check_credits(self) -> Optional[float]:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, it looks like we only specify "number" in HyP3's OpenAPI spec, which could be a float or an int. I wonder if we should actually make this specify float or int, or always coarse to float. Right now, I suppose they will actually come as ints unless we make a job cost a fractional amount...

Copy link
Contributor

@jtherrmann jtherrmann left a comment

Choose a reason for hiding this comment

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

LGTM!

@jtherrmann jtherrmann mentioned this pull request Feb 2, 2024
3 tasks
@jhkennedy jhkennedy merged commit 8e75f75 into develop Feb 2, 2024
8 checks passed
@jhkennedy jhkennedy deleted the deprecate-quota branch February 2, 2024 18:05
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