Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
We'd love to accept your patches and contributions to this project. There are
just a few small guidelines you need to follow.

Once you have read them fork the project, make changes in your repository, then
open a pull request once your changes are ready.

## Contributor License Agreement

Contributions to this project must be accompanied by a Contributor License
Expand All @@ -22,3 +25,29 @@ use GitHub pull requests for this purpose. Consult [GitHub Help] for more
information on using pull requests.

[GitHub Help]: https://help.github.com/articles/about-pull-requests/

## Code style

In general, python-fire follows the guidelines in the
[Google Python Style Guide].
In addition, the project follows a convention of:
- An 80 character line length.
- An indentation of 2 spaces in most cases, and 4 for line continuation.
- PascalCase for function and method names.
- No type hints, as described in [PEP 484], to maintain compatibility with
Python versions < 3.5.
- Single quotes around strings, three double quotes around docstrings.

[Google Python Style Guide]: http://google.github.io/styleguide/pyguide.html
[PEP 484]: https://www.python.org/dev/peps/pep-0484

## Testing
python-fire uses Travis CI to run tests on pull requests, however you can run
tests yourself to reduce the chance of issues early on.
To do this, install pytest, mock, termcolor, and hypothesis, then run the tests
by opening a bash terminal in the root of the repository and run `pytest`.

## Linting
Some code style issues may be addressed as part of merging your pull request,
but if you would like to you can also lint your code beforehand. To do this,
open a bash terminal in the root of the repository and run `pylint fire`.