Skip to content
Myr

contributing.md

This file

Path

docs/contributing.md

44 lines · 1.1 KiB · Markdown

Last changed by

Click-specific contribution guidelines (#3333)Rowlando13before adoptiond5fbd32

History of this file

Take it

Randomized and parallel tests (#3151)Rowlando13before adoptiona5cb82f

lines 1–2why, one step back
1# Contributing
2

Click-specific contribution guidelines (#3333)Rowlando13before adoptiond5fbd32

lines 3–8why, one step back
3This is a quick reference for Click-specific development
4tasks. For setting up the development environment and the5general contribution workflow, see the Pallets [quick6reference](https://palletsprojects.com/contributing/quick/)7and the [detailed contributing8guide](https://palletsprojects.com/contributing/).

Randomized and parallel tests (#3151)Rowlando13before adoptiona5cb82f

lines 9–13why, one step back
9
10## Extra Test Environments1112Click includes some extra test environments:13

Click-specific contribution guidelines (#3333)Rowlando13before adoptiond5fbd32

lines 14–15why, one step back
14- `tox r -e stress` runs stress tests for race conditions
15 in Click's test runner.

Randomized and parallel tests (#3151)Rowlando13before adoptiona5cb82f

lines 16–20why, one step back
16
17 ```shell-session18 $ tox r -e stress19 ```20

Click-specific contribution guidelines (#3333)Rowlando13before adoptiond5fbd32

lines 21–22why, one step back
21- `tox r -e random` runs tests in parallel in a random
22 order to detect test pollution.

Randomized and parallel tests (#3151)Rowlando13before adoptiona5cb82f

lines 23–27why, one step back
23
24 ```shell-session25 $ tox r -e random26 ```27

Click-specific contribution guidelines (#3333)Rowlando13before adoptiond5fbd32

lines 28–44why, one step back
28- A CI workflow (`.github/workflows/test-flask.yaml`)
29 runs Flask's test suite to catch downstream30 regressions.3132## Code Style3334Avoid ternary expressions (`x if cond else y`): coverage35cannot measure both branches. Use an explicit `if`/`else`36block instead.3738Do not add unnecessary dependencies. If a feature can be39implemented with the standard library, do not pull in an40external package for it.4142## Formatting4344Wrap lines in Markdown files at 80 characters.