• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2# Contributing to pyfakefs
3
4We welcome any contributions that help to improve pyfakefs for the community.
5Contributions may include bug reports, bug fixes, new features, infrastructure enhancements, or
6documentation updates.
7
8## How to contribute
9
10### Reporting Bugs
11
12If you think you found a bug in pyfakefs, you can [create an issue](https://help.github.com/articles/creating-an-issue/).
13Before filing the bug, please check, if it still exists in the [master branch](https://github.com/jmcgeheeiv/pyfakefs).
14If you can reproduce the problem, please provide enough information so that it can be reproduced by other developers.
15This includes:
16  * The Operating System
17  * The Python version
18  * A minimal example to reproduce the problem (preferably in the form of a failing test)
19  * The stack trace in case of an unexpected exception.
20For better readability, you may use [markdown code formatting](https://help.github.com/articles/creating-and-highlighting-code-blocks/) for any included code.
21
22### Proposing Enhancements
23
24If you need a specific feature that is not implemented, or have an idea for the next
25exciting gimmick in pyfakefs, you can also create a respective issue.
26Of course - implementing it yourself is the best chance to get it done!
27The next item has some information on doing this.
28
29### Contributing Code
30
31The preferred workflow for contributing code is to
32[fork](https://help.github.com/articles/fork-a-repo/) the [repository](https://github.com/jmcgeheeiv/pyfakefs) on GitHub, clone it,
33develop on a feature branch, and [create a pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork) when done.
34There are a few things to consider for contributing code:
35  * Please use the standard [PEP-8 coding style](https://www.python.org/dev/peps/pep-0008/)
36  (your IDE or tools like [pep8](https://pypi.python.org/pypi/pep8) or [pylint](https://pypi.python.org/pypi/pylint) will help you)
37  * Use the [Google documentation style](https://google.github.io/styleguide/pyguide.html) to document new public classes or methods
38  * Provide unit tests for bug fixes or new functionality - check the existing tests for examples
39  * Provide meaningful commit messages - it is ok to amend the commits to improve the comments
40  * Check that the automatic tests on [Travis](https://travis-ci.org/jmcgeheeiv/pyfakefs)
41  and [AppVeyor](https://ci.appveyor.com/project/jmcgeheeiv/pyfakefs) all pass for your pull request
42  * Be ready to adapt your changes after a code review
43
44### Contributing Documentation
45
46If you want to improve the existing documentation, you can do this also using a pull request.
47You can contribute to:
48  * the source code documentation using [Google documentation style](https://google.github.io/styleguide/pyguide.html)
49  * the [README](https://github.com/jmcgeheeiv/pyfakefs/blob/master/README.md) using [markdown syntax](https://help.github.com/articles/basic-writing-and-formatting-syntax/)
50  * the documentation published on [GitHub Pages](http://jmcgeheeiv.github.io/pyfakefs/),
51   located in the `docs` directory.
52  For building the documentation, you will need [sphinx](http://sphinx.pocoo.org/).
53  * [this file](https://github.com/jmcgeheeiv/pyfakefs/blob/master/CONTRIBUTING.md)
54  if you want to enhance the contributing guide itself
55
56Thanks for taking the time to contribute to pyfakefs!
57