geometor.seer.rebuild_indexes¶
Script to rebuild summary index.json files for sessions, tasks, and steps.
Attributes¶
Functions¶
|
Safely loads a JSON file, returning None on error. |
|
Counts error files (error_*.json) in a directory. |
|
Attempts to read description from existing index.json. |
|
Attempts to read title and index from existing index.json or derive index. |
|
Rebuilds the index.json for a single TaskStep directory. |
|
Rebuilds the index.json for a SessionTask directory. |
|
Rebuilds the index.json for a Session directory. |
|
Module Contents¶
- geometor.seer.rebuild_indexes.SIZE_CORRECT_KEY = 'size_correct'¶
- geometor.seer.rebuild_indexes.PALETTE_CORRECT_KEY = 'color_palette_correct'¶
- geometor.seer.rebuild_indexes.COLOR_COUNT_CORRECT_KEY = 'color_count_correct'¶
- geometor.seer.rebuild_indexes.PIXELS_OFF_KEY = 'pixels_off'¶
- geometor.seer.rebuild_indexes.PERCENT_CORRECT_KEY = 'percent_correct'¶
- geometor.seer.rebuild_indexes.MATCH_KEY = 'match'¶
- geometor.seer.rebuild_indexes.safe_load_json(file_path: pathlib.Path) Dict[str, Any] | None¶
Safely loads a JSON file, returning None on error.
- geometor.seer.rebuild_indexes.count_errors(level_dir: pathlib.Path) int¶
Counts error files (error_*.json) in a directory.
- geometor.seer.rebuild_indexes.get_level_description(level_dir: pathlib.Path) str | None¶
Attempts to read description from existing index.json.
- geometor.seer.rebuild_indexes.get_step_title_index(step_dir: pathlib.Path) Tuple[str, str]¶
Attempts to read title and index from existing index.json or derive index.
- geometor.seer.rebuild_indexes.rebuild_step_summary(step_dir: pathlib.Path, dry_run: bool = False) Dict[str, Any] | None¶
Rebuilds the index.json for a single TaskStep directory. If dry_run is True, logs the intended action instead of writing the file.
- Returns:
The summary dictionary, or None if rebuilding failed.
- geometor.seer.rebuild_indexes.rebuild_task_summary(task_dir: pathlib.Path, dry_run: bool = False) Dict[str, Any] | None¶
Rebuilds the index.json for a SessionTask directory. If dry_run is True, logs the intended action instead of writing the file.
- Returns:
The summary dictionary, or None if rebuilding failed.
- geometor.seer.rebuild_indexes.rebuild_session_summary(session_dir: pathlib.Path, dry_run: bool = False) Dict[str, Any] | None¶
Rebuilds the index.json for a Session directory. If dry_run is True, logs the intended action instead of writing the file.
- Returns:
The summary dictionary, or None if rebuilding failed.
- geometor.seer.rebuild_indexes.main()¶