Contributing to PyFilesystem¶
Pull Requests are very welcome for this project!
For bug fixes or new features, please file an issue before submitting a pull request. If the change isn’t trivial, it may be best to wait for feedback. For a quicker response, contact Will McGugan directly.
Most of the guidelines that follow can be checked with a particular
tox environment. Having it installed will
help you develop and verify your code locally without having to wait for
our Continuous Integration pipeline to finish.
New code should have unit tests. We strive to have near 100% coverage. Get in touch, if you need assistance with the tests. You shouldn’t refrain from opening a Pull Request even if all the tests were not added yet, or if not all of them are passing yet.
The dependency for running the tests can be found in the
If you’re using
tox, you won’t have to install them manually. Otherwise,
they can be installed with
$ pip install -r tests/requirements.txt
Simply run in the repository folder to execute the tests for all available environments:
Since this can take some time, you can use a single environment to run tests only once, for instance to run tests only with Python 3.9:
$ tox -e py39
This project runs on Python2.7 and Python3.X. Python2.7 will be dropped at
some point, but for now, please maintain compatibility. PyFilesystem2 uses
six library to write version-agnostic
The code (including the tests) should follow PEP8. You can check for the code style with:
$ tox -e codestyle
Please format new code with black, using the default settings. You can check whether the code is well-formatted with:
$ tox -e codeformat
$ pip install -r docs/requirements.txt
Run the following command to build the HTML documentation:
$ python setup.py build_sphinx
The documentation index will be written to the