Read and contribute to Cheroot#
Make sure you read the README. Also ensure you set up pre-commit utility correctly and tests pass in GitHub Actions CI/CD workflows.
Submitting Pull Requests#
If you’re changing the structure of the repository please create an issue first. Don’t forget to write appropriate test cases, add them into CI process if applicable and make the GitHub Actions CI/CD build pass.
Sync (preferably rebase) your feature branch with upstream regularly to make us able to merge your PR seamlessly.
Submitting bug reports#
Make sure you are on latest changes and that you re-ran this command tox
after updating your local repository. If you can, please provide more
information about your environment such as browser, operating system,
python version, and any other related software versions. It is also helpful to
post a markdown snippet demonstrating minimum reproducible example of an issue.
Also#
See Contributing in the CherryPy docs.
First-time setup#
You need to install Python 3 which is required for building docs. For example, Python 3.7.
Then, create and activate a virtual environment. And install tox.
Please, identify yourself:
$ git config --global user.name "firstname lastname" $ git config --global user.email yourname@example.com
Use the address bound to your GitHub account so that the commits would be linked to your profile.
Choose an editor for Git:
$ git config --global core.editor vim
Create and log in to a GitHub account
Fork Cheroot to your GitHub account by clicking the Fork button
Clone your fork locally:
$ git clone https://github.com/{username}/cheroot $ cd cheroot
To create a new branch and switch to it:
$ git checkout -b patch/some_fix
Write your code#
Please, use PEP 8
Once you finished coding, you are recommended to do the following steps:#
Run tests with tox
Run one test with Python3.6:
$ tox -e py36 -- cheroot/test/test_name.py
``tox`` — Run all tests using the Python version where Python Runtime Services
command
currently points to which is specified in tox
settings:
envlist = python
minversion = 3.5.3
Run linters and all tests against several Python interpreters:
$ tox -e pre-commit,py27,py37 # etc.
Run the pre-commit linting suite:
$ tox -e pre-commit
git add your files
Write good commit messages when checking in your changes to Git
Building the docs#
To build the docs from a checked out source, run:
$ tox -e build-docs
Open the documentation:
$ xdg-open build/html/index.html
$ open build/html/index.html
Please, open build/html/index.html
in your browser.
Also, one can serve docs using a built-in static files server. This is preferable because of possible CSRF issues.:
$ python3 -m http.server --directory build/html/ 8000
After that, you can open http://localhost:8000/ in your browser.
Read more about Sphinx.