Skip to content

Commit 721d197

Browse files
trallardpre-commit-ci[bot]drammockgabalafouCarreau
authored
ENH - Update translations workflows (#1959)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Daniel McCloy <[email protected]> Co-authored-by: gabalafou <[email protected]> Co-authored-by: M Bussonnier <[email protected]>
1 parent 6da5715 commit 721d197

File tree

19 files changed

+488
-626
lines changed

19 files changed

+488
-626
lines changed

.github/workflows/CI.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ jobs:
7474
- name: "Run tests ✅"
7575
shell: bash
7676
run: |
77-
# this will compile the assets then run the tests
77+
# this will compile the assets and translations then run the tests
7878
# check if there is a specific Sphinx version to test with
79-
# example substitution: tox run -e compile,py39-sphinx61-tests
79+
# example substitution: tox run -e compile-assets,i18n-compile,py39-sphinx61-tests
8080
if [ -n "${{matrix.sphinx-version}}" ]; then
81-
python -Im tox run -e compile,py$(echo ${{ matrix.python-version }} | tr -d .)-sphinx$(echo ${{ matrix.sphinx-version }} | tr -d .)-tests
81+
python -Im tox run -e compile-assets,i18n-compile,py$(echo ${{ matrix.python-version }} | tr -d .)-sphinx$(echo ${{ matrix.sphinx-version }} | tr -d .)-tests
8282
# if not we use the default version
83-
# example substitution: tox run -e compile,py39-tests
83+
# example substitution: tox run -e compile-assets,i18n-compile,py39-tests
8484
else
85-
python -Im tox run -e compile,py$(echo ${{ matrix.python-version }} | tr -d .)-tests
85+
python -Im tox run -e compile,i18n-compile,py$(echo ${{ matrix.python-version }} | tr -d .)-tests
8686
fi
8787
- name: "Upload coverage data to GH artifacts 📤"
8888
if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' && matrix.sphinx-version == 'dev'
@@ -108,7 +108,7 @@ jobs:
108108
graphviz: true
109109
- name: "Run accessibility tests with playwright 🎭"
110110
# build PST, build docs, then run a11y-tests
111-
run: python -Im tox run -e py312-docs,a11y-tests
111+
run: python -Im tox run -m a11y
112112

113113
# Build our docs (PST) on major OSes and check for warnings
114114
build-site:

.github/workflows/prerelease.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: "Run tests ✅ (no coverage)"
3838
run: |
3939
# this will compile the assets then run the tests
40-
python -Im tox run -e compile,py$(echo ${{ matrix.python-version }} | tr -d .)-tests-no-cov
40+
python -Im tox run -e compile-assets,i18n-compile,py$(echo ${{ matrix.python-version }} | tr -d .)-tests-no-cov
4141
echo "PYTEST_ERRORS=$?" >> $GITHUB_ENV
4242
4343
# If either the docs build or the tests resulted in an error, create an issue to note it

.github/workflows/publish.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ jobs:
3939
python-version: "3.9"
4040
pandoc: "False"
4141

42-
- name: "Install gettext for translations 🌐"
43-
run: |
44-
sudo apt-get install gettext
45-
4642
- name: "Build and inspect package 📦"
4743
uses: hynek/build-and-inspect-python-package@v2
4844
id: baipp

docs/community/setup.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ If you are comfortable with and prefer a more manual setup refer to the [](topic
77

88
## Testing pre-release and nightly
99

10-
You can test the alpha, beta
11-
and release candidates of pydata sphinx theme on your your projects. To do so
12-
simply install with pip using the `--pre` flag:
10+
You can test the alpha, beta and release candidates of the PyData Sphinx theme on your projects.
11+
To do so install with pip using the `--pre` flag:
1312

1413
```console
1514
$ pip install --pre pydata-sphinx-theme
@@ -20,9 +19,9 @@ If an `alpha`, `beta` or `rc` is available, pip will install it.
2019
You can use the `--pre` flag in your project's continuous integration test suite
2120
to catch regressions or bugs before their release.
2221

23-
If you are even more adventurous pydata-sphinx-theme has nightly builds, you can try following the
22+
If you are even more adventurous `pydata-sphinx-theme` has nightly builds, you can try following the
2423
instructions provided [on the scientific-python/upload-nightly-action
25-
Readme](https://github.com/scientific-python/upload-nightly-action?tab=readme-ov-file#using-nightly-builds-in-ci)
24+
README](https://github.com/scientific-python/upload-nightly-action?tab=readme-ov-file#using-nightly-builds-in-ci)
2625
on installing nightly wheels.
2726

2827
Installing nightly wheels in your project's CI jobs is a great way to help theme developers catch bugs ahead of
@@ -145,6 +144,14 @@ $ python -m http.server -d docs/_build/html/
145144

146145
This will print a local URL that you can open in a browser to explore the HTML files.
147146

147+
You can also serve the documentation with live-reload using the following command:
148+
149+
```console
150+
$ tox run -e docs-live
151+
```
152+
153+
This command will build the documentation and watch for any changes to the `doc` folder and rebuild the documentation automatically.
154+
148155
### Change content and re-build
149156

150157
Now that you've built the documentation, edit one of the source files to see how the documentation updates with new builds.
@@ -162,7 +169,7 @@ These are then built and bundled with the theme (e.g., `scss` is turned into `cs
162169
To compile the CSS/JS assets with `tox`, run the following command:
163170

164171
```console
165-
$ tox run -e compile
172+
$ tox run -e compile-assets
166173
```
167174

168175
This will compile all assets and place them in the appropriate folder to be used with documentation builds.
@@ -174,12 +181,14 @@ The `sphinx-theme-builder` will bundle these assets automatically when we make a
174181

175182
## Run a development server
176183

177-
You can combine the above two actions (build the docs and compile JS/CSS assets) and run a development server so that changes to `src/` are automatically bundled with the package, and the documentation is immediately reloaded in a live preview window.
184+
You can combine the above two actions (build the docs and compile JS/CSS assets) and run a development server so that
185+
changes to `src/` are automatically bundled with the package, and the documentation is immediately reloaded in a live preview window.
178186

179187
To run the development server with `tox`, run the following command:
180188

181189
```console
182-
$ tox run -e docs-live
190+
# note the -m flag vs. other commands in this guide
191+
$ tox run -m docs-live-server
183192
```
184193

185194
When working on the theme, making changes to any of these directories:

0 commit comments

Comments
 (0)