mirror of
https://github.com/VectifyAI/PageIndex.git
synced 2026-07-24 21:41:04 +02:00
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'.
This commit is contained in:
parent
29971049ae
commit
fec44e16e4
3 changed files with 5 additions and 4 deletions
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue