Skip to content

Commit 24fe903

Browse files
authored
Merge branch 'main' into versioning
2 parents 8b02e7f + 8698fda commit 24fe903

28 files changed

+1323
-200
lines changed

.github/workflows/cron.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
3+
name: Cron
4+
5+
on:
6+
schedule:
7+
- cron: "0 6 * * *" # daily at 6am
8+
9+
jobs:
10+
test:
11+
if: github.repository_owner == 'pypa' # suppress noise in forks
12+
uses: ./.github/workflows/test.yml
13+
14+
...
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Test translations
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
paths:
7+
- '**.po'
8+
branches:
9+
- translation/source
10+
push:
11+
paths:
12+
- '**.po'
13+
branches:
14+
- translation/source
15+
16+
permissions:
17+
contents: read
18+
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
21+
cancel-in-progress: true
22+
23+
env:
24+
I18N_BRANCH: translation/source
25+
26+
jobs:
27+
matrix:
28+
runs-on: ubuntu-latest
29+
outputs:
30+
languages: ${{ steps.languages.outputs.languages }}
31+
32+
steps:
33+
- name: Grab the repo src
34+
uses: actions/checkout@v4
35+
with:
36+
ref: ${{ env.I18N_BRANCH }}
37+
38+
- name: List languages
39+
id: languages
40+
working-directory: locales
41+
run: |
42+
list=$(find * -maxdepth 0 -type d | jq -nRc '[inputs]')
43+
echo "languages=$list" >> $GITHUB_OUTPUT
44+
45+
46+
test-translation:
47+
runs-on: ubuntu-latest
48+
needs: matrix
49+
strategy:
50+
fail-fast: false
51+
matrix:
52+
language: ${{fromJson(needs.matrix.outputs.languages)}}
53+
54+
steps:
55+
- name: Grab the repo src
56+
uses: actions/checkout@v4
57+
with:
58+
ref: ${{ env.I18N_BRANCH }}
59+
60+
- name: Set up Python
61+
uses: actions/setup-python@v4
62+
with:
63+
python-version: >-
64+
3.10
65+
66+
- name: Install Python tooling
67+
run: python -m pip install --upgrade nox virtualenv sphinx-lint
68+
69+
- name: Build translated docs in ${{ matrix.language }}
70+
run: nox -s build -- -q -D language=${{ matrix.language }}
71+
72+
- name: Lint translation file
73+
run: sphinx-lint locales/${{ matrix.language }}/LC_MESSAGES/messages.po

.github/workflows/test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ on:
66
branches-ignore:
77
- gh-readonly-queue/** # Temporary merge queue-related GH-made branches
88
pull_request:
9-
schedule:
10-
- cron: "0 6 * * *" # daily at 6am
9+
workflow_call:
1110

1211
concurrency:
1312
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}

.github/workflows/translation.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ env:
1515
jobs:
1616
build:
1717
runs-on: ubuntu-latest
18+
if: github.repository_owner == 'pypa'
1819

1920
steps:
2021
- name: Grab the repo src

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ repos:
3434
- id: rst-inline-touching-normal
3535

3636
- repo: https://github.com/astral-sh/ruff-pre-commit
37-
rev: v0.1.7
37+
rev: v0.1.14
3838
hooks:
3939
- id: ruff
4040
- id: ruff-format

source/conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@
108108
# https://github.com/pypa/packaging.python.org/pull/1308#issuecomment-1775347690
109109
"https://www.breezy-vcs.org/*",
110110
]
111+
linkcheck_retries = 5
112+
# Ignore anchors for links to GitHub project pages -- GitHub adds anchors from
113+
# README.md headings through JavaScript, so Sphinx's linkcheck can't find them
114+
# in the HTML.
115+
linkcheck_anchors_ignore_for_url = [
116+
r"https://github\.com/",
117+
]
111118

112119
# -- Options for extlinks ----------------------------------------------------------
113120
# https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html#configuration

source/glossary.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,8 @@ Glossary
209209
Requirement Specifier
210210

211211
A format used by :ref:`pip` to install packages from a :term:`Package
212-
Index`. For an EBNF diagram of the format, see the
213-
`pkg_resources.Requirement
214-
<https://setuptools.readthedocs.io/en/latest/pkg_resources.html#requirement-objects>`_
215-
entry in the :ref:`setuptools` docs. For example, "foo>=1.3" is a
212+
Index`. For an EBNF diagram of the format, see :ref:`dependency-specifiers`.
213+
For example, "foo>=1.3" is a
216214
requirement specifier, where "foo" is the project name, and the ">=1.3"
217215
portion is the :term:`Version Specifier`
218216

source/guides/hosting-your-own-index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Hosting your own simple repository
66

77

88
If you wish to host your own simple repository [1]_, you can either use a
9-
software package like :doc:`devpi <devpi:index>` or you can use simply create the proper
9+
software package like :doc:`devpi <devpi:index>` or you can simply create the proper
1010
directory structure and use any web server that can serve static files and
1111
generate an autoindex.
1212

source/guides/installing-using-pip-and-virtual-environments.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ shell's ``PATH``.
8888

8989
.. code-block:: bat
9090
91-
.venv\bin\Activate.bat
91+
.venv\Scripts\activate
9292
9393
To confirm the virtual environment is activated, check the location of your
9494
Python interpreter:
@@ -118,7 +118,7 @@ filepath that includes the ``.venv`` directory, by ending with the following:
118118

119119
.. code-block:: bat
120120
121-
.venv\bin\python.exe
121+
.venv\Scripts\python
122122
123123
124124
While a virtual environment is activated, pip will install packages into that

source/guides/using-testpypi.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,13 @@ you're testing has dependencies:
7272
Setting up TestPyPI in :file:`.pypirc`
7373
--------------------------------------
7474

75-
If you want to avoid entering your username, you can configure TestPyPI in
76-
your :file:`$HOME/.pypirc`:
75+
If you want to avoid being prompted for your username and password every time,
76+
you can configure TestPyPI in your :file:`$HOME/.pypirc`:
7777

7878
.. code:: ini
7979
8080
[testpypi]
81-
username = <your TestPyPI username>
81+
username = __token__
82+
password = <your TestPyPI API Token>
8283
8384
For more details, see the :ref:`specification <pypirc>` for :file:`.pypirc`.

0 commit comments

Comments
 (0)