Contributing to pyfakefs
We welcome any contributions that help to improve pyfakefs for the community. Contributions may include bug reports, bug fixes, new features, infrastructure enhancements, or documentation updates.
How to contribute
If you think you found a bug in pyfakefs, you can create an issue. Before filing the bug, please check, if it still exists in the master branch. If you can reproduce the problem, please provide enough information so that it can be reproduced by other developers. This includes:
- The Operating System
- The Python version
- A minimal example to reproduce the problem (preferably in the form of a failing test)
- The stack trace in case of an unexpected exception. For better readability, you may use markdown code formatting for any included code.
If you need a specific feature that is not implemented, or have an idea for the next exciting gimmick in pyfakefs, you can also create a respective issue. Of course - implementing it yourself is the best chance to get it done! The next item has some information on doing this.
The preferred workflow for contributing code is to fork the repository on GitHub, clone it, develop on a feature branch, and create a pull request when done. There are a few things to consider for contributing code:
- Please use the standard PEP-8 coding style (your IDE or tools like pep8 or pylint will help you)
- Use the Google documentation style to document new public classes or methods
- Provide unit tests for bug fixes or new functionality - check the existing tests for examples
- Provide meaningful commit messages - it is ok to amend the commits to improve the comments
- Check that the automatic tests on Travis and AppVeyor all pass for your pull request
- Be ready to adapt your changes after a code review
If you want to improve the existing documentation, you can do this also using a pull request. You can contribute to:
- the source code documentation using Google documentation style
- the README using markdown syntax
- the documentation published on GitHub Pages,
located in the
docsdirectory. For building the documentation, you will need sphinx.
- this file if you want to enhance the contributing guide itself
Thanks for taking the time to contribute to pyfakefs!