From 7a2eeb93bda700749a0edf45cffdf87b22b88e64 Mon Sep 17 00:00:00 2001 From: Michael Garbutt Date: Fri, 1 May 2020 22:23:01 +0100 Subject: [PATCH] Added detail to CONTRIBUTING.md --- CONTRIBUTING.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0786fdf4..547f010d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 @@ -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`.