Contributing¶
The Source Code is hosted on GitHub
For small fixes, opening a new Pull Request in the project’s repo is fine.
For larger issues or new features, please open an issue first.
If you want to add a new driver, check out our docs for creating new splinter drivers.
Before opening a new Pull Request, please ensure the linter and at least platform agnostic tests are passing on your branch.
Requirements¶
Development environments are managed using tox
Generally, tox should be installed with pip:
pip install tox
See tox’s documentation if you need to use another method.
Linter¶
Splinter enforces code standards using various linting tools. They can be run from tox:
tox -e lint
Tests¶
Run¶
The tests are split into two groups: Platform agnostic and Windows-only.
To run the platform agnostic tests:
tox -e tests -- tests/
tox -e tests_selenium4 -- tests/
To run the windows tests:
tox -e tests_windows -- tests/
tox -e tests_windows_selenium4 -- tests/
You can also specify one or more test files to run:
$ tox -e tests_windows_selenium4 -- tests/test_webdriver_firefox.py, tests/test_request_handler.py
Documentation¶
Write¶
Documentation is written using Sphinx, which uses RST.
We use the Read the Docs Sphinx Theme.
Build¶
The build_docs environment is a wrapper around Sphinx’s Makefile. Arguments will be passed to the Makefile. Thus, to build the docs in HTML format:
tox -e build_docs html
The documentation will then be built inside the docs/_build directory.