From ea797c4568e6c3baf7cecb2d9c006f8cb9f48cb8 Mon Sep 17 00:00:00 2001 From: bugfix-mission Date: Thu, 23 Apr 2026 00:40:57 +0800 Subject: [PATCH 1/4] fix(docs): rename mkdocstrings 'import' option to 'inventories' The mkdocstrings-python handler renamed its 'import' configuration key to 'inventories'. With the pinned mkdocstrings[python]==0.30.1, mkdocs build fails with 'PythonConfig.__init__() got an unexpected keyword argument import', breaking the Read the Docs publication. --- mkdocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index 6e3ca61..78caf7d 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -71,7 +71,7 @@ plugins: handlers: python: # Set up cross-references to Python types - import: + inventories: - https://docs.python.org/3/objects.inv paths: [src] options: From faa7627b796311b3b739c4b6a14d45a6e9ee492b Mon Sep 17 00:00:00 2001 From: benoit74 Date: Tue, 26 May 2026 13:37:19 +0000 Subject: [PATCH 2/4] Build mkdoc in tests to confirm it is working ok --- .github/workflows/Tests.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/Tests.yaml b/.github/workflows/Tests.yaml index efed325..29a6a05 100644 --- a/.github/workflows/Tests.yaml +++ b/.github/workflows/Tests.yaml @@ -118,3 +118,33 @@ jobs: - name: Ensure we can build JS package run: yarn pack working-directory: javascript + + build-docs: # validate that doc can be built + runs-on: ubuntu-24.04 + needs: generate-rules + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version-file: pyproject.toml + architecture: x64 + + - name: Install dependencies (and project) + run: | + pip install -U pip hatch + pip install -e .[docs] + + - name: Build mkdoc documentation + run: hatch run docs:build + + - name: Save doc artifact + uses: actions/upload-artifact@v4 + with: + path: | + site/ + name: doc + retention-days: 1 From 2b285f658a9e2a5d2ef30457b59ec495bda3e34f Mon Sep 17 00:00:00 2001 From: benoit74 Date: Tue, 26 May 2026 14:24:52 +0000 Subject: [PATCH 3/4] Fix broken badges on README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5b0a1b2..c58f36a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # zimscraperlib -[![Build Status](https://github.com/openzim/python-scraperlib/workflows/CI/badge.svg?query=branch%3Amain)](https://github.com/openzim/python-scraperlib/actions?query=branch%3Amain) +[![QA Status](https://github.com/openzim/python-scraperlib/workflows/QA/badge.svg?query=branch%3Amain)](https://github.com/openzim/python-scraperlib/actions/workflows/QA.yaml) +[![Tests Status](https://github.com/openzim/python-scraperlib/workflows/Tests/badge.svg?query=branch%3Amain)](https://github.com/openzim/python-scraperlib/actions/workflows/Tests.yaml) [![CodeFactor](https://www.codefactor.io/repository/github/openzim/python-scraperlib/badge)](https://www.codefactor.io/repository/github/openzim/python-scraperlib) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![PyPI version shields.io](https://img.shields.io/pypi/v/zimscraperlib.svg)](https://pypi.org/project/zimscraperlib/) From f303f4d234067ad5fa5ac50aaf7f609aa6a0fb3e Mon Sep 17 00:00:00 2001 From: benoit74 Date: Tue, 26 May 2026 14:40:49 +0000 Subject: [PATCH 4/4] Pin pygments version as well --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 933b816..33a8c2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -78,6 +78,7 @@ docs = [ "pymdown-extensions==10.17.1", "mkdocs-gen-files==0.5.0", "mkdocs-literate-nav==0.6.2", + "pygments==2.19.2", # See https://github.com/pygments/pygments/issues/3076 ] dev = [ "ipython==9.7.0",