Skip to content
Myr

Update contributing docs (#1011)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* Update contributing docs * Update docs/contributing.md Co-authored-by: Josep Cugat <jcugat@gmail.com> * Update docs/contributing.md Co-authored-by: Josep Cugat <jcugat@gmail.com> * Update docs/contributing.md Co-authored-by: Josep Cugat <jcugat@gmail.com>

authored by Yeray Diaz Diaz · committed by GitHub · parent 620b067 · Browse files · 7 files+18 added−10 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: Josep Cugat <jcugat@gmail.com>

Diff stats

7 files+18 added−10 removed

  • other:+18 added−10 removed

7 files+18 added−10 removed

added:docs/img/gh-actions-fail-check.pngbinary

A binary file, added.

added:docs/img/gh-actions-fail-test.pngbinary

A binary file, added.

added:docs/img/gh-actions-fail.pngbinary

A binary file, added.

deleted:docs/img/travis-fail-check.pngbinary

A binary file, deleted.

deleted:docs/img/travis-fail-test.pngbinary

A binary file, deleted.

deleted:docs/img/travis-fail.pngbinary

A binary file, deleted.

modified:docs/contributing.md+18 added-10 removed
82 unmodified lines
8384To run the documentation site locally (useful for previewing changes), use:8586```shell87$ scripts/docs-serve87$ scripts/docs88```8990## Resolving Build / Travis Failures9192Once you've submitted your pull request, the test suite will automatically run, and the results will show up in GitHub.93If the test suite fails, you'll want to click through to the "Details" link, and try to identify why the test suite failed.9495<p align="center" style="margin: 0 0 10px">96 <img src="https://raw.githubusercontent.com/encode/httpx/master/docs/img/travis-fail.png" alt='Failing PR commit status'>96 <img src="https://raw.githubusercontent.com/encode/httpx/master/docs/img/gh-actions-fail.png" alt='Failing PR commit status'>97</p>9899Here are some common ways the test suite can fail:100101### Check Job Failed102103<p align="center" style="margin: 0 0 10px">104 <img src="https://raw.githubusercontent.com/encode/httpx/master/docs/img/travis-fail-check.png" alt='Failing Travis lint job'>104 <img src="https://raw.githubusercontent.com/encode/httpx/master/docs/img/gh-actions-fail-check.png" alt='Failing GitHub action lint job'>105</p>106107This job failing means there is either a code formatting issue or type-annotation issue.108You can look at the job output to figure out why it's failed or within a shell run:
12 unmodified lines
121122### Python 3.X Job Failed123124<p align="center" style="margin: 0 0 10px">125 <img src="https://raw.githubusercontent.com/encode/httpx/master/docs/img/travis-fail-test.png" alt='Failing Travis test job'>125 <img src="https://raw.githubusercontent.com/encode/httpx/master/docs/img/gh-actions-fail-test.png" alt='Failing GitHub action test job'>126</p>127128This job failing means the unit tests failed or not all code paths are covered by unit tests.129130If tests are failing you will see this message under the coverage report:131132`=== 1 failed, 435 passed, 1 skipped, 1 xfailed in 11.09s ===`133134If tests succeed but coverage isn't 100% you will see this message under the coverage report:134If tests succeed but coverage doesn't reach our current threshold, you will see this135message under the coverage report:136137`FAIL Required test coverage of 100% not reached. Total coverage: 99.00%`138138Look at the [coverage report from codecov](https://codecov.io/gh/encode/httpx/pulls)139for the pull request for help debugging coverage.140139## Releasing140141*This section is targeted at HTTPX maintainers.*142
7 unmodified lines
150 - Try sorting entries in descending order of impact / importance.151 - Keep it concise and to-the-point. 🎯152- **A version bump**: see `__version__.py`.153156For an example, see [#362](https://github.com/encode/httpx/pull/362).154For an example, see [#1006](https://github.com/encode/httpx/pull/1006).155158Once the release PR is merged, run `$ scripts/publish` to publish the new release to PyPI.156Once the release PR is merged, create a157[new release](https://github.com/encode/httpx/releases/new) including:158159- Tag version like `0.13.3`.160- Release title `Version 0.13.3`161- Description copied from the changelog.162163Once created this release will be automatically uploaded to PyPI.164165If something goes wrong with the PyPI job the release can be published using the166`scripts/publish` script.167168## Development proxy setup169170To test and debug requests via a proxy it's best to run a proxy server locally.171Any server should do but HTTPCore's test suite uses
52 unmodified lines