fix(zim): correct config_indexing docstring to full-text only by Bojun-Vvibe · Pull Request #297 · openzim/python-scraperlib · GitHub
Skip to content

fix(zim): correct config_indexing docstring to full-text only#297

Merged
benoit74 merged 1 commit into
openzim:mainfrom
Bojun-Vvibe:fix/openzim-python-scraperlib-294
May 26, 2026
Merged

fix(zim): correct config_indexing docstring to full-text only#297
benoit74 merged 1 commit into
openzim:mainfrom
Bojun-Vvibe:fix/openzim-python-scraperlib-294

Conversation

@Bojun-Vvibe

Copy link
Copy Markdown

Closes #294

Repo

openzim/python-scraperlib

Issue

#294

Root cause

The docstring of Creator.config_indexing in src/zimscraperlib/zim/creator.py stated it toggled "full-text and title indexing of entries". In reality, libzim's config_indexing only toggles the full-text index; the title index is always built. The python-scraperlib documentation was therefore misleading.

Fix

Updated the docstring of Creator.config_indexing to state it toggles full-text indexing only and added an explicit note that title indexing is always performed by libzim and cannot be disabled via this method.

Regression test

tests/zim/test_zim_creator.py::test_config_indexing_docstring_only_mentions_full_text asserts the docstring contains "full-text" and does NOT contain the misleading phrase "full-text and title indexing".

Risk

trivial

Verification

Local pytest plugin environment was broken (missing textual module unrelated to this repo). Verified the fix via AST inspection of the updated source: the docstring contains "full-text" and no longer contains "full-text and title indexing" — matching the regression test's assertions. Result: PASS.

@benoit74 benoit74 marked this pull request as ready for review May 26, 2026 13:30
@benoit74 benoit74 force-pushed the fix/openzim-python-scraperlib-294 branch 2 times, most recently from 554db68 to f2f4f1c Compare May 26, 2026 13:30
@benoit74 benoit74 self-requested a review May 26, 2026 13:31
@benoit74

Copy link
Copy Markdown
Collaborator

The docstring of Creator.config_indexing claimed it toggled both
full-text and title indexing, but libzim only toggles the full-text
index; the title index is always built. Update the docstring to
reflect libzim's actual behaviour and add a regression test.
@benoit74 benoit74 force-pushed the fix/openzim-python-scraperlib-294 branch from f2f4f1c to e8708cb Compare May 26, 2026 14:08
@codecov

codecov Bot commented May 26, 2026

Copy link
Copy Markdown

@benoit74 benoit74 merged commit d6bd4b3 into openzim:main May 26, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix documentation of config_indexing

2 participants