@@ -4,28 +4,63 @@ Contributing
44Bugs
55----
66
7- All source and content bugs for python.org should be filed as issues on the
8- GitHub _. Please be sure to look at the existing issues to see if someone has
9- already submitted it.
7+ File bugs as issues on GitHub _. Check existing issues first to avoid
8+ duplicates.
109
1110Code
1211----
1312
14- The source for python.org is open and licensed under the `Apache 2 license <license _>`_.
15- To contribute to either the code or documentation please fork the pythondotorg _
16- repository and submit a pull request.
13+ The source is licensed under the `Apache 2 license <license _>`_. Fork the
14+ pythondotorg _ repository, create a branch, and open a pull request.
1715
18- See :doc: `install ` for setup your development environment.
16+ See :doc: `install ` to set up your development environment.
1917
20- While all contributions are welcome and valuable it will be easier for the
21- maintainers if you follow good coding practices such as:
18+ Before submitting a PR
19+ ~~~~~~~~~~~~~~~~~~~~~~
2220
23- - Write readable code following :pep: `8 ` guidelines
24- - Write tests for the code you are adding or changing
25- - Submit focused pull requests that address a single smaller issue whenever
26- possible vs a large pull request that touches many parts of the system
27- - Submit descriptive information with your pull request as to the reason and
28- methods behind your change
21+ 1. Run the test suite and make sure it passes:
22+
23+ .. code-block :: bash
24+
25+ make test
26+
27+ 2. Run the linter and formatter:
28+
29+ .. code-block :: bash
30+
31+ make lint
32+ make fmt
33+
34+ 3. If you changed models, check for missing migrations:
35+
36+ .. code-block :: bash
37+
38+ make migrations
39+
40+ 4. Write tests for any new or changed code.
41+
42+ 5. Keep pull requests focused — one issue or feature per PR is easier to
43+ review than a large PR that touches many parts of the system.
44+
45+ 6. Include a clear description of what your PR does and why.
46+
47+ CI checks
48+ ~~~~~~~~~
49+
50+ GitHub Actions runs on every push and pull request. It will:
51+
52+ - Check for ungenerated migrations (``makemigrations --check --dry-run ``)
53+ - Run the full test suite
54+ - Enforce a **75% minimum test coverage ** threshold
55+
56+ PRs that fail CI won't be merged.
57+
58+ Code style
59+ ~~~~~~~~~~
60+
61+ - Follow :pep: `8 `
62+ - Use ``make lint `` (ruff) to catch issues and ``make fmt `` (ruff) to
63+ auto-format
2964
3065.. _GitHub : https://github.com/python/pythondotorg/issues
3166.. _license : https://github.com/python/pythondotorg/blob/main/LICENSE
0 commit comments