From fec44e16e4860f7dea024357769c06d1e030a6b4 Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 14 Jul 2026 17:49:55 +0800 Subject: [PATCH] docs: correct stale config.yaml claims and CLI help default config.yaml was restored as the CLI config base, but the ConfigLoader docstring and a test docstring still claimed it no longer ships, and the --if-add-doc-description help said 'on by default' while the config.yaml base sets it to 'no'. --- pageindex/index/utils.py | 5 +++-- run_pageindex.py | 2 +- tests/test_legacy_shims.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pageindex/index/utils.py b/pageindex/index/utils.py index 130ca87..75db970 100644 --- a/pageindex/index/utils.py +++ b/pageindex/index/utils.py @@ -942,8 +942,9 @@ def add_node_text_with_labels(node, pdf_pages): class ConfigLoader: - """Legacy 0.2.x config helper. Defaults now come from IndexConfig — the - old ``config.yaml`` no longer ships. Prefer ``pageindex.IndexConfig``. + """Legacy 0.2.x config helper. Defaults now come from IndexConfig; this + class no longer reads the packaged ``config.yaml`` (the CLI still uses it + via ``IndexConfig.from_yaml``). Prefer ``pageindex.IndexConfig``. """ def __init__(self, default_path=None): diff --git a/run_pageindex.py b/run_pageindex.py index 3b5662b..faf7ba7 100644 --- a/run_pageindex.py +++ b/run_pageindex.py @@ -32,7 +32,7 @@ if __name__ == "__main__": parser.add_argument('--if-add-node-summary', nargs='?', const=True, type=_cli_bool, default=None, help='Add node summaries (on by default). Bare flag or yes/no') parser.add_argument('--if-add-doc-description', nargs='?', const=True, type=_cli_bool, default=None, - help='Add a document description (on by default). Bare flag or yes/no') + help='Add a document description (off by default). Bare flag or yes/no') parser.add_argument('--if-add-node-text', nargs='?', const=True, type=_cli_bool, default=None, help='Add raw text to nodes (off by default). Bare flag or yes/no') diff --git a/tests/test_legacy_shims.py b/tests/test_legacy_shims.py index d24e2f3..1c57fc4 100644 --- a/tests/test_legacy_shims.py +++ b/tests/test_legacy_shims.py @@ -63,7 +63,7 @@ def test_get_leaf_nodes_has_331_fix(): def test_configloader_no_longer_needs_config_yaml(): - """config.yaml was removed; ConfigLoader must build defaults from IndexConfig.""" + """ConfigLoader must build defaults from IndexConfig, not read config.yaml.""" from pageindex.index.utils import ConfigLoader cfg = ConfigLoader().load({"model": "gpt-5.4"}) assert cfg.model == "gpt-5.4"