Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH - Update translations workflows #1959

Merged
merged 41 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
f0f71d2
Add I18n commands to tox.ini
trallard Aug 16, 2024
d95545f
Add translation commands to tox.ini
trallard Aug 19, 2024
9e412fb
Remove gettext install
trallard Aug 19, 2024
7dd05ed
Update contribution guide - translation
trallard Aug 19, 2024
0677b17
Update user guide - translation
trallard Aug 19, 2024
256bcd0
:fire: Remove noxfile
trallard Aug 19, 2024
16543a2
:fire: Remove nox docs
trallard Aug 19, 2024
5444932
Update theme's POT file
trallard Aug 19, 2024
e9b8d72
Update locale files
trallard Aug 19, 2024
8e61d5c
[pre-commit.ci] Automatic linting and formatting fixes
pre-commit-ci[bot] Aug 19, 2024
da59b0c
Update locale files
trallard Aug 19, 2024
151811c
[pre-commit.ci] Automatic linting and formatting fixes
pre-commit-ci[bot] Aug 19, 2024
b2eacde
Update tox file - separate assets and translations compilation
trallard Aug 20, 2024
c7854b6
Remove fuzzy comments from catalogues
trallard Aug 20, 2024
d0a9dba
Update translations docs - fuzzy comments
trallard Aug 20, 2024
b50baf6
Remove PO compilation from webpack.config
trallard Aug 20, 2024
7b8282f
Add note about internationalisation
trallard Aug 20, 2024
caa761e
Remove fuzzy strings
trallard Aug 20, 2024
a1608e7
[pre-commit.ci] Automatic linting and formatting fixes
pre-commit-ci[bot] Aug 20, 2024
cebb954
Apply suggestions from code review
trallard Aug 20, 2024
c7e03ec
[pre-commit.ci] Automatic linting and formatting fixes
pre-commit-ci[bot] Aug 20, 2024
9128e79
[pre-commit.ci] Automatic linting and formatting fixes
pre-commit-ci[bot] Aug 20, 2024
f283fb8
Apply suggestions from code review
trallard Aug 29, 2024
4a38eee
Apply suggestions from code review
trallard Aug 29, 2024
f7cc2e0
Merge branch 'trallard/update-translations' of https://github.com/tra…
trallard Aug 29, 2024
4209a74
Update tox.ini - comments and cleanup
trallard Aug 29, 2024
9e54b3f
Update translation docs
trallard Aug 29, 2024
c143597
:wrench: Update tox.ini file - simplify translations
trallard Aug 30, 2024
c51f208
:recycle: Update all references to compile to compile-assets
trallard Aug 30, 2024
f39c8d4
Update localization docs
trallard Aug 30, 2024
369e3a0
:pencil2: Fix references in docs
trallard Aug 30, 2024
c008344
Update a11y tests call in CI
trallard Aug 30, 2024
acf54a6
Update translation docs
trallard Aug 30, 2024
aecd98f
Update docs and command regardin docs-live
trallard Aug 30, 2024
15f8f05
Replace guide to use docs-live-server
trallard Aug 30, 2024
66e0f71
:pencil2: Add missing `
trallard Aug 30, 2024
10a1d77
Update docs/community/topics/i18n.rst
Carreau Sep 2, 2024
e63edde
Revert inline reference
trallard Sep 2, 2024
7666727
Merge branch 'main' into trallard/update-translations
trallard Sep 2, 2024
b74c71f
Update comments
trallard Sep 2, 2024
bb7282c
:rotating_light: Lint and format files
trallard Sep 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ jobs:
run: |
# this will compile the assets and translations then run the tests
# check if there is a specific Sphinx version to test with
# example substitution: tox run -e compile,py39-sphinx61-tests
# example substitution: tox run -e compile-assets,i18n-compile,py39-sphinx61-tests
if [ -n "${{matrix.sphinx-version}}" ]; then
python -Im tox run -e compile,i18n-compile,py$(echo ${{ matrix.python-version }} | tr -d .)-sphinx$(echo ${{ matrix.sphinx-version }} | tr -d .)-tests
python -Im tox run -e compile-assets,i18n-compile,py$(echo ${{ matrix.python-version }} | tr -d .)-sphinx$(echo ${{ matrix.sphinx-version }} | tr -d .)-tests
# if not we use the default version
# example substitution: tox run -e compile,py39-tests
# example substitution: tox run -e compile-assets,i18n-compile,py39-tests
else
python -Im tox run -e compile,i18n-compile,py$(echo ${{ matrix.python-version }} | tr -d .)-tests
fi
Expand All @@ -107,7 +107,7 @@ jobs:
graphviz: true
- name: "Run accessibility tests with playwright 🎭"
# build PST, build docs, then run a11y-tests
run: python -Im tox run -e py312-docs,a11y-tests
run: python -Im tox run -m a11y

# Build our docs (PST) on major OSes and check for warnings
build-site:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: "Run tests ✅ (no coverage)"
run: |
# this will compile the assets then run the tests
python -Im tox run -e compile,py$(echo ${{ matrix.python-version }} | tr -d .)-tests-no-cov
python -Im tox run -e compile-assets,i18n-compile,py$(echo ${{ matrix.python-version }} | tr -d .)-tests-no-cov
echo "PYTEST_ERRORS=$?" >> $GITHUB_ENV

# If either the docs build or the tests resulted in an error, create an issue to note it
Expand Down
25 changes: 17 additions & 8 deletions docs/community/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ If you are comfortable with and prefer a more manual setup refer to the [](topic

## Testing pre-release and nightly

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

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

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

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

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

You can also serve the documentation with live-reload using the following command:

```console
$ tox run -e docs-live
```

This command will build the documentation and watch for any changes to the `doc` folder and rebuild the documentation automatically.

### Change content and re-build

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

```console
$ tox run -e compile
$ tox run -e compile-assets
```

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

## Run a development server

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.
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.

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

```console
$ tox run -e docs-live
# note the -m flag vs. other commands in this guide
$ tox run -m docs-live-server
```

When working on the theme, making changes to any of these directories:
Expand Down
Loading
Loading