-
Notifications
You must be signed in to change notification settings - Fork 19
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
enh: use graphql to consolidate api calls #267
Conversation
Fix: full run fix: bugs in run
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #267 +/- ##
==========================================
+ Coverage 76.27% 80.25% +3.97%
==========================================
Files 10 10
Lines 725 714 -11
Branches 92 92
==========================================
+ Hits 553 573 +20
+ Misses 162 131 -31
Partials 10 10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bummer. if we move to graphql we can't get a contributor count. We could consider a separate workflow just for that metric in the future. |
src/pyosmeta/cli/process_reviews.py
Outdated
repo_endpoints, accepted_reviews | ||
) | ||
|
||
# BUG : contrib count isn't correct - great tables has some and is returning 0 |
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 isn't a bug, the endpoint isn't available via graphql.
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.
I've updated the PR to use rest just for that metric. it reduces the api calls by one per package vs two now.
fix: cleanup commented methods
|
||
def get_repo_contribs(self, url: str) -> int | None: | ||
def _get_metrics_graphql( |
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.
As we refactor it might make sense to generalize this for all graphql calls. But for now this is a specific helper to get metrics data.
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
Hey there, @banesullivan. I'm worried about merging this and breaking things in #270. Please have a look and let me know if we can merge and rebase or if that will cause problems. I'd also like to submit another pr that moves other parts of our workflow to graphql. |
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.
thank you @banesullivan !!! |
Next steps