Skip to content

Add layered configuration files - #102

Merged
skullydazed merged 6 commits into
masterfrom
copilot/layered-config-files
Aug 1, 2026
Merged

Add layered configuration files#102
skullydazed merged 6 commits into
masterfrom
copilot/layered-config-files

Conversation

@skullydazed

Copy link
Copy Markdown
Collaborator

Summary

  • load an optional system config before the platformdirs user config
  • keep platformdirs as the normal save target and preserve standalone --config-file behavior
  • add config --output/-o for exporting configuration

Testing

  • uv run pytest
  • uv run ruff check milc/milc.py milc/milc_interface.py milc/subcommand/config.py tests/test_config_file_search.py

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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-file as an explicit single-file mode.
  • Allow saving configuration to an explicit path via save_config(path) and expose that via config --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.

Comment thread milc/milc.py
Comment thread milc/milc.py
skullydazed and others added 2 commits August 1, 2026 11:09
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread docs/configuration.md Outdated
Comment thread docs/configuration.md Outdated
Comment thread milc/milc.py Outdated
skullydazed and others added 3 commits August 1, 2026 11:35
Co-authored-by: Zach White <skullydazed@drpepper.org>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@skullydazed
skullydazed merged commit 83ebd38 into master Aug 1, 2026
15 checks passed
@skullydazed
skullydazed deleted the copilot/layered-config-files branch August 1, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants