Add layered configuration files - #102
Merged
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for layered configuration loading (optional system config + platformdirs user config) while preserving explicit --config-file behavior, and introduces config --output/-o to export configuration to an arbitrary path. This extends MILC’s config discovery/saving model and updates documentation/tests accordingly.
Changes:
- Load an optional “system” config file first, then overlay the platformdirs user config (user values win), while keeping
--config-fileas an explicit single-file mode. - Allow saving configuration to an explicit path via
save_config(path)and expose that viaconfig --output/-o. - Add tests and documentation describing layered config behavior and export support.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_config_file_search.py | Adds coverage for system+user layering, explicit --config-file bypass, and config --output export behavior. |
| milc/subcommand/config.py | Adds --output/-o option and writes config to an explicit path when requested. |
| milc/milc.py | Implements layered config reads, adds explicit-path support to saving, and updates internal save logic to use the target path’s directory. |
| milc/milc_interface.py | Plumbs config_file through milc_options() and adds optional-path support to save_config(). |
| docs/subcommand_config.md | Documents config --output usage. |
| docs/metadata.md | Documents milc_options(config_file=...) layered system config behavior. |
| docs/configuration.md | Documents system config layering and explicit-path saving. |
| docs/api_subcommand_config.md | Updates API docs to include the new --output argument. |
| docs/api_milc.md | Updates API docs for new MILC.__init__ and save_config() signatures. |
| docs/api_milc_interface.md | Updates API docs for new milc_options() and save_config() signatures. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
skullydazed
commented
Aug 1, 2026
skullydazed
commented
Aug 1, 2026
skullydazed
commented
Aug 1, 2026
Co-authored-by: Zach White <skullydazed@drpepper.org>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--config-filebehaviorconfig --output/-ofor exporting configurationTesting
uv run pytestuv run ruff check milc/milc.py milc/milc_interface.py milc/subcommand/config.py tests/test_config_file_search.py