-
Notifications
You must be signed in to change notification settings - Fork 120
Use black formatter #39
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,83 @@ | ||
# How to contribute | ||
|
||
Thank you in your interest in the podman-py project. We need your help to make it successful. | ||
Thank you in your interest in the podman-py project. We need your help to make | ||
it successful. | ||
|
||
You may also want to look at: | ||
- https://github.com/containers/libpod | ||
- https://podman.readthedocs.io/en/latest/Reference.html | ||
|
||
|
||
- [podman](https://github.com/containers/podman) | ||
- [podman Reference](https://podman.readthedocs.io/en/latest/Reference.html) | ||
|
||
## Reporting Issues | ||
Before reporting an issue, check our backlog of open issues to see if someone else has already reported it. If so, feel free to add your scenario, or additional information, to the discussion. Or simply "subscribe" to it to be notified when it is updated. | ||
|
||
If you find a new issue with the project we'd love to hear about it! The most important aspect of a bug report is that it includes enough information for us to reproduce it. So, please include as much detail as possible and try to remove the extra stuff that doesn't really relate to the issue itself. The easier it is for us to reproduce it, the faster it'll be fixed! | ||
Before reporting an issue, check our backlog of open issues to see if someone | ||
else has already reported it. If so, feel free to add your scenario, or | ||
additional information, to the discussion. Or simply "subscribe" to it to be | ||
notified when it is updated. | ||
|
||
If you find a new issue with the project we'd love to hear about it! The most | ||
important aspect of a bug report is that it includes enough information for us | ||
to reproduce it. So, please include as much detail as possible and try to | ||
remove the extra stuff that doesn't really relate to the issue itself. The | ||
easier it is for us to reproduce it, the faster it'll be fixed! | ||
|
||
Please don't include any private/sensitive information in your issue! | ||
|
||
## Tools we use | ||
- https://www.pylint.org/ | ||
- Python 3.6 | ||
- You may need to use virtualenv to support Python 3.6 | ||
- https://virtualenv.pypa.io/en/latest/ | ||
|
||
|
||
- Python 3.6 | ||
- [pylint](https://www.pylint.org/) | ||
- [black](https://github.com/psf/black) | ||
- [tox](https://tox.readthedocs.io/en/latest/) | ||
- You may need to use [virtualenv](https://virtualenv.pypa.io/en/latest/) to | ||
support Python 3.6 | ||
|
||
## Testing | ||
Depending on the size of your PR we will expect at a minimum unit tests. | ||
Integration tests would be required for large changes. | ||
TBD (how to test) | ||
|
||
Depending on the size of your PR we will expect at a minimum unit tests. | ||
Code will not be merged if unit test coverage drops below 85%. | ||
Integration tests would be required for large changes (TBD). | ||
|
||
Run unit tests and get coverage report: | ||
|
||
``` | ||
pip install tox | ||
tox -e coverage | ||
``` | ||
|
||
## Submitting changes | ||
- Create a github pull request (PR) | ||
- We expect a short summary followed by a longer description of why you are making these change(s). | ||
- Include the header `Signed-off-by: Git Hub User <user@github.com>` in your PR description/commit message with your name. | ||
- Setting `user.name` and `user.email` in your git configs allows you to then use `git commit -s`. Let git do the work of signing your commits. | ||
|
||
|
||
- Create a github pull request (PR) | ||
- We expect a short summary followed by a longer description of why you are | ||
making these change(s). | ||
- Include the header `Signed-off-by: Git Hub User <user@github.com>` in your PR | ||
description/commit message with your name. | ||
- Setting `user.name` and `user.email` in your git configs allows you to then | ||
use `git commit -s`. Let git do the work of signing your commits. | ||
|
||
## Where to find other contributors | ||
- For general questions and discussion, please use the IRC #podman channel on irc.freenode.net. | ||
- For discussions around issues/bugs and features, you can use the GitHub [issues](https://github.com/containers/podman-py/issues) and [PRs](https://github.com/containers/podman-py/pulls) tracking system. | ||
|
||
|
||
- For general questions and discussion, please use the IRC #podman channel on | ||
irc.freenode.net. | ||
- For discussions around issues/bugs and features, you can use the | ||
GitHub [issues](https://github.com/containers/podman-py/issues) and | ||
[PRs](https://github.com/containers/podman-py/pulls) tracking system. | ||
|
||
## Coding conventions | ||
- Pass pylint | ||
- exceptions are possible but you will need to make a good argument | ||
- use spaces not tabs for indentation | ||
- This is open source software. Consider the people who will read your code, and make it look nice for them. It's sort of like driving a car: Perhaps you love doing donuts when you're alone, but with passengers the goal is to make the ride as smooth as possible. | ||
|
||
Again thank you for your interest and participation. Jhon Honce <jhonce at redhat dot com> | ||
- Use [black](https://github.com/psf/black) code formatter. If you have tox | ||
installed, run `tox -e black` to see what changes will be made. You can use | ||
`tox -e black-format` to update the code formatting prior to committing. | ||
- Pass pylint | ||
- exceptions are possible but you will need to make a good argument | ||
- use spaces not tabs for indentation | ||
- This is open source software. Consider the people who will read your code, | ||
and make it look nice for them. It's sort of like driving a car: Perhaps | ||
you love doing donuts when you're alone, but with passengers the goal is to | ||
make the ride as smooth as possible. | ||
|
||
Again thank you for your interest and participation. | ||
Jhon Honce `<jhonce at redhat dot com>` | ||
|
||
Thanks to Carl Tashian, Participatory Politics Foundation for his fine CONTRIBUTING.md example. | ||
Thanks to Carl Tashian, Participatory Politics Foundation for his fine | ||
CONTRIBUTING.md example. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@mwhahaha Thanks for this work.
Given your coverage work and we're in the high 80's on coverage. How about putting a number on the unit test/coverage results? Won't merge if PR coverage falls below 85%?
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.
Sure we can raise that and document it