Contributions such as bug reports, fixes, documentation, enhancements, and ideas are welcome.
Use the Issues tab to report any bugs. Be sure to include:
-
A quick summary or background.
-
Steps to reproduce.
-
What you expected would happen.
-
What actually happens?
-
Sample code if you can, with error messages or the stack trace.
-
Notes (possibly including why you think this might be happening or stuff you tried that didn't work).
-
Lastly, avoid including sensitive information with bug reports, such as authentication tokens or data that might be commercially sensitive.
If you know how to fix the bug or have written a fix, even better! See below for how to submit changes.
If you'd like to work on something, there's no need to ask for permission, but here are a couple of things to consider:
-
Have a quick check in the Issues to see if it's not already being discussed or worked on.
-
Create an Issue to associate with the change to track some of the thinking and rationale behind the change.
Start reading the code, and you'll get the hang of it. Here are some resources to help understand the influences on the library design:
-
What makes a good API wrapper? -
pbipy
aims to be more idiomatic and consistent with Python and its conventions. -
See the Python jira library's
JIRA
class as an example of howpbipy
tries to name methods that wrap API endpoints.
All code contributions should have associated tests. Because the library is an API wrapper, most of the tests check that:
-
URLs are formed properly
-
Request data is handled and passed to the API correctly.
-
API responses are parsed as expected.
pbipy
uses the responses library to validate HTTP requests and to mock HTTP responses.
Tests generally use the sample responses found in the documentation for each API endpoint.
Sometimes, the API documentation does not provide a sample response, or you may want to create your own test data. When creating test data, try to mimic the data as it would be in a Power BI instance and, for security reasons, avoid including actual values from your own Power BI instances.
Any new functions, methods, classes, and modules should include docstrings. Docstrings follow the numpy style guide. Currently, pbipy does not have dedicated documentation, so docstrings are the next best option.
pbipy
uses black for formatting.
pbipy
is a volunteer effort. Thanks for taking the time to contribute.