Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f7a84cc

Browse files
committed
Merge branch 'main' into add-gr-translation
2 parents 8a5e998 + 15f94c0 commit f7a84cc

18 files changed

+1223
-729
lines changed

.coveragerc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# .coveragerc to control coverage.py
2+
3+
[report]
4+
# Regexes for lines to exclude from consideration
5+
exclude_also =
6+
# Don't complain if non-runnable code isn't run:
7+
if __name__ == .__main__.:
8+
if TYPE_CHECKING:

.github/workflows/lint.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@ name: Lint
22

33
on: [push, pull_request, workflow_dispatch]
44

5+
permissions: {}
6+
57
env:
68
FORCE_COLOR: 1
79
PIP_DISABLE_PIP_VERSION_CHECK: 1
810

9-
permissions:
10-
contents: read
11-
1211
jobs:
1312
lint:
1413
runs-on: ubuntu-latest
1514

1615
steps:
1716
- uses: actions/checkout@v4
17+
with:
18+
persist-credentials: false
1819
- uses: actions/setup-python@v5
1920
with:
2021
python-version: "3.x"

.github/workflows/test.yml

Lines changed: 62 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,80 @@
11
name: Test
22

3-
on: [push, pull_request, workflow_dispatch]
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
47

5-
permissions:
6-
contents: read
8+
permissions: {}
79

810
env:
911
FORCE_COLOR: 1
1012

1113
jobs:
12-
test:
14+
integration:
15+
name: Integration test
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
persist-credentials: false
21+
- uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.13"
24+
25+
- name: Set up requirements
26+
run: |
27+
python -m pip install --upgrade pip
28+
python -m pip install -r requirements.txt
29+
30+
- name: Build documentation
31+
run: >
32+
python ./build_docs.py
33+
--quick
34+
--build-root ./build_root
35+
--www-root ./www
36+
--log-directory ./logs
37+
--group "$(id -g)"
38+
--skip-cache-invalidation
39+
--languages en
40+
--branches 3.14
41+
42+
- name: Upload documentation
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: www-root
46+
path: ./www
47+
retention-days: 2
48+
49+
unit:
50+
name: Unit tests
1351
runs-on: ${{ matrix.os }}
1452
strategy:
1553
fail-fast: false
1654
matrix:
1755
python-version: ["3.13", "3.14"]
18-
os: [ubuntu-latest]
56+
os: [windows-latest, macos-latest, ubuntu-latest]
1957

2058
steps:
21-
- uses: actions/checkout@v4
59+
- uses: actions/checkout@v4
60+
with:
61+
persist-credentials: false
62+
63+
- name: Set up Python ${{ matrix.python-version }}
64+
uses: actions/setup-python@v5
65+
with:
66+
python-version: ${{ matrix.python-version }}
67+
allow-prereleases: true
2268

23-
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v5
25-
with:
26-
python-version: ${{ matrix.python-version }}
27-
allow-prereleases: true
69+
- name: Install uv
70+
uses: hynek/setup-cached-uv@v2
2871

29-
- name: Install uv
30-
uses: hynek/setup-cached-uv@v2
72+
- name: Tox tests
73+
run: uvx --with tox-uv tox -e py
3174

32-
- name: Tox tests
33-
run: |
34-
uvx --with tox-uv tox -e py
75+
- name: Upload coverage
76+
uses: codecov/codecov-action@v5
77+
with:
78+
flags: ${{ matrix.os }}
79+
name: Python ${{ matrix.python-version }}
80+
token: ${{ secrets.CODECOV_ORG_TOKEN }}

.pre-commit-config.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,37 +14,44 @@ repos:
1414
- id: trailing-whitespace
1515

1616
- repo: https://github.com/astral-sh/ruff-pre-commit
17-
rev: v0.7.1
17+
rev: v0.11.5
1818
hooks:
19+
- id: ruff
20+
args: [--fix]
1921
- id: ruff-format
2022

2123
- repo: https://github.com/python-jsonschema/check-jsonschema
22-
rev: 0.29.4
24+
rev: 0.31.1
2325
hooks:
2426
- id: check-github-workflows
2527

2628
- repo: https://github.com/rhysd/actionlint
27-
rev: v1.7.3
29+
rev: v1.7.7
2830
hooks:
2931
- id: actionlint
3032

33+
- repo: https://github.com/woodruffw/zizmor-pre-commit
34+
rev: v1.3.1
35+
hooks:
36+
- id: zizmor
37+
3138
- repo: https://github.com/tox-dev/pyproject-fmt
3239
rev: v2.5.0
3340
hooks:
3441
- id: pyproject-fmt
3542

3643
- repo: https://github.com/abravalheri/validate-pyproject
37-
rev: v0.22
44+
rev: v0.23
3845
hooks:
3946
- id: validate-pyproject
4047

4148
- repo: https://github.com/tox-dev/tox-ini-fmt
42-
rev: 1.4.1
49+
rev: 1.5.0
4350
hooks:
4451
- id: tox-ini-fmt
4552

4653
- repo: https://github.com/rbubley/mirrors-prettier
47-
rev: v3.3.3
54+
rev: v3.5.1
4855
hooks:
4956
- id: prettier
5057
files: templates/switchers.js

.ruff.toml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
target-version = "py313" # Pin Ruff to Python 3.13
2+
line-length = 88
3+
output-format = "full"
4+
5+
[format]
6+
preview = true
7+
docstring-code-format = true
8+
9+
[lint]
10+
preview = true
11+
select = [
12+
"C4", # flake8-comprehensions
13+
"B", # flake8-bugbear
14+
"E", # pycodestyle
15+
"F", # pyflakes
16+
"FA", # flake8-future-annotations
17+
"FLY", # flynt
18+
"G", # flake8-logging-format
19+
"I", # isort
20+
"N", # pep8-naming
21+
"PERF", # perflint
22+
"PGH", # pygrep-hooks
23+
"PT", # flake8-pytest-style
24+
"TC", # flake8-type-checking
25+
"UP", # pyupgrade
26+
"W", # pycodestyle
27+
]
28+
ignore = [
29+
"E501", # Ignore line length errors (we use auto-formatting)
30+
]
31+
32+
[lint.flake8-type-checking]
33+
exempt-modules = []
34+
strict = true

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# docsbuild-scripts
2+
3+
[![GitHub Actions status](https://github.com/python/docsbuild-scripts/actions/workflows/test.yml/badge.svg)](https://github.com/python/docsbuild-scripts/actions/workflows/test.yml)
4+
[![Codecov](https://codecov.io/gh/python/docsbuild-scripts/branch/main/graph/badge.svg)](https://codecov.io/gh/python/docsbuild-scripts)
5+
16
This repository contains scripts for automatically building the Python
27
documentation on [docs.python.org](https://docs.python.org).
38

@@ -12,7 +17,7 @@ python3 ./build_docs.py --quick --build-root ./build_root --www-root ./www --log
1217
```
1318

1419
If you don't need to build all translations of all branches, add
15-
`--language en --branch main`.
20+
`--languages en --branches main`.
1621

1722

1823
## Check current version
@@ -34,9 +39,9 @@ of Sphinx we're using where:
3439
3.9 ø sphinx==2.4.4 needs_sphinx='1.8'
3540
3.10 ø sphinx==3.4.3 needs_sphinx='3.2'
3641
3.11 ø sphinx~=7.2.0 needs_sphinx='4.2'
37-
3.12 ø sphinx~=8.1.0 needs_sphinx='7.2.6'
38-
3.13 ø sphinx~=8.1.0 needs_sphinx='7.2.6'
39-
3.14 ø sphinx~=8.1.0 needs_sphinx='7.2.6'
42+
3.12 ø sphinx~=8.2.0 needs_sphinx='8.2.0'
43+
3.13 ø sphinx~=8.2.0 needs_sphinx='8.2.0'
44+
3.14 ø sphinx~=8.2.0 needs_sphinx='8.2.0'
4045
========= ============= ================== ====================
4146

4247
Sphinx build as seen on docs.python.org:
@@ -47,9 +52,9 @@ of Sphinx we're using where:
4752
3.9 2.4.4 2.4.4 2.4.4 2.4.4 2.4.4 2.4.4 2.4.4 2.4.4 2.4.4 2.4.4 2.4.4 2.4.4 2.4.4
4853
3.10 3.4.3 3.4.3 3.4.3 3.4.3 3.4.3 3.4.3 3.4.3 3.4.3 3.4.3 3.4.3 3.4.3 3.4.3 3.4.3
4954
3.11 7.2.6 7.2.6 7.2.6 7.2.6 7.2.6 7.2.6 7.2.6 7.2.6 7.2.6 7.2.6 7.2.6 7.2.6 7.2.6
50-
3.12 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3
51-
3.13 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3
52-
3.14 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3 8.1.3
55+
3.12 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3
56+
3.13 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3
57+
3.14 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3 8.2.3
5358
========= ===== ===== ===== ===== ===== ===== ===== ===== ======= ===== ===== ======= =======
5459

5560
## Manually rebuild a branch
@@ -66,5 +71,5 @@ To manually rebuild a branch, for example 3.11:
6671
ssh docs.nyc1.psf.io
6772
sudo su --shell=/bin/bash docsbuild
6873
screen -DUR # Rejoin screen session if it exists, otherwise create a new one
69-
/srv/docsbuild/venv/bin/python /srv/docsbuild/scripts/build_docs.py --branch 3.11
74+
/srv/docsbuild/venv/bin/python /srv/docsbuild/scripts/build_docs.py --force --branch 3.11
7075
```

0 commit comments

Comments
 (0)