From 890ee6ff91c653b7af320f237338cd184c77c303 Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Thu, 21 Nov 2024 12:28:58 +0000 Subject: [PATCH 01/31] :construction_worker: Update release workflow --- .github/workflows/publish.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 16f400365..1a86b108a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,7 +1,6 @@ -# This will run every time a release is created and published. -# It calls our tests workflow via a `workflow_call`, and if tests pass -# then it triggers our upload to PyPI for a new release. -name: Publish to PyPI +# This workflow runs every day at 2AM UTC to publish a new nightly release to Anaconda.org +# and every time there is a PST to make sure it gets uploaded to PyPI. +name: Publish PST package on: release: types: @@ -45,7 +44,7 @@ jobs: - run: echo Packages can be found at ${{ steps.baipp.outputs.dist }} - release-pypi: + release-PST: runs-on: ubuntu-latest needs: [build-package] permissions: From e89a4904106fad570053daf6fd563dcb705c284d Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Thu, 21 Nov 2024 12:37:03 +0000 Subject: [PATCH 02/31] :construction_worker: Add check for docs links --- .github/workflows/CI.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 68ecdca2a..417ab0729 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -172,7 +172,7 @@ jobs: runs: 3 # Multiple runs to reduce variance coverage: - name: "Check coverage" + name: "check coverage" needs: run-pytest runs-on: ubuntu-latest # avoid running this on schedule, releases, or workflow_call @@ -249,3 +249,21 @@ jobs: name: profile-results path: docbuild_profile.svg if-no-files-found: ignore + + # build the docs and check for broken links + check-docs-links: + name: "check PST docs links" + runs-on: ubuntu-latest + steps: + - name: "Checkout repository 🛎" + uses: actions/checkout@v4 + - name: "Setup CI environment 🛠" + uses: ./.github/actions/set-dev-env + with: + python-version: ${{ env.DEFAULT_PYTHON_VERSION }} + pandoc: true + graphviz: true + - name: "Build docs and check links 📖" + shell: bash + run: | + python -Im tox run -e docs-linkcheck From 865158a4cea08562ccfb04fc1341800e6ccae0c1 Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Thu, 21 Nov 2024 15:26:15 +0000 Subject: [PATCH 03/31] :wrench: Add linkcheck for docs --- docs/conf.py | 12 ++++++++++++ tox.ini | 11 ++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 262589fa0..fb8d92f24 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -326,3 +326,15 @@ def setup(app: Sphinx) -> Dict[str, Any]: "parallel_read_safe": True, "parallel_write_safe": True, } + + +linkcheck_anchors_ignore = [ + # match any anchor that starts with a '/' since this is an invalid HTML anchor + r"\/.*", +] + +linkcheck_ignore = [ + # The crawler gets "Anchor not found" for GitHub anchors + r"https://github.com.+?#L\d+", + r"https://source.unsplash.com/.+", +] diff --git a/tox.ini b/tox.ini index 5e062a708..91bf3de01 100644 --- a/tox.ini +++ b/tox.ini @@ -41,7 +41,6 @@ commands = # can substitute the target directory with any other directory by calling: # tox run -e docs-no-checks -- path/to/other/directory docs-no-checks: sphinx-build {posargs:audit}/site {posargs:audit}/_build - docs-linkcheck: sphinx-build -W -b linkcheck docs/ docs/_build/html --keep-going # example tox run -e py39-profile-docs -- -o profile.svg -n 100 profile-docs: python ./tools/profile.py {posargs} @@ -143,6 +142,16 @@ commands = docs-live-theme: stb serve docs --open-browser --re-ignore=locale|api|_build|\.jupyterlite\.doit\.db docs-live: sphinx-autobuild docs/ docs/_build/html --open-browser --re-ignore=locale|api|_build|\.jupyterlite\.doit\.db +# check external links in the documentation +# tox run -e docs-linkcheck +[testenv:docs-linkcheck] +description = "Check external links in the documentation" +extras = {[testenv:docs-no-checks]extras} +allowlist_externals = bash +commands = + docs-linkcheck: sphinx-build -b linkcheck docs/ docs/_build/linkcheck -W --keep-going + bash "echo 'Linkcheck complete; see docs/_build/linkcheck/output.txt for any errors'" + # extract translatable files into the POT file and update locale PO files # tox run -e i18n-extract # this will update all locales, to update a single locale you can From e93cf6cc39c1da409ddd84e3450a631ff285961b Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Thu, 21 Nov 2024 15:37:16 +0000 Subject: [PATCH 04/31] :construction_worker: Separate docs CI into another workflow --- .github/workflows/CI.yml | 88 +----------------------------- .github/workflows/docs.yml | 109 +++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+), 87 deletions(-) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 417ab0729..88adf8e1d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -103,76 +103,8 @@ jobs: # build PST, build docs, then run a11y-tests run: python -Im tox run -m a11y - # Build our docs (PST) on major OSes and check for warnings - build-site: - name: "build PST docs" - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.12"] - include: - # oldest Python version with the oldest Sphinx version - - os: ubuntu-latest - python-version: "3.9" - sphinx-version: "6.1" - runs-on: ${{ matrix.os }} - steps: - - name: "Checkout repository 🛎" - uses: actions/checkout@v4 - - name: "Setup CI environment 🛠" - uses: ./.github/actions/set-dev-env - with: - python-version: ${{ matrix.python-version }} - pandoc: true - graphviz: true - - name: "Build docs and check for warnings 📖" - shell: bash - run: | - # check if there is a specific Sphinx version to build with - # example substitution: tox run -e py39-sphinx61-docs - if [ -n "${{matrix.sphinx-version}}" ]; then - python -Im tox run -e py$(echo ${{ matrix.python-version }} | tr -d .)-sphinx$(echo ${{ matrix.sphinx-version }} | tr -d .)-docs - # build with the default Sphinx version - # example substitution: tox run -e py312-docs - else - python -Im tox run -e py$(echo ${{ matrix.python-version }} | tr -d .)-docs - fi - - # Run Lighthouse audits on the built site (kitchen-sink only) - lighthouse-audit: - needs: build-site - runs-on: ubuntu-latest - env: - DOCS_DIR: "audit" - steps: - - name: "Checkout repository 🛎" - uses: actions/checkout@v4 - - name: "Setup CI environment 🛠" - uses: ./.github/actions/set-dev-env - with: - python-version: ${{ env.DEFAULT_PYTHON_VERSION }} - - name: "Copy kitchen sink to a tiny site" - run: | - mkdir -p ${{ env.DOCS_DIR }}/site - cp -r docs/examples/kitchen-sink ${{ env.DOCS_DIR }}/site/kitchen-sink - printf "Test\n====\n\n.. toctree::\n\n kitchen-sink/index\n" > ${{ env.DOCS_DIR }}/site/index.rst - echo 'html_theme = "pydata_sphinx_theme"' > ${{ env.DOCS_DIR }}/site/conf.py - echo '.. toctree::\n :glob:\n\n *' >> ${{ env.DOCS_DIR }}/site/index.rst - - # build docs without checking for warnings - python -Im tox run -e docs-no-checks - - - name: "Audit with Lighthouse 🔦" - uses: treosh/lighthouse-ci-action@v12 - with: - configPath: ".github/workflows/lighthouserc.json" - temporaryPublicStorage: true - uploadArtifacts: true - runs: 3 # Multiple runs to reduce variance - coverage: - name: "check coverage" + name: "Check coverage" needs: run-pytest runs-on: ubuntu-latest # avoid running this on schedule, releases, or workflow_call @@ -249,21 +181,3 @@ jobs: name: profile-results path: docbuild_profile.svg if-no-files-found: ignore - - # build the docs and check for broken links - check-docs-links: - name: "check PST docs links" - runs-on: ubuntu-latest - steps: - - name: "Checkout repository 🛎" - uses: actions/checkout@v4 - - name: "Setup CI environment 🛠" - uses: ./.github/actions/set-dev-env - with: - python-version: ${{ env.DEFAULT_PYTHON_VERSION }} - pandoc: true - graphviz: true - - name: "Build docs and check links 📖" - shell: bash - run: | - python -Im tox run -e docs-linkcheck diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..5e35388e1 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,109 @@ +name: build PST docs + +# Concurrency group that uses the workflow name and PR number if available +# or commit SHA as a fallback. If a new build is triggered under that +# concurrency group while a previous build is running it will be canceled. +# Repeated pushes to a PR will cancel all previous builds, while multiple +# merges to main will not cancel. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + +env: + FORCE_COLOR: "1" # Make tools pretty + DEFAULT_PYTHON_VERSION: "3.12" # keep in sync with tox.ini + PIP_DISABLE_PIP_VERSION_CHECK: "1" # Don't check for pip updates + +on: + push: + branches: + - main + pull_request: + # allow manual triggering of the workflow, while debugging + workflow_dispatch: + +jobs: + # Build our docs (PST) on major OSes and check for warnings + build-site: + name: "build PST docs" + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: ["3.12"] + include: + # oldest Python version with the oldest Sphinx version + - os: ubuntu-latest + python-version: "3.9" + sphinx-version: "6.1" + runs-on: ${{ matrix.os }} + steps: + - name: "Checkout repository 🛎" + uses: actions/checkout@v4 + - name: "Setup CI environment 🛠" + uses: ./.github/actions/set-dev-env + with: + python-version: ${{ matrix.python-version }} + pandoc: true + graphviz: true + - name: "Build docs and check for warnings 📖" + shell: bash + run: | + # check if there is a specific Sphinx version to build with + # example substitution: tox run -e py39-sphinx61-docs + if [ -n "${{matrix.sphinx-version}}" ]; then + python -Im tox run -e py$(echo ${{ matrix.python-version }} | tr -d .)-sphinx$(echo ${{ matrix.sphinx-version }} | tr -d .)-docs + # build with the default Sphinx version + # example substitution: tox run -e py312-docs + else + python -Im tox run -e py$(echo ${{ matrix.python-version }} | tr -d .)-docs + fi + + # Run Lighthouse audits on the built site (kitchen-sink only) + lighthouse-audit: + needs: build-site + runs-on: ubuntu-latest + env: + DOCS_DIR: "audit" + steps: + - name: "Checkout repository 🛎" + uses: actions/checkout@v4 + - name: "Setup CI environment 🛠" + uses: ./.github/actions/set-dev-env + with: + python-version: ${{ env.DEFAULT_PYTHON_VERSION }} + - name: "Copy kitchen sink to a tiny site" + run: | + mkdir -p ${{ env.DOCS_DIR }}/site + cp -r docs/examples/kitchen-sink ${{ env.DOCS_DIR }}/site/kitchen-sink + printf "Test\n====\n\n.. toctree::\n\n kitchen-sink/index\n" > ${{ env.DOCS_DIR }}/site/index.rst + echo 'html_theme = "pydata_sphinx_theme"' > ${{ env.DOCS_DIR }}/site/conf.py + echo '.. toctree::\n :glob:\n\n *' >> ${{ env.DOCS_DIR }}/site/index.rst + + # build docs without checking for warnings + python -Im tox run -e docs-no-checks + + - name: "Audit with Lighthouse 🔦" + uses: treosh/lighthouse-ci-action@v12 + with: + configPath: ".github/workflows/lighthouserc.json" + temporaryPublicStorage: true + uploadArtifacts: true + runs: 3 # Multiple runs to reduce variance + + # Check for broken links in our docs + link-check: + runs-on: ubuntu-latest + steps: + - name: "Checkout repository 🛎" + uses: actions/checkout@v4 + - name: "Setup CI environment 🛠" + uses: ./.github/actions/set-dev-env + - name: "Check for broken links 🔗" + run: python -Im tox -e docs-linkcheck + - name: "Upload file with broken links 📤" + uses: actions/upload-artifact@v4 + with: + name: broken-links + path: docs/_build/linkcheck/output.txt + if: ${{ always() }} From 00954239adaf3f2170e8dbc82497ea0c07b3a43e Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Thu, 21 Nov 2024 15:38:28 +0000 Subject: [PATCH 05/31] :wrench: Add ignores and redirects to conf --- docs/.jupyterlite.doit.db-journal | Bin 0 -> 25136 bytes docs/community/inspiration.md | 2 +- docs/conf.py | 15 ++++++++++++++- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 docs/.jupyterlite.doit.db-journal diff --git a/docs/.jupyterlite.doit.db-journal b/docs/.jupyterlite.doit.db-journal new file mode 100644 index 0000000000000000000000000000000000000000..9097df624b03f4878ca8f607aa75e874b6280103 GIT binary patch literal 25136 zcmeHPO>7&-6(+fqM9CuQpD429*rsV9KZQi@?99&0GEHqYa?_x38pkdYw@}#G*;$D( zMKa{dv0|u!5+FYa0C{Pq=4@ED%6ulNmFF{+NhoXRQ1&Rhio5F|oEvY3L znX+VwQWblb;F8Pb4&VFUn>RD>d&@t6JoKN;kL4dDk;w3^n=kwZUJphhvGxn>!|k3& z;9wF|d_a3QHu}oYx3zbNf2Dnt_-!ITd}VZWWHj;W$X|wj5%)%ZIC3HW>!HK(M~1;a z!tEYL;N{g}?b1rEu8Iv$cuS3f|5B2LSC(qao~lomOPjg=`^n zV`VCnl?zH;y6Mnj3ME;sGzzj>Ti$MK=b8^| zlkL{F+r&%FQ`*ykp1xBK&_kOU-$OfHV7nq-Y97>{3`7LXJXP_0+}dxp+v;5NxOOpU zb+NRlyyco|3{Ly6HM828cE4(S(RKyB(tJ>RCJ@xCi%O#mk)&EF^t|70+ZUUMH7jUa z)a63ynkuZlZnw>u=27j~TASN#<9zevK!V%KQ_U0FiIxv;DY$LWYoBjEq_F^|hN=Td zJ9WRa%?WK{WhX*iXdcs0AXGb+wD#M@e75<(AfoZg%gxE%9r->uawh)bhoU?56BM<$mTo!dFKUjZO$y4gAS(k@8f5jmKw zbme3O8##+vu<@x3B^;#9N=aPGgw7D9%rz|CP!wb~gifSx%UzT6c9hG)p01UvUU_+A zoJr2IOr2P4Dq}Egfcz$>#1Y7_90v(S1p`G)!{S&n$&}J}3+EpB&jpyjR&wSQxZc{a zuh62XfWy=`)(AX@U}Tw~3pP2}C5y3XbHWruhRG;$5XCMhhUw_KvW0H!fks^ginZnW zc7M8~@9T_mG?g(e2$eY{M@Tw-zcukt=zi#((hqCtBobU896cjTs)aVFMQm?1}o4lF+UGgW%$??xp|43g>ogV*w@=D4c|M~bI(jSc1 z$Dg~0SH+=fAp#)+Ap#)+Ap#)+Ap#)+Ap-Xk0*`5zV%>!JhMZ93Ls{Iu~I?U~pb z3DJ}8?M?kA9z3a?4ZhR3ji^W*Ij&j3>2(?2#Nn*=ba1YJ?muzrQSD;zl{;j~6UR?# zGf`hPKcyKcR$cOHOJ30_)sH5%6D`gC(}@#HquNBQ^>(6lU5CXgbbq6jY@0~^C^FVY z?1c7YAV`pW?POsS2dA{T=w=zg0G%V};;ULq*ftT-dV34B|s%1VlV=_al}CEo$xu z-4sE#B(}niB_(&IBMjQlBblyS1`uW@1;If#W+4KW1OALjTbYtz#~?txT0}5z3%nn6 ztER5GCieZ)QkG=Qu?>P07be);vLLEJ zS0>WZnX?}Zhq#r4{^Tf^*_aDXUEOwFMEm%q33l_lA4Uj+b~a{IXEx&|Wd?FEBN7G_ zqM+0Px}du+A`1rXIK(?aZNqR40%H}!((b1n#U?QDpdHbPKj2~PN^a@~0b2>;LRf;{ z%M`)jwl1^wgnr1N^!D8C3;6%rtgu{y0;pwgp<2N?WaJxA6EwY6$I-1)fe(wa+MPZ6S*2-Ft4-@U z0uOKg_1;Mn<2l3fhc9p;L@4wE=9hdhYC-U3I?@RdFez~nhk2z=4VObqK&%zw22}E~ zZh|-{CH;DU7yXWqPL6yM(S|;ajJ=k)G4yHtWc;M|r_VnI<1k?>Ap#)+dxyYmb`ZB2 zTsS?@8s3plqVEjgo{+K0=()W^^4|NUw{9Gb&%D#h`}7XrT{>jlAfAOWv*MQKi*i9! z=9L3uWY)G^OrQuDNo)1qm=54Kq7F)-zZNUv8H|H;yrQtw{H`IC)Aq`Bq1zup!eO~41DhoABoTXV5Z0ReObFnufiuk=6L2mS})79tQL5F!vF z5F!vF5F!vF5F!vF5F!vF5F!vF@P$MmodvN|hhdjE1iO&~YyS%wy>#(esENq9)%v3F zG8q0SG8&DX%Vgk76?pdkFJKgol63KnI6)sp8wV^6(se&+J| z%;lM{K6^gnf0B7@EVFL&MB{3)V!Z literal 0 HcmV?d00001 diff --git a/docs/community/inspiration.md b/docs/community/inspiration.md index 91f017d1d..ebf4a3b30 100644 --- a/docs/community/inspiration.md +++ b/docs/community/inspiration.md @@ -26,5 +26,5 @@ When making new decisions about design and UI/UX, we often consult these themes image: https://d33wubrfki0l68.cloudfront.net/c088b7acfcf11100903c44fe44f2f2d7e0f30531/47727/img/docusaurus.svg - title: "**Material for MkDocs**" link: https://squidfunk.github.io/mkdocs-material/getting-started/ - image: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/src/.icons/logo.svg + image: https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/.github/assets/logo.svg ``` diff --git a/docs/conf.py b/docs/conf.py index fb8d92f24..c2d90d64a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -334,7 +334,20 @@ def setup(app: Sphinx) -> Dict[str, Any]: ] linkcheck_ignore = [ - # The crawler gets "Anchor not found" for GitHub anchors + # The crawler gets "Anchor not found" for various anchors r"https://github.com.+?#L\d+", + "https://github.com/executablebooks/sphinx-remove-toctrees#install", + "https://github.com/scientific-python/upload-nightly-action?tab=readme-ov-file#using-nightly-builds-in-ci", + "https://www.sphinx-doc.org/en/master/extdev/appapi.html#event-html-page-context", + "https://www.sphinx-doc.org/en/master/development/templating.html#docstitle", + "https://www.sphinx-doc.org/en/master/development/theming.html#templating", + # Known broken links in kitchen sink r"https://source.unsplash.com/.+", + # sample urls + "http://someurl/release-0.1.0.tar-gz", + "http://python.py", ] + +linkcheck_allowed_redirects = { + "https://www.transifex.com/signup/": "https://app.transifex.com/signup/" +} From e70a1d3396698919f646ada5b17e6a45385ce6ba Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Fri, 22 Nov 2024 16:54:28 +0000 Subject: [PATCH 06/31] :pencil2: Fix URLs in the docs --- docs/community/setup.md | 4 ++-- docs/community/topics/accessibility.md | 5 +++-- docs/community/topics/assets.md | 4 ++-- docs/community/topics/i18n.rst | 6 +++--- docs/conf.py | 28 +++++++++++++++++++------- docs/user_guide/accessibility.md | 2 +- docs/user_guide/fonts.rst | 4 ++-- docs/user_guide/styling.rst | 2 +- 8 files changed, 35 insertions(+), 20 deletions(-) diff --git a/docs/community/setup.md b/docs/community/setup.md index f14961070..7f33ccd49 100644 --- a/docs/community/setup.md +++ b/docs/community/setup.md @@ -29,7 +29,7 @@ time. ## Workflow for contributing changes -We follow a [typical GitHub workflow](https://guides.github.com/introduction/flow/) +We follow a [typical GitHub workflow](https://docs.github.com/en/get-started/using-github/github-flow) of: - create a personal fork and local clone of this repo @@ -50,7 +50,7 @@ First off you'll need your copy of the `pydata-sphinx-theme` codebase. You can clone it for local development like so: 1. **Fork the repository**, so you have your own copy on GitHub. - See [the GitHub forking guide](https://docs.github.com/en/get-started/quickstart/fork-a-repo) for more information. + See [the GitHub forking guide](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) for more information. 2. **Clone the repository locally** so that you have a local copy to work from: ```console diff --git a/docs/community/topics/accessibility.md b/docs/community/topics/accessibility.md index c22e4724b..f2df1300b 100644 --- a/docs/community/topics/accessibility.md +++ b/docs/community/topics/accessibility.md @@ -58,6 +58,7 @@ of three pages from the theme docs. We collected those findings in an issue on GitHub, [May 2024 PyData Theme audit findings](https://github.com/Quansight-Labs/czi-scientific-python-mgmt/issues/72) -Nearly all of the issues have been fixed, but of course things do break / have +Nearly all the issues have been fixed, but naturally course things do break / have already broken, and some things may have never been discovered, so please -[create a GitHub issue](https://github.com/pydata/pydata-sphinx-theme/issues/new) if you find something inaccessible. +[create a GitHub issue](https://github.com/pydata/pydata-sphinx-theme/issues) if you +find something inaccessible. diff --git a/docs/community/topics/assets.md b/docs/community/topics/assets.md index 848da625a..6c9721be3 100644 --- a/docs/community/topics/assets.md +++ b/docs/community/topics/assets.md @@ -48,9 +48,9 @@ the only `vendored` font. ## Jinja macros -Our Webpack build generates a collection of [Jinja macros](https://jinja.palletsprojects.com/en/3.0.x/templates/#macros) in the `static/webpack-macros.html` file. +Our Webpack build generates a collection of [Jinja macros](https://jinja.palletsprojects.com/en/stable/templates/) in the `static/webpack-macros.html` file. These macros are imported in the main `layout.html` file, and then inserted at various places on the page to link the static assets. -Some assets [are "preloaded"](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types/preload), meaning that the browser begins requesting these resources before they're needed. +Some assets [are "preloaded"](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/preload), meaning that the browser begins requesting these resources before they're needed. In particular, our JavaScript assets are preloaded in ``, and the scripts are loaded at the end of ``. diff --git a/docs/community/topics/i18n.rst b/docs/community/topics/i18n.rst index 8c1a2afd6..b1aa7fbce 100644 --- a/docs/community/topics/i18n.rst +++ b/docs/community/topics/i18n.rst @@ -68,10 +68,10 @@ Any text that is marked in this way will be discoverable by ``pybabel`` and used Once you've marked the text as localizable, complete the steps outlined in the :ref:`updating-localization-files` section of this documentation. -For more details on marking strings as localizable in jinja templates visit `the Jinja2 documentation `__. +For more details on marking strings as localizable in jinja templates visit `the Jinja2 documentation `__. .. tip:: - Remember to `manually escape variables `__ if needed. + Remember to `manually escape variables `__ if needed. Sometimes, it can help localizers to describe where a string comes from or whether it refers to a noun or verb, particularly if it can be difficult to find in the theme, or if the string itself is not very self-descriptive (for example, very short strings). @@ -174,7 +174,7 @@ We manage localizations on the `PyData Sphinx Theme project on Transifex `__. +#. Sign up for a `Transifex account `__. #. Join the `PyData Sphinx Theme project `__. #. Select the language you want to localize. If the language you are looking for is not listed, you can `open an issue on GitHub to request it `__. Then you can open a pull request to add the new language following the steps outlined in :ref:`adding-new-language`. diff --git a/docs/conf.py b/docs/conf.py index c2d90d64a..4274be506 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -335,19 +335,33 @@ def setup(app: Sphinx) -> Dict[str, Any]: linkcheck_ignore = [ # The crawler gets "Anchor not found" for various anchors - r"https://github.com.+?#L\d+", - "https://github.com/executablebooks/sphinx-remove-toctrees#install", - "https://github.com/scientific-python/upload-nightly-action?tab=readme-ov-file#using-nightly-builds-in-ci", - "https://www.sphinx-doc.org/en/master/extdev/appapi.html#event-html-page-context", - "https://www.sphinx-doc.org/en/master/development/templating.html#docstitle", - "https://www.sphinx-doc.org/en/master/development/theming.html#templating", + r"https://github.com.+?#.*", + r"https://www.sphinx-doc.org/en/master/*/.+?#.+?", # Known broken links in kitchen sink r"https://source.unsplash.com/.+", # sample urls "http://someurl/release-0.1.0.tar-gz", "http://python.py", + "../examples/blog/index.html", ] linkcheck_allowed_redirects = { - "https://www.transifex.com/signup/": "https://app.transifex.com/signup/" + r"http://www.python.org": "https://www.python.org/", + # :source:`something` linking files in the repository + r"https://github.com/pydata/pydata-sphinx-theme/tree/.*": r"https://github.com/pydata/pydata-sphinx-theme/blob/.*", + r"https://github.com/sphinx-themes/sphinx-themes.org/raw/.*": r"https://github.com/sphinx-themes/sphinx-themes.org/tree/.*", + # project redirects + r"https://pypi.org/project/[A-Za-z\d_\-\.]+/": r"https://pypi.org/project/[a-z\d\-\.]+/", + r"https://virtualenv.pypa.io/": "https://virtualenv.pypa.io/en/latest/", + # catching redirects in rtd + r"https://[A-Za-z\d_\-\.]+.readthedocs.io/": r"https://[A-Za-z\d_\-\.]+\.readthedocs\.io(/en)?/(stable|latest)/", + r"https://readthedocs.org/": r"https://about.readthedocs.com\?ref=readthedocs.org", + r"https://app.readthedocs.org/dashboard/": r"https://app.readthedocs.org/accounts/login/\?next=/dashboard/", + # miscellanenous urls + r"https://python.arviz.org/": "https://python.arviz.org/en/stable/", + r"https://www.sphinx-doc.org/": "https://www.sphinx-doc.org/en/master/", + r"https://idtracker.ai/": "https://idtracker.ai/latest/", + r"https://gitlab.com": "https://about.gitlab.com/", + r"http://www.yahoo.com": "https://www.yahoo.com/", + r"https://feature-engine.readthedocs.io/": "https://feature-engine.trainindata.com/en/latest/", } diff --git a/docs/user_guide/accessibility.md b/docs/user_guide/accessibility.md index 11f63b516..59d995017 100644 --- a/docs/user_guide/accessibility.md +++ b/docs/user_guide/accessibility.md @@ -128,7 +128,7 @@ Most major browsers, including Firefox and Chrome, have built-in accessibility tools as part of their web developer tools. These tools can help to quickly identify accessibility issues and often include links to standards: -- [Firefox Accessibility Inspector](https://developer.mozilla.org/en-US/docs/Tools/Accessibility_inspector) +- [Firefox Accessibility Inspector](https://firefox-source-docs.mozilla.org/devtools-user/accessibility_inspector/index.html) - [Chrome DevTools Accessibility](https://developer.chrome.com/docs/devtools/accessibility/reference) There are also a few browser extensions that some of the maintainers of this diff --git a/docs/user_guide/fonts.rst b/docs/user_guide/fonts.rst index 8a29c8e83..ebdc137f6 100644 --- a/docs/user_guide/fonts.rst +++ b/docs/user_guide/fonts.rst @@ -48,10 +48,10 @@ The default body and header fonts can be changed as follows: {% endblock %} Your text may quickly show up as "unstyled" before the fonts are loaded. To reduce this, you may wish to explore options for - `preloading content `__, + `preloading content `__, specifically the binary font files. This ensures the files will be loaded before the CSS is parsed, but should be used with care. -.. _pydata-css-variables: https://github.com/pydata/pydata-sphinx-theme/blob/main/src/pydata_sphinx_theme/assets/styles/variables/ +.. _pydata-css-variables: https://github.com/pydata/pydata-sphinx-theme/tree/main/src/pydata_sphinx_theme/assets/styles/variables .. _pydata-css-colors: https://github.com/pydata/pydata-sphinx-theme/blob/main/src/pydata_sphinx_theme/assets/styles/variables/_color.scss .. _css-variable-help: https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties diff --git a/docs/user_guide/styling.rst b/docs/user_guide/styling.rst index ed99cbaf4..8a5564879 100644 --- a/docs/user_guide/styling.rst +++ b/docs/user_guide/styling.rst @@ -2,7 +2,7 @@ Theme variables and CSS ======================= -.. _pydata-css-variables: https://github.com/pydata/pydata-sphinx-theme/blob/main/src/pydata_sphinx_theme/assets/styles/variables/ +.. _pydata-css-variables: https://github.com/pydata/pydata-sphinx-theme/tree/main/src/pydata_sphinx_theme/assets/styles/variables .. _css-variable-help: https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties This section covers a few ways that you can control the look and feel of your theme via your own CSS and theme variables. From 18e21980477d76c1fe3d0720267f07a85552047f Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Fri, 22 Nov 2024 16:54:54 +0000 Subject: [PATCH 07/31] :wrench: Update tox command for linkchecks --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 91bf3de01..c7ad9008a 100644 --- a/tox.ini +++ b/tox.ini @@ -149,8 +149,8 @@ description = "Check external links in the documentation" extras = {[testenv:docs-no-checks]extras} allowlist_externals = bash commands = - docs-linkcheck: sphinx-build -b linkcheck docs/ docs/_build/linkcheck -W --keep-going - bash "echo 'Linkcheck complete; see docs/_build/linkcheck/output.txt for any errors'" + sphinx-build -b linkcheck docs/ docs/_build/linkcheck -W --keep-going + bash -c "echo 'Linkcheck complete; see docs/_build/linkcheck/output.txt for any errors'" # extract translatable files into the POT file and update locale PO files # tox run -e i18n-extract From 53dafed05ead904c7f19a40caa2759f38db43336 Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Mon, 25 Nov 2024 12:27:25 +0000 Subject: [PATCH 08/31] Remove needs - CI workflow --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 88adf8e1d..f7d1cf3aa 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -161,7 +161,7 @@ jobs: path: python-coverage-comment-action.txt profiling: - needs: [build-site, run-pytest] + needs: [run-pytest] runs-on: ubuntu-latest steps: - name: "Checkout repository 🛎" From 76b95cabecb78c8ea5a5d70c17b7f9f58cc265a0 Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Tue, 10 Dec 2024 15:01:08 +0000 Subject: [PATCH 09/31] :closed_lock_with_key: Change workflow trigger to workflow_call --- .github/workflows/CI.yml | 9 +++++++++ .github/workflows/coverage.yml | 7 ++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0c5edb55a..21618bfcf 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -59,6 +59,8 @@ jobs: steps: - name: "Checkout repository 🛎" uses: actions/checkout@v4 + with: + persist-credentials: false - name: "Setup CI environment 🛠" uses: ./.github/actions/set-dev-env with: @@ -93,6 +95,8 @@ jobs: steps: - name: "Checkout repository 🛎" uses: actions/checkout@v4 + with: + persist-credentials: false - name: "Setup CI environment 🛠" uses: ./.github/actions/set-dev-env with: @@ -181,3 +185,8 @@ jobs: name: profile-results path: docbuild_profile.svg if-no-files-found: ignore + + coverage-comment: + name: "Post coverage comment" + uses: ./.github/workflows/coverage.yml + needs: [coverage] diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 06d2bb69b..bbc6be429 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -1,14 +1,11 @@ name: Post coverage comment on: - workflow_run: - workflows: ["continuous-integration"] - types: - - completed + workflow_call: jobs: test: - name: "Run tests & display coverage" + name: "Display code coverage" runs-on: ubuntu-latest if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' permissions: From 6e7851c95a51eba19740b05fa502a0973f24d063 Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Tue, 10 Dec 2024 15:08:05 +0000 Subject: [PATCH 10/31] :lock: Ensure proper variable escaping in docs workflow --- .github/workflows/docs.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5e35388e1..762a856fe 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -40,6 +40,8 @@ jobs: steps: - name: "Checkout repository 🛎" uses: actions/checkout@v4 + with: + persist-credentials: false - name: "Setup CI environment 🛠" uses: ./.github/actions/set-dev-env with: @@ -63,25 +65,29 @@ jobs: lighthouse-audit: needs: build-site runs-on: ubuntu-latest - env: - DOCS_DIR: "audit" steps: - name: "Checkout repository 🛎" uses: actions/checkout@v4 + with: + persist-credentials: false - name: "Setup CI environment 🛠" uses: ./.github/actions/set-dev-env with: python-version: ${{ env.DEFAULT_PYTHON_VERSION }} - name: "Copy kitchen sink to a tiny site" run: | - mkdir -p ${{ env.DOCS_DIR }}/site - cp -r docs/examples/kitchen-sink ${{ env.DOCS_DIR }}/site/kitchen-sink - printf "Test\n====\n\n.. toctree::\n\n kitchen-sink/index\n" > ${{ env.DOCS_DIR }}/site/index.rst - echo 'html_theme = "pydata_sphinx_theme"' > ${{ env.DOCS_DIR }}/site/conf.py - echo '.. toctree::\n :glob:\n\n *' >> ${{ env.DOCS_DIR }}/site/index.rst + # ensuring proper scaping of the variable + docs_dir="${DOCS_DIR}" + mkdir -p $docs_dir/site + cp -r docs/examples/kitchen-sink $docs_dir/site/kitchen-sink + printf "Test\n====\n\n.. toctree::\n\n kitchen-sink/index\n" > $docs_dir/site/index.rst + echo 'html_theme = "pydata_sphinx_theme"' > $docs_dir/site/conf.py + echo '.. toctree::\n :glob:\n\n *' >> $docs_dir/site/index.rst # build docs without checking for warnings python -Im tox run -e docs-no-checks + env: + DOCS_DIR: "audit" - name: "Audit with Lighthouse 🔦" uses: treosh/lighthouse-ci-action@v12 @@ -97,6 +103,8 @@ jobs: steps: - name: "Checkout repository 🛎" uses: actions/checkout@v4 + with: + persist-credentials: false - name: "Setup CI environment 🛠" uses: ./.github/actions/set-dev-env - name: "Check for broken links 🔗" From 3e0899daf317df8b0546bc162bbffde890ae1d3b Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Tue, 10 Dec 2024 15:28:04 +0000 Subject: [PATCH 11/31] :arrow_up: Upgrade runners OS and Python versions --- .github/workflows/CI.yml | 15 ++++++++++++--- .github/workflows/docs.yml | 9 ++++++++- .github/workflows/prerelease.yml | 12 ++++++++++-- .github/workflows/publish.yml | 8 ++++++-- 4 files changed, 36 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 21618bfcf..2819a118b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -31,10 +31,12 @@ jobs: strategy: fail-fast: true matrix: + # https://github.com/actions/runner-images # macos-14==latest - # ubuntu-20.04==latest - os: ["ubuntu-latest", "ubuntu-24.04", "macos-14", "windows-latest"] - python-version: ["3.9", "3.10", "3.11", "3.12"] + # ubuntu-24.04==latest + # windows-2022==latest + os: ["ubuntu-latest", "ubuntu-22.04", "macos-14", "windows-latest"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] sphinx-version: [""] include: # oldest Python version with the oldest Sphinx version @@ -61,11 +63,13 @@ jobs: uses: actions/checkout@v4 with: persist-credentials: false + - name: "Setup CI environment 🛠" uses: ./.github/actions/set-dev-env with: python-version: ${{ matrix.python-version }} pandoc: true + - name: "Run tests ✅" shell: bash run: | @@ -79,6 +83,7 @@ jobs: else python -Im tox run -e compile-assets,i18n-compile,py$(echo ${{ matrix.python-version }} | tr -d .)-tests fi + - name: "Upload coverage data to GH artifacts 📤" if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' && matrix.sphinx-version == 'dev' uses: actions/upload-artifact@v4 @@ -97,12 +102,14 @@ jobs: uses: actions/checkout@v4 with: persist-credentials: false + - name: "Setup CI environment 🛠" uses: ./.github/actions/set-dev-env with: python-version: ${{ env.DEFAULT_PYTHON_VERSION }} pandoc: true graphviz: true + - name: "Run accessibility tests with playwright 🎭" # build PST, build docs, then run a11y-tests run: python -Im tox run -m a11y @@ -175,10 +182,12 @@ jobs: with: # 3.12 is not supported by py-spy yet python-version: "3.11" + - name: "Run profiling with py-spy 🕵️‍♂️" # profiling needs to be run as sudo run: python -m tox run -e py311-profile-docs -- -o docbuild_profile.svg continue-on-error: true + - name: "Upload profiling data to GH artifacts 📤" uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 762a856fe..1d239c84a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,7 +30,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.12"] + python-version: ["3.12", "3.13"] include: # oldest Python version with the oldest Sphinx version - os: ubuntu-latest @@ -42,12 +42,14 @@ jobs: uses: actions/checkout@v4 with: persist-credentials: false + - name: "Setup CI environment 🛠" uses: ./.github/actions/set-dev-env with: python-version: ${{ matrix.python-version }} pandoc: true graphviz: true + - name: "Build docs and check for warnings 📖" shell: bash run: | @@ -70,10 +72,12 @@ jobs: uses: actions/checkout@v4 with: persist-credentials: false + - name: "Setup CI environment 🛠" uses: ./.github/actions/set-dev-env with: python-version: ${{ env.DEFAULT_PYTHON_VERSION }} + - name: "Copy kitchen sink to a tiny site" run: | # ensuring proper scaping of the variable @@ -105,10 +109,13 @@ jobs: uses: actions/checkout@v4 with: persist-credentials: false + - name: "Setup CI environment 🛠" uses: ./.github/actions/set-dev-env + - name: "Check for broken links 🔗" run: python -Im tox -e docs-linkcheck + - name: "Upload file with broken links 📤" uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 4343c959c..c9fffa325 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -17,23 +17,29 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - name: "Checkout repository 🛎" uses: actions/checkout@v4 + with: + persist-credentials: false + - name: "Setup CI environment 🛠" uses: ./.github/actions/set-dev-env with: python-version: ${{ matrix.python-version }} pandoc: true + - name: "Install (prerelease) dependencies 📦" run: | python -Im pip install --upgrade pip wheel setuptools + - name: "Build PST docs and check for warnings 📖" run: | # example substitution: tox run -e docs-py312-docs python -Im tox run -e docs-py$(echo ${{ matrix.python-version }} | tr -d .)-docs -- --keep-going + - name: "Run tests ✅ (no coverage)" run: | # this will compile the assets then run the tests @@ -45,8 +51,10 @@ jobs: if: matrix.python-version == '3.9' id: baipp - - run: echo Packages can be found at ${{ steps.baipp.outputs.dist }} + - run: echo Packages can be found at ${BAIPP_DIST} if: matrix.python-version == '3.9' + env: + BAIPP_DIST: ${{ steps.baipp.outputs.dist }} # If either the docs build or the tests resulted in an error, create an issue to note it - name: "Create an issue if failure" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1a86b108a..11d060340 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,11 +26,13 @@ jobs: build-package: name: "Build & verify PST package" - needs: [tests] # require tests to pass before deploy runs + needs: [tests] # require tests to pass before release runs runs-on: ubuntu-latest steps: - name: "Checkout repository 🛎" uses: actions/checkout@v4 + with: + persist-credentials: false - name: "Setup CI environment 🛠" uses: ./.github/actions/set-dev-env @@ -42,7 +44,9 @@ jobs: uses: hynek/build-and-inspect-python-package@v2 id: baipp - - run: echo Packages can be found at ${{ steps.baipp.outputs.dist }} + - run: echo Packages can be found at ${BAIPP_DIST} + env: + BAIPP_DIST: ${{ steps.baipp.outputs.dist }} release-PST: runs-on: ubuntu-latest From d61186f152dd3eefdaaf3863470c3d771269094d Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Tue, 10 Dec 2024 15:30:46 +0000 Subject: [PATCH 12/31] Add coverage required permissions --- .github/workflows/CI.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2819a118b..ed806aa98 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -199,3 +199,6 @@ jobs: name: "Post coverage comment" uses: ./.github/workflows/coverage.yml needs: [coverage] + permissions: + contents: write + pull-requests: write From e9bd82612e28b84c56e63b9bac7730a1769ee867 Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Tue, 10 Dec 2024 15:32:13 +0000 Subject: [PATCH 13/31] Add actions scope to permissions: --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ed806aa98..898be4a4b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -202,3 +202,4 @@ jobs: permissions: contents: write pull-requests: write + actions: read From 21d7a249d73e09616444479a1304347a0449b16f Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Tue, 10 Dec 2024 17:32:35 +0000 Subject: [PATCH 14/31] :construction_worker: Add GitHub attestations to release workflow --- .github/workflows/CI.yml | 7 ++++--- .github/workflows/publish.yml | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 898be4a4b..d13fa9ee4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -118,8 +118,8 @@ jobs: name: "Check coverage" needs: run-pytest runs-on: ubuntu-latest - # avoid running this on schedule, releases, or workflow_call - if: github.event_name != 'schedule' && github.event_name != 'release' && github.event_name != 'workflow_call' + # avoid running this on schedule, releases, workflow_call, or workflow_dispatch + if: github.event_name != 'schedule' && github.event_name != 'release' && github.event_name != 'workflow_call' && github.event_name != 'workflow_dispatch' permissions: contents: write pull-requests: write @@ -195,8 +195,9 @@ jobs: path: docbuild_profile.svg if-no-files-found: ignore + # Calling the coverage-comment action from the main CI workflow + # we might want to pin the SHA once merged coverage-comment: - name: "Post coverage comment" uses: ./.github/workflows/coverage.yml needs: [coverage] permissions: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 11d060340..ecfbf26dc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,5 +1,5 @@ # This workflow runs every day at 2AM UTC to publish a new nightly release to Anaconda.org -# and every time there is a PST to make sure it gets uploaded to PyPI. +# and every time there is a PST release to make sure it gets uploaded to PyPI. name: Publish PST package on: release: @@ -43,6 +43,8 @@ jobs: - name: "Build and inspect package 📦" uses: hynek/build-and-inspect-python-package@v2 id: baipp + with: + attest-build-provenance-github: "true" - run: echo Packages can be found at ${BAIPP_DIST} env: From e560340a783fe50529d8680627438471dd08a89c Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Tue, 10 Dec 2024 17:43:47 +0000 Subject: [PATCH 15/31] :lock: Add static analysis for GH actions with Zizmor --- .github/workflows/CI.yml | 2 ++ .github/workflows/docs.yml | 2 ++ .github/workflows/zizmor.yml | 40 ++++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 .github/workflows/zizmor.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d13fa9ee4..2ed2ddef4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -21,6 +21,8 @@ on: branches: - main pull_request: + branches: + - "*" workflow_call: # allow manual triggering of the workflow, while debugging workflow_dispatch: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1d239c84a..9c8de3e3a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -19,6 +19,8 @@ on: branches: - main pull_request: + branches: + - "*" # allow manual triggering of the workflow, while debugging workflow_dispatch: diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml new file mode 100644 index 000000000..bb839c90e --- /dev/null +++ b/.github/workflows/zizmor.yml @@ -0,0 +1,40 @@ +# Performs static analysis in GitHub actions with https://github.com/woodruffw/zizmor +name: Zizmor + +on: + push: + branches: + - main + pull_request: + branches: + - "*" + +permissions: + contents: read + +jobs: + zizmor: + name: "Run Zizmor" + runs-on: ubuntu-latest + permissions: + security-events: write + steps: + - name: "Checkout repository 🛎" + uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: "Install uv 📦" + uses: astral-sh/setup-uv@v4 + + - name: "Run zizmor 🕵️‍♂️" + run: uvx zizmor --format sarif . > results.sarif + + - name: "Upload SARIF file 📤" + uses: github/codeql-action/upload-sarif@v3 + with: + # Path to SARIF file relative to the root of the repository + sarif_file: results.sarif + # Optional category for the results + # Used to differentiate multiple results for one commit + category: zizmor From 9b31a14273e7603faa3a7947beeb22e0514723da Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Wed, 11 Dec 2024 16:16:11 +0000 Subject: [PATCH 16/31] :construction_worker: Pin our reusable action to a hash --- .github/workflows/CI.yml | 16 ++++++++++++---- .github/workflows/docs.yml | 6 +++--- .github/workflows/prerelease.yml | 4 ++-- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2ed2ddef4..452cab643 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -67,7 +67,7 @@ jobs: persist-credentials: false - name: "Setup CI environment 🛠" - uses: ./.github/actions/set-dev-env + uses: pydata/pydata-sphinx-theme/.github/actions/set-dev-env@01731d0cc57768b9eff1c97f38909932ecd7e7d1 with: python-version: ${{ matrix.python-version }} pandoc: true @@ -106,7 +106,7 @@ jobs: persist-credentials: false - name: "Setup CI environment 🛠" - uses: ./.github/actions/set-dev-env + uses: pydata/pydata-sphinx-theme/.github/actions/set-dev-env@01731d0cc57768b9eff1c97f38909932ecd7e7d1 with: python-version: ${{ env.DEFAULT_PYTHON_VERSION }} pandoc: true @@ -128,11 +128,16 @@ jobs: steps: - name: "Checkout repository 🛎" uses: actions/checkout@v4 + with: + persist-credentials: false + - name: "Setup CI environment 🛠" - uses: ./.github/actions/set-dev-env + uses: pydata/pydata-sphinx-theme/.github/actions/set-dev-env@01731d0cc57768b9eff1c97f38909932ecd7e7d1 with: python-version: ${{ env.DEFAULT_PYTHON_VERSION }} + - run: python -Im pip install --upgrade coverage[toml] + - name: "Download coverage data 📥" uses: actions/download-artifact@v4 with: @@ -179,8 +184,11 @@ jobs: steps: - name: "Checkout repository 🛎" uses: actions/checkout@v4 + with: + persist-credentials: false + - name: "Setup CI environment 🛠" - uses: ./.github/actions/set-dev-env + uses: pydata/pydata-sphinx-theme/.github/actions/set-dev-env@01731d0cc57768b9eff1c97f38909932ecd7e7d1 with: # 3.12 is not supported by py-spy yet python-version: "3.11" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9c8de3e3a..e556d2304 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -46,7 +46,7 @@ jobs: persist-credentials: false - name: "Setup CI environment 🛠" - uses: ./.github/actions/set-dev-env + uses: pydata/pydata-sphinx-theme/.github/actions/set-dev-env@01731d0cc57768b9eff1c97f38909932ecd7e7d1 with: python-version: ${{ matrix.python-version }} pandoc: true @@ -76,7 +76,7 @@ jobs: persist-credentials: false - name: "Setup CI environment 🛠" - uses: ./.github/actions/set-dev-env + uses: pydata/pydata-sphinx-theme/.github/actions/set-dev-env@01731d0cc57768b9eff1c97f38909932ecd7e7d1 with: python-version: ${{ env.DEFAULT_PYTHON_VERSION }} @@ -113,7 +113,7 @@ jobs: persist-credentials: false - name: "Setup CI environment 🛠" - uses: ./.github/actions/set-dev-env + uses: pydata/pydata-sphinx-theme/.github/actions/set-dev-env@01731d0cc57768b9eff1c97f38909932ecd7e7d1 - name: "Check for broken links 🔗" run: python -Im tox -e docs-linkcheck diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index c9fffa325..015173f30 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -26,7 +26,7 @@ jobs: persist-credentials: false - name: "Setup CI environment 🛠" - uses: ./.github/actions/set-dev-env + uses: pydata/pydata-sphinx-theme/.github/actions/set-dev-env@01731d0cc57768b9eff1c97f38909932ecd7e7d1 with: python-version: ${{ matrix.python-version }} pandoc: true @@ -51,7 +51,7 @@ jobs: if: matrix.python-version == '3.9' id: baipp - - run: echo Packages can be found at ${BAIPP_DIST} + - run: echo Packages can be found at "${BAIPP_DIST}" if: matrix.python-version == '3.9' env: BAIPP_DIST: ${{ steps.baipp.outputs.dist }} From 560ecfee3674b8646ccdbab4b14ce186674cbdb7 Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Wed, 11 Dec 2024 16:16:41 +0000 Subject: [PATCH 17/31] Add environment and pinned actions to release workflow --- .github/workflows/publish.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ecfbf26dc..6d65c2d7c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -30,23 +30,23 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout repository 🛎" - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 with: persist-credentials: false - name: "Setup CI environment 🛠" - uses: ./.github/actions/set-dev-env + uses: pydata/pydata-sphinx-theme/.github/actions/set-dev-env@01731d0cc57768b9eff1c97f38909932ecd7e7d1 with: python-version: "3.9" pandoc: "False" - name: "Build and inspect package 📦" - uses: hynek/build-and-inspect-python-package@v2 + uses: hynek/build-and-inspect-python-package@f01e4d047aadcc0c054c95ec9900da3ec3fc7a0f # 2.10.0 id: baipp with: attest-build-provenance-github: "true" - - run: echo Packages can be found at ${BAIPP_DIST} + - run: echo Packages can be found at "${BAIPP_DIST}" env: BAIPP_DIST: ${{ steps.baipp.outputs.dist }} @@ -55,9 +55,12 @@ jobs: needs: [build-package] permissions: id-token: write # needed for PyPI upload + environment: + name: pst-release + url: https://pypi.org/p/pydata-sphinx-theme steps: - name: "Download PST built package 📦" - uses: actions/download-artifact@v4 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8 with: name: Packages path: dist @@ -67,9 +70,11 @@ jobs: tar xvf dist/*.tar.gz --strip-components=1 - name: "Publish PST package to PyPI 🚀" - uses: pypa/gh-action-pypi-publish@release/v1 + uses: pypa/gh-action-pypi-publish@67339c736fd9354cd4f8cb0b744f2b82a74b5c70 # 1.12.3 # only publish if this is a published release by pydata if: github.repository_owner == 'pydata' && github.event_name == 'release' && github.event.action == 'published' + with: + print-hash: true - name: "Publish PST package to scientific-python-nightly-wheels 🚀" uses: scientific-python/upload-nightly-action@82396a2ed4269ba06c6b2988bb4fd568ef3c3d6b # 0.6.1 From 2a7fca4ca4bffef23f85289df7021212529b9a5c Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Thu, 12 Dec 2024 15:30:27 +0000 Subject: [PATCH 18/31] Add more comments to workflows --- .github/actions/set-dev-env/action.yml | 2 ++ .github/workflows/CI.yml | 2 ++ .github/workflows/coverage.yml | 4 +++- .github/workflows/docs.yml | 7 ++++++- .github/workflows/prerelease.yml | 2 ++ .github/workflows/publish.yml | 8 ++++++-- 6 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/actions/set-dev-env/action.yml b/.github/actions/set-dev-env/action.yml index 7964b4365..9acd42332 100644 --- a/.github/actions/set-dev-env/action.yml +++ b/.github/actions/set-dev-env/action.yml @@ -1,3 +1,5 @@ +# Reusable action to set our PST development environment +# DO NOT use for release jobs since we cache dependencies name: Setup PST CI environment description: Create a PST dev environment diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 452cab643..4f492aa7c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,3 +1,4 @@ +# Testing (pytest, a11y-tests), profiling, and coverage checks for PST name: continuous-integration # Concurrency group that uses the workflow name and PR number if available @@ -23,6 +24,7 @@ on: pull_request: branches: - "*" + # allows this to be used as a composite action in other workflows workflow_call: # allow manual triggering of the workflow, while debugging workflow_dispatch: diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index bbc6be429..2e3822355 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -17,9 +17,11 @@ jobs: id: get-run uses: octokit/request-action@v2.x with: - route: GET /repos/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }} + route: GET /repos/"${REPO}"/actions/runs/"${WORKFLOW_RUN_ID}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ github.repository }} + WORKFLOW_RUN_ID: ${{ github.event.workflow_run.id }} # this needs the .coverage file so we download from the CI workflow artifacts - name: "Download coverage data 📥" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e556d2304..6b5f771eb 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,4 +1,7 @@ -name: build PST docs +# This workflow is checks that the documentation can be built across multiple OSes, Python, and Sphinx versions. +# It also checks for broken links in the documentation and runs Lighthouse audits on the built site. + +name: docs-checks # Concurrency group that uses the workflow name and PR number if available # or commit SHA as a fallback. If a new build is triggered under that @@ -21,6 +24,8 @@ on: pull_request: branches: - "*" + # allows this to be used as a composite action in other workflows + workflow_call: # allow manual triggering of the workflow, while debugging workflow_dispatch: diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 015173f30..227dd85c7 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -13,6 +13,8 @@ env: jobs: prerelease: + # only run this workflow for pydata owned repositories (avoid forks) + if: github.repository_owner == 'pydata' runs-on: ubuntu-latest strategy: fail-fast: false diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6d65c2d7c..36d082bf1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,17 +16,21 @@ permissions: contents: read jobs: - # calls our general CI workflow (tests, build docs, etc.) + # calls our general CI workflows (tests, coverage, profile, etc.) tests: uses: ./.github/workflows/CI.yml # needed for the coverage action permissions: contents: write pull-requests: write + # calls our docs workflow (build docs, check broken links, lighthouse) + docs: + uses: ./.github/workflows/docs.yml build-package: name: "Build & verify PST package" - needs: [tests] # require tests to pass before release runs + # require tests and docs to pass before building the package + needs: [tests, docs] runs-on: ubuntu-latest steps: - name: "Checkout repository 🛎" From 8ecc548794aae915793194e56dffae49d6760387 Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Thu, 12 Dec 2024 16:16:49 +0000 Subject: [PATCH 19/31] :fire: Remove accidentally commited file --- docs/.jupyterlite.doit.db-journal | Bin 25136 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 docs/.jupyterlite.doit.db-journal diff --git a/docs/.jupyterlite.doit.db-journal b/docs/.jupyterlite.doit.db-journal deleted file mode 100644 index 9097df624b03f4878ca8f607aa75e874b6280103..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25136 zcmeHPO>7&-6(+fqM9CuQpD429*rsV9KZQi@?99&0GEHqYa?_x38pkdYw@}#G*;$D( zMKa{dv0|u!5+FYa0C{Pq=4@ED%6ulNmFF{+NhoXRQ1&Rhio5F|oEvY3L znX+VwQWblb;F8Pb4&VFUn>RD>d&@t6JoKN;kL4dDk;w3^n=kwZUJphhvGxn>!|k3& z;9wF|d_a3QHu}oYx3zbNf2Dnt_-!ITd}VZWWHj;W$X|wj5%)%ZIC3HW>!HK(M~1;a z!tEYL;N{g}?b1rEu8Iv$cuS3f|5B2LSC(qao~lomOPjg=`^n zV`VCnl?zH;y6Mnj3ME;sGzzj>Ti$MK=b8^| zlkL{F+r&%FQ`*ykp1xBK&_kOU-$OfHV7nq-Y97>{3`7LXJXP_0+}dxp+v;5NxOOpU zb+NRlyyco|3{Ly6HM828cE4(S(RKyB(tJ>RCJ@xCi%O#mk)&EF^t|70+ZUUMH7jUa z)a63ynkuZlZnw>u=27j~TASN#<9zevK!V%KQ_U0FiIxv;DY$LWYoBjEq_F^|hN=Td zJ9WRa%?WK{WhX*iXdcs0AXGb+wD#M@e75<(AfoZg%gxE%9r->uawh)bhoU?56BM<$mTo!dFKUjZO$y4gAS(k@8f5jmKw zbme3O8##+vu<@x3B^;#9N=aPGgw7D9%rz|CP!wb~gifSx%UzT6c9hG)p01UvUU_+A zoJr2IOr2P4Dq}Egfcz$>#1Y7_90v(S1p`G)!{S&n$&}J}3+EpB&jpyjR&wSQxZc{a zuh62XfWy=`)(AX@U}Tw~3pP2}C5y3XbHWruhRG;$5XCMhhUw_KvW0H!fks^ginZnW zc7M8~@9T_mG?g(e2$eY{M@Tw-zcukt=zi#((hqCtBobU896cjTs)aVFMQm?1}o4lF+UGgW%$??xp|43g>ogV*w@=D4c|M~bI(jSc1 z$Dg~0SH+=fAp#)+Ap#)+Ap#)+Ap#)+Ap-Xk0*`5zV%>!JhMZ93Ls{Iu~I?U~pb z3DJ}8?M?kA9z3a?4ZhR3ji^W*Ij&j3>2(?2#Nn*=ba1YJ?muzrQSD;zl{;j~6UR?# zGf`hPKcyKcR$cOHOJ30_)sH5%6D`gC(}@#HquNBQ^>(6lU5CXgbbq6jY@0~^C^FVY z?1c7YAV`pW?POsS2dA{T=w=zg0G%V};;ULq*ftT-dV34B|s%1VlV=_al}CEo$xu z-4sE#B(}niB_(&IBMjQlBblyS1`uW@1;If#W+4KW1OALjTbYtz#~?txT0}5z3%nn6 ztER5GCieZ)QkG=Qu?>P07be);vLLEJ zS0>WZnX?}Zhq#r4{^Tf^*_aDXUEOwFMEm%q33l_lA4Uj+b~a{IXEx&|Wd?FEBN7G_ zqM+0Px}du+A`1rXIK(?aZNqR40%H}!((b1n#U?QDpdHbPKj2~PN^a@~0b2>;LRf;{ z%M`)jwl1^wgnr1N^!D8C3;6%rtgu{y0;pwgp<2N?WaJxA6EwY6$I-1)fe(wa+MPZ6S*2-Ft4-@U z0uOKg_1;Mn<2l3fhc9p;L@4wE=9hdhYC-U3I?@RdFez~nhk2z=4VObqK&%zw22}E~ zZh|-{CH;DU7yXWqPL6yM(S|;ajJ=k)G4yHtWc;M|r_VnI<1k?>Ap#)+dxyYmb`ZB2 zTsS?@8s3plqVEjgo{+K0=()W^^4|NUw{9Gb&%D#h`}7XrT{>jlAfAOWv*MQKi*i9! z=9L3uWY)G^OrQuDNo)1qm=54Kq7F)-zZNUv8H|H;yrQtw{H`IC)Aq`Bq1zup!eO~41DhoABoTXV5Z0ReObFnufiuk=6L2mS})79tQL5F!vF z5F!vF5F!vF5F!vF5F!vF5F!vF@P$MmodvN|hhdjE1iO&~YyS%wy>#(esENq9)%v3F zG8q0SG8&DX%Vgk76?pdkFJKgol63KnI6)sp8wV^6(se&+J| z%;lM{K6^gnf0B7@EVFL&MB{3)V!Z From 3864d38f977f4cd4b9ce806d6d59836ecf93c45f Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Thu, 12 Dec 2024 16:21:26 +0000 Subject: [PATCH 20/31] Remove setup-dev action --- .github/workflows/publish.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 36d082bf1..a4ebaf8f5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -38,17 +38,16 @@ jobs: with: persist-credentials: false - - name: "Setup CI environment 🛠" - uses: pydata/pydata-sphinx-theme/.github/actions/set-dev-env@01731d0cc57768b9eff1c97f38909932ecd7e7d1 + - name: "Setup Python 🐍" + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # 5.3.0 with: python-version: "3.9" - pandoc: "False" + + - run: python -Im pip install tox-uv - name: "Build and inspect package 📦" uses: hynek/build-and-inspect-python-package@f01e4d047aadcc0c054c95ec9900da3ec3fc7a0f # 2.10.0 id: baipp - with: - attest-build-provenance-github: "true" - run: echo Packages can be found at "${BAIPP_DIST}" env: From 741131cd7e978c7e293284b75e525a9693468ccd Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Thu, 12 Dec 2024 17:38:42 +0000 Subject: [PATCH 21/31] Fix more URLs --- docs/community/design-system.md | 4 ++-- docs/conf.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/community/design-system.md b/docs/community/design-system.md index 4c6634d42..edb380c1e 100644 --- a/docs/community/design-system.md +++ b/docs/community/design-system.md @@ -178,8 +178,8 @@ color and typography in the PyData Sphinx theme: 1. [https://carbondesignsystem.com/elements/typography/overview/](https://carbondesignsystem.com/elements/typography/overview/) 2. [https://canvas.workday.com/styles/tokens/type](https://canvas.workday.com/styles/tokens/type) 3. [https://atlassian.design/foundations/typography-beta](https://atlassian.design/foundations/typography-beta) - refer to the [Figma Design File](https://www.figma.com/design/BHkBFxg1Qg0h5RApUw1ZrR/PyData-Design-System---Ongoing?node-id=2-160). + refer to the [Figma Design File](https://www.figma.com/community/file/1443191723065200671/pydata-sphinx-theme-design-system). -[figma-library]: https://www.figma.com/community/file/1443191723065200671 +[figma-library]: https://www.figma.com/community/file/1443191723065200671/pydata-sphinx-theme-design-system diff --git a/docs/conf.py b/docs/conf.py index e386db04b..a1045a24c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -347,6 +347,7 @@ def setup(app: Sphinx) -> Dict[str, Any]: r"https://www.sphinx-doc.org/en/master/*/.+?#.+?", # Known broken links in kitchen sink r"https://source.unsplash.com/.+", + r"https://.unsplash.com/.+", # sample urls "http://someurl/release-0.1.0.tar-gz", "http://python.py", From 3bb97ddbb24a7861733337e2885b238c1dce5e7f Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Thu, 12 Dec 2024 17:39:00 +0000 Subject: [PATCH 22/31] Remove pin in STB --- pyproject.toml | 4 ++-- tox.ini | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f8b2eb2ae..ec23953f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = [ - "sphinx-theme-builder @ https://github.com/pradyunsg/sphinx-theme-builder/archive/87214d0671c943992c05e3db01dca997e156e8d6.zip", + "sphinx-theme-builder @ git+https://github.com/pradyunsg/sphinx-theme-builder.git@main" ] build-backend = "sphinx_theme_builder" @@ -108,7 +108,7 @@ indent-width = 4 ignore = [ "D107", # Missing docstring in `__init__` | set the docstring in the class "D205", # 1 blank line required between summary line and description, - "D212", # docstring summary must be on first physical line + "D212", # docstring summary must be on first physical line "W291", # let pre-commit handle trailing whitespace ] diff --git a/tox.ini b/tox.ini index af9af4e07..986822581 100644 --- a/tox.ini +++ b/tox.ini @@ -135,7 +135,7 @@ extras = dev package = editable deps = - sphinx-theme-builder[cli]@git+https://github.com/pradyunsg/sphinx-theme-builder#egg=d9f620b + sphinx-theme-builder[cli] @ git+https://github.com/pradyunsg/sphinx-theme-builder.git@main # suppress Py3.11's new "can't debug frozen modules" warning set_env = PYDEVD_DISABLE_FILE_VALIDATION=1 commands = @@ -149,7 +149,7 @@ description = "Check external links in the documentation" extras = {[testenv:docs-no-checks]extras} allowlist_externals = bash commands = - sphinx-build -b linkcheck docs/ docs/_build/linkcheck -W --keep-going + sphinx-build -b linkcheck docs/ docs/_build/linkcheck -W --keep-going -q bash -c "echo 'Linkcheck complete; see docs/_build/linkcheck/output.txt for any errors'" # extract translatable files into the POT file and update locale PO files From 1121c37f4100d1d21c61ca3222d5c80bfd6a60a3 Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Mon, 16 Dec 2024 11:43:42 +0000 Subject: [PATCH 23/31] Change dependabot frequency --- .github/dependabot.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4e4de2d80..fbe4b5888 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,7 +4,7 @@ updates: - package-ecosystem: "github-actions" directory: "/" schedule: - interval: "weekly" + interval: "monthly" labels: - "tag: dependencies" - "tag: CI" @@ -12,7 +12,7 @@ updates: - package-ecosystem: "npm" directory: "/" schedule: - interval: "weekly" + interval: "monthly" labels: - "tag: dependencies" - "tag: javascript" From a7e2f69d17584d5cafbc6cc8e56791090bdea8c9 Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Mon, 16 Dec 2024 11:50:39 +0000 Subject: [PATCH 24/31] Finish changing to SHA for GitHub actions --- .github/workflows/CI.yml | 20 ++++++++++---------- .github/workflows/coverage.yml | 6 +++--- .github/workflows/docs.yml | 8 ++++---- .github/workflows/prerelease.yml | 4 ++-- .github/workflows/publish.yml | 2 +- .github/workflows/zizmor.yml | 4 ++-- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4f492aa7c..664ecd509 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -64,7 +64,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: "Checkout repository 🛎" - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false @@ -90,7 +90,7 @@ jobs: - name: "Upload coverage data to GH artifacts 📤" if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' && matrix.sphinx-version == 'dev' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 with: name: coverage-data-${{ matrix.python-version }} path: .coverage @@ -103,7 +103,7 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout repository 🛎" - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false @@ -129,7 +129,7 @@ jobs: pull-requests: write steps: - name: "Checkout repository 🛎" - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false @@ -141,7 +141,7 @@ jobs: - run: python -Im pip install --upgrade coverage[toml] - name: "Download coverage data 📥" - uses: actions/download-artifact@v4 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: pattern: coverage-data-* merge-multiple: true @@ -159,7 +159,7 @@ jobs: python -Im coverage report --fail-under=80 - name: "Upload HTML report if check failed 📤" - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 with: name: html-report path: htmlcov @@ -167,13 +167,13 @@ jobs: # seems we need to call this from the main CI workflow first - name: "Coverage comment 💬" - uses: py-cov-action/python-coverage-comment-action@v3 + uses: py-cov-action/python-coverage-comment-action@b2eb38dd175bf053189b35f738f9207278b00925 id: coverage_comment with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: "Store Pull Request comment to be posted 📤" - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true' with: # leave default names @@ -185,7 +185,7 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout repository 🛎" - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false @@ -201,7 +201,7 @@ jobs: continue-on-error: true - name: "Upload profiling data to GH artifacts 📤" - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 with: name: profile-results path: docbuild_profile.svg diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 2e3822355..bd2673183 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -15,7 +15,7 @@ jobs: steps: - name: "Get the triggering workflow run details" id: get-run - uses: octokit/request-action@v2.x + uses: octokit/request-action@dad4362715b7fb2ddedf9772c8670824af564f0d with: route: GET /repos/"${REPO}"/actions/runs/"${WORKFLOW_RUN_ID}" env: @@ -25,7 +25,7 @@ jobs: # this needs the .coverage file so we download from the CI workflow artifacts - name: "Download coverage data 📥" - uses: actions/download-artifact@v4 + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: pattern: coverage-data-* merge-multiple: true @@ -36,7 +36,7 @@ jobs: run: ls -R - name: "Post coverage comment" - uses: py-cov-action/python-coverage-comment-action@v3 + uses: py-cov-action/python-coverage-comment-action@b2eb38dd175bf053189b35f738f9207278b00925 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_PR_RUN_ID: ${{ github.event.workflow_run.id }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6b5f771eb..4b6c94616 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -46,7 +46,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: "Checkout repository 🛎" - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false @@ -76,7 +76,7 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout repository 🛎" - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false @@ -113,7 +113,7 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout repository 🛎" - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false @@ -124,7 +124,7 @@ jobs: run: python -Im tox -e docs-linkcheck - name: "Upload file with broken links 📤" - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 with: name: broken-links path: docs/_build/linkcheck/output.txt diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 227dd85c7..c6bcdb8f4 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -23,7 +23,7 @@ jobs: steps: - name: "Checkout repository 🛎" - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false @@ -49,7 +49,7 @@ jobs: echo "PYTEST_ERRORS=$?" >> $GITHUB_ENV - name: "Build and inspect package 📦" - uses: hynek/build-and-inspect-python-package@v2 + uses: hynek/build-and-inspect-python-package@14c7e53f5d033cfa99f7af916fa59a6f7f356394 if: matrix.python-version == '3.9' id: baipp diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a4ebaf8f5..303a8c399 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -46,7 +46,7 @@ jobs: - run: python -Im pip install tox-uv - name: "Build and inspect package 📦" - uses: hynek/build-and-inspect-python-package@f01e4d047aadcc0c054c95ec9900da3ec3fc7a0f # 2.10.0 + uses: hynek/build-and-inspect-python-package@14c7e53f5d033cfa99f7af916fa59a6f7f356394 # 2.11.0 id: baipp - run: echo Packages can be found at "${BAIPP_DIST}" diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml index bb839c90e..9949755f5 100644 --- a/.github/workflows/zizmor.yml +++ b/.github/workflows/zizmor.yml @@ -20,12 +20,12 @@ jobs: security-events: write steps: - name: "Checkout repository 🛎" - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: persist-credentials: false - name: "Install uv 📦" - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a - name: "Run zizmor 🕵️‍♂️" run: uvx zizmor --format sarif . > results.sarif From 90f9d1a0cb9dcc8e69eef2a095802c94b392b8d2 Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Mon, 16 Dec 2024 11:54:29 +0000 Subject: [PATCH 25/31] Update linkcheck config --- docs/conf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index a1045a24c..b31ae8ac5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -347,11 +347,14 @@ def setup(app: Sphinx) -> Dict[str, Any]: r"https://www.sphinx-doc.org/en/master/*/.+?#.+?", # Known broken links in kitchen sink r"https://source.unsplash.com/.+", - r"https://.unsplash.com/.+", + r"https://unsplash.com/.+", # sample urls "http://someurl/release-0.1.0.tar-gz", "http://python.py", + # for whatever reason the Ablog index is treated as broken "../examples/blog/index.html", + # get a 403 on CI + "https://canvas.workday.com/styles/tokens/type", ] linkcheck_allowed_redirects = { From 9adae6debf99e32c35c32b35c5597ad720aa036a Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Mon, 16 Dec 2024 11:59:55 +0000 Subject: [PATCH 26/31] Ignore unsplash for link check --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index b31ae8ac5..0161fab35 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -347,7 +347,6 @@ def setup(app: Sphinx) -> Dict[str, Any]: r"https://www.sphinx-doc.org/en/master/*/.+?#.+?", # Known broken links in kitchen sink r"https://source.unsplash.com/.+", - r"https://unsplash.com/.+", # sample urls "http://someurl/release-0.1.0.tar-gz", "http://python.py", @@ -355,6 +354,7 @@ def setup(app: Sphinx) -> Dict[str, Any]: "../examples/blog/index.html", # get a 403 on CI "https://canvas.workday.com/styles/tokens/type", + "https://unsplash.com/", ] linkcheck_allowed_redirects = { From ccb12a17ed4ea452c143e9b5cf5874c2317ceef1 Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Wed, 15 Jan 2025 12:17:55 +0000 Subject: [PATCH 27/31] Ignore known warnings in linkcheck --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 986822581..e6d41ed95 100644 --- a/tox.ini +++ b/tox.ini @@ -107,7 +107,7 @@ extras = {[testenv:docs-no-checks]extras} deps = py39-sphinx61-docs: sphinx~=6.1.0 commands = - sphinx-build -b html docs/ docs/_build/html -v -w warnings.txt {posargs} + sphinx-build -b html docs/ docs/_build/html -v --warning-file warnings.txt {posargs} python tests/utils/check_warnings.py # recommended for local development, this command will build the PST documentation @@ -121,7 +121,7 @@ set_env = PYDEVD_DISABLE_FILE_VALIDATION=1 extras = {[testenv:docs-no-checks]extras} package = editable commands = - sphinx-build -b html docs/ docs/_build/html -v -w warnings.txt {posargs} + sphinx-build -b html docs/ docs/_build/html -v --warning-file warnings.txt {posargs} python tests/utils/check_warnings.py # build the docs with live-reload, if you are working on the docs only (no theme changes) the best option is to call @@ -149,7 +149,7 @@ description = "Check external links in the documentation" extras = {[testenv:docs-no-checks]extras} allowlist_externals = bash commands = - sphinx-build -b linkcheck docs/ docs/_build/linkcheck -W --keep-going -q + sphinx-build -b linkcheck docs/ docs/_build/linkcheck -W --warning-file warnings.txt --keep-going -q bash -c "echo 'Linkcheck complete; see docs/_build/linkcheck/output.txt for any errors'" # extract translatable files into the POT file and update locale PO files From 028f584835c3e7044620c2d40fb3ffc32b91e798 Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Wed, 15 Jan 2025 12:25:49 +0000 Subject: [PATCH 28/31] Update actions --- .github/workflows/CI.yml | 8 ++++---- .github/workflows/docs.yml | 2 +- .github/workflows/zizmor.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 664ecd509..ece260af1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -90,7 +90,7 @@ jobs: - name: "Upload coverage data to GH artifacts 📤" if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' && matrix.sphinx-version == 'dev' - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 with: name: coverage-data-${{ matrix.python-version }} path: .coverage @@ -159,7 +159,7 @@ jobs: python -Im coverage report --fail-under=80 - name: "Upload HTML report if check failed 📤" - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 with: name: html-report path: htmlcov @@ -173,7 +173,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: "Store Pull Request comment to be posted 📤" - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true' with: # leave default names @@ -201,7 +201,7 @@ jobs: continue-on-error: true - name: "Upload profiling data to GH artifacts 📤" - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 with: name: profile-results path: docbuild_profile.svg diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4b6c94616..1830d678b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -124,7 +124,7 @@ jobs: run: python -Im tox -e docs-linkcheck - name: "Upload file with broken links 📤" - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 with: name: broken-links path: docs/_build/linkcheck/output.txt diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml index 9949755f5..4199bca0e 100644 --- a/.github/workflows/zizmor.yml +++ b/.github/workflows/zizmor.yml @@ -25,7 +25,7 @@ jobs: persist-credentials: false - name: "Install uv 📦" - uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a + uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a - name: "Run zizmor 🕵️‍♂️" run: uvx zizmor --format sarif . > results.sarif From a6e055cd6852ea4ef92f82937ef2eb0a038b96c0 Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Wed, 15 Jan 2025 12:51:12 +0000 Subject: [PATCH 29/31] Separate a11y-tests in CI to expand the testing matrix --- .github/workflows/CI.yml | 21 --------------- .github/workflows/a11y.yml | 54 ++++++++++++++++++++++++++++++++++++++ tox.ini | 8 +++--- 3 files changed, 59 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/a11y.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ece260af1..09f368b60 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -97,27 +97,6 @@ jobs: if-no-files-found: ignore include-hidden-files: true - # Only run accessibility tests on the latest Python version (3.12) and Ubuntu - a11y-tests: - name: "a11y-tests (ubuntu-latest, 3.12)" - runs-on: ubuntu-latest - steps: - - name: "Checkout repository 🛎" - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - with: - persist-credentials: false - - - name: "Setup CI environment 🛠" - uses: pydata/pydata-sphinx-theme/.github/actions/set-dev-env@01731d0cc57768b9eff1c97f38909932ecd7e7d1 - with: - python-version: ${{ env.DEFAULT_PYTHON_VERSION }} - pandoc: true - graphviz: true - - - name: "Run accessibility tests with playwright 🎭" - # build PST, build docs, then run a11y-tests - run: python -Im tox run -m a11y - coverage: name: "Check coverage" needs: run-pytest diff --git a/.github/workflows/a11y.yml b/.github/workflows/a11y.yml new file mode 100644 index 000000000..063cda30a --- /dev/null +++ b/.github/workflows/a11y.yml @@ -0,0 +1,54 @@ +name: a11y-tests + +# Concurrency group that uses the workflow name and PR number if available +# or commit SHA as a fallback. If a new build is triggered under that +# concurrency group while a previous build is running it will be canceled. +# Repeated pushes to a PR will cancel all previous builds, while multiple +# merges to main will not cancel. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + +env: + FORCE_COLOR: "1" # Make tools pretty + DEFAULT_PYTHON_VERSION: "3.12" # keep in sync with tox.ini + PIP_DISABLE_PIP_VERSION_CHECK: "1" # Don't check for pip updates + +permissions: {} + +on: + push: + branches: + - main + pull_request: + branches: + - "*" + # allows this to be used as a composite action in other workflows + workflow_call: + # allow manual triggering of the workflow, while debugging + workflow_dispatch: + +jobs: + a11y-tests: + strategy: + fail-fast: true + matrix: + os: ["ubuntu-latest", "ubuntu-22.04", "macos-14", "windows-latest"] + browser: ["firefox", "chromium"] + runs-on: ${{ matrix.os }} + steps: + - name: "Checkout repository 🛎" + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + persist-credentials: false + + - name: "Setup CI environment 🛠" + uses: pydata/pydata-sphinx-theme/.github/actions/set-dev-env@01731d0cc57768b9eff1c97f38909932ecd7e7d1 + with: + python-version: ${{ env.DEFAULT_PYTHON_VERSION }} + pandoc: true + graphviz: true + + - name: "Run accessibility tests with playwright 🎭" + # build PST, build docs, then run a11y-tests + run: python -Im tox run -m a11y -- --browser ${{ matrix.browser }} diff --git a/tox.ini b/tox.ini index e6d41ed95..67327d8d0 100644 --- a/tox.ini +++ b/tox.ini @@ -76,6 +76,8 @@ commands = # run accessibility tests with Playwright and axe-core # compiling the assets is needed before running the tests # tox run -e compile,py312-docs,a11y-tests +# to specify the browser: +# tox run -e compile,py312-docs,a11y-tests -- --browser=firefox [testenv:a11y-tests] description = run accessibility tests with Playwright and axe-core base_python = py312 # keep in sync with tests.yml @@ -107,7 +109,7 @@ extras = {[testenv:docs-no-checks]extras} deps = py39-sphinx61-docs: sphinx~=6.1.0 commands = - sphinx-build -b html docs/ docs/_build/html -v --warning-file warnings.txt {posargs} + sphinx-build -b html docs/ docs/_build/html -v -w warnings.txt {posargs} python tests/utils/check_warnings.py # recommended for local development, this command will build the PST documentation @@ -121,7 +123,7 @@ set_env = PYDEVD_DISABLE_FILE_VALIDATION=1 extras = {[testenv:docs-no-checks]extras} package = editable commands = - sphinx-build -b html docs/ docs/_build/html -v --warning-file warnings.txt {posargs} + sphinx-build -b html docs/ docs/_build/html -v -w warnings.txt {posargs} python tests/utils/check_warnings.py # build the docs with live-reload, if you are working on the docs only (no theme changes) the best option is to call @@ -149,7 +151,7 @@ description = "Check external links in the documentation" extras = {[testenv:docs-no-checks]extras} allowlist_externals = bash commands = - sphinx-build -b linkcheck docs/ docs/_build/linkcheck -W --warning-file warnings.txt --keep-going -q + sphinx-build -b linkcheck docs/ docs/_build/linkcheck -W -w warnings.txt --keep-going -q bash -c "echo 'Linkcheck complete; see docs/_build/linkcheck/output.txt for any errors'" # extract translatable files into the POT file and update locale PO files From 48d47e3c0b647cf3fd218ae66e45bf8b0efb2bb3 Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Wed, 15 Jan 2025 13:06:17 +0000 Subject: [PATCH 30/31] Fix tox call for a11y tests --- .github/workflows/a11y.yml | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/a11y.yml b/.github/workflows/a11y.yml index 063cda30a..0aacd803a 100644 --- a/.github/workflows/a11y.yml +++ b/.github/workflows/a11y.yml @@ -51,4 +51,4 @@ jobs: - name: "Run accessibility tests with playwright 🎭" # build PST, build docs, then run a11y-tests - run: python -Im tox run -m a11y -- --browser ${{ matrix.browser }} + run: python -Im tox run -e compile-assets,i18n-compile,py312-docs,a11y-tests -- --browser ${{ matrix.browser }} diff --git a/tox.ini b/tox.ini index 67327d8d0..e60b62b63 100644 --- a/tox.ini +++ b/tox.ini @@ -151,7 +151,7 @@ description = "Check external links in the documentation" extras = {[testenv:docs-no-checks]extras} allowlist_externals = bash commands = - sphinx-build -b linkcheck docs/ docs/_build/linkcheck -W -w warnings.txt --keep-going -q + sphinx-build -b linkcheck docs/ docs/_build/linkcheck -w warnings.txt --keep-going -q bash -c "echo 'Linkcheck complete; see docs/_build/linkcheck/output.txt for any errors'" # extract translatable files into the POT file and update locale PO files From 568506097e60214a4687fa3aab5b617ed2748093 Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Wed, 15 Jan 2025 14:30:53 +0000 Subject: [PATCH 31/31] Remove unnecessary posargs from tox commands --- tox.ini | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index e60b62b63..34017556b 100644 --- a/tox.ini +++ b/tox.ini @@ -109,7 +109,7 @@ extras = {[testenv:docs-no-checks]extras} deps = py39-sphinx61-docs: sphinx~=6.1.0 commands = - sphinx-build -b html docs/ docs/_build/html -v -w warnings.txt {posargs} + sphinx-build -b html docs/ docs/_build/html -v -w warnings.txt python tests/utils/check_warnings.py # recommended for local development, this command will build the PST documentation @@ -183,10 +183,9 @@ commands = # compile translation catalogs to binary MO files # tox run -e i18n-compile -# tox run -e i18n-compile -- --use-fuzzy [testenv:i18n-compile] description = "Compile translation catalogs to binary MO files" extras = {[testenv:i18n-extract]extras} package = editable commands = - pybabel compile -d src/pydata_sphinx_theme/locale -D sphinx {posargs} + pybabel compile -d src/pydata_sphinx_theme/locale -D sphinx