-
Notifications
You must be signed in to change notification settings - Fork 38
add health and datasource proxy #5
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
Conversation
|
Hi Andreas, It is a very good news, that you decided to fork the original project, if it helps to develop it ! If there are problems with this PR, just tell me, particullarly concerning code coverage (i'm really not famillar with the concept). |
Codecov Report
@@ Coverage Diff @@
## main #5 +/- ##
==========================================
+ Coverage 85.87% 87.48% +1.60%
==========================================
Files 16 17 +1
Lines 637 655 +18
==========================================
+ Hits 547 573 +26
+ Misses 90 82 -8
Continue to review full report at Codecov.
|
amotl
left a comment
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.
Dear @peekjef72,
thank you very much for your contribution. I added a minor comment below, where things might get improved. Please let me know if you think I am getting things wrong.
With kind regards,
Andreas.
| r = self.client.DELETE(delete_datasource) | ||
| return r | ||
|
|
||
| def get_datasource_proxy_data(self, datasource_id |
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.
If there are problems with this PR, just tell me. Particularly concerning code coverage, because I'm not really familiar with this concept.
I can't see where get_datasource_proxy_data() will be called from any code, including test cases. This is probably why Codecov reported about a 0.52% decline in code coverage at #5 (comment).
In order to learn something about the general concept, I would like to refer you to 1. Maybe you can add a corresponding test case for this function? Please let me know if you need further assistance or clarification on this detail.
Footnotes
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 see that the documentation section 1 does not contain any example about how to use the datasource element. Feel free to add a short example there about its baseline usage, and in particular about its usage with get_datasource_proxy_data. Do you think this is a good idea?
Footnotes
|
I've added tests for the datasource part (find, get, get_dtasource_proxy_data). |
|
Dear @peekjef72, your Also, the test cases you added look pretty comprehensive, increasing the test coverage by 1.60 %, see #5 (comment). Thanks a stack! With kind regards, P.S.: I would like to add m0nhawk/grafana_api#85 before cutting a new release to be published on PyPI. I hope you are fine with that. |
|
Hi again, your improvements became part of With kind regards, |
Description
get_datasource_proxy_data()(/api/datasource/proxy...) on "datasource" element to be able to collect data info through Grafana.Notes
Checklist