Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions compass/utilities/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ def load_config(config_fp):
"""
config_fp = Path(config_fp)

if not config_fp.exists():
msg = f"Config file does not exist: {config_fp}"
raise COMPASSValueError(msg)
Comment on lines +222 to +224
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docstring's "Raises" section should be updated to document the new error condition. It currently only mentions the case when the config file doesn't end with .json or .json5, but it should also mention that COMPASSValueError is raised when the config file does not exist.

Copilot uses AI. Check for mistakes.

if config_fp.suffix == ".json5":
with config_fp.open(encoding="utf-8") as fh:
return pyjson5.decode_io(fh)
Expand Down
Loading