Skip to content

feat: add opt-in layered configuration profile (#60) - #82

Merged
codeforester merged 1 commit into
mainfrom
enhancement/60-20260804-batteries-included-config
Aug 4, 2026
Merged

codeforester merged 1 commit into
mainfrom
enhancement/60-20260804-batteries-included-config

Conversation

@codeforester

Copy link
Copy Markdown
Contributor

Summary

Implements #60 with an opt-in batteries-included configuration profile while preserving the convention-free generic profile.

What changed

  • Added CliProfile.batteries_included() with platform-aware user config roots and configurable filenames/directories.
  • Added deterministic defaults → user → project → user environment → project environment → explicit file → CLI precedence.
  • Added recursive mapping merges, scalar/list replacement semantics, immutable per-key provenance, and environment selection from --environment or base configuration.
  • Added typed ConfigSnapshot and FrameworkConfig boundaries; reserved environment, log_level, and keep_temp settings are validated separately from consumer configuration.
  • Added Context.framework_config and Context.config_provenance without changing generic profile behavior or existing positional field order.
  • Added strict path/name safety, platform config-root helpers, migration documentation, and regression coverage.

Validation

  • python -m pytest -q — passed
  • mypy --strict examples/typed_consumer.py lib/python/base_cli/config.py lib/python/base_cli/profile.py lib/python/base_cli/context.py — passed
  • ./tests/validate.sh — passed
  • python -m build --outdir /private/tmp/base-cli-60-dist — sdist and wheel built successfully
  • git diff --check — passed

Closes #60

@codeforester
codeforester merged commit b2254a1 into main Aug 4, 2026
17 checks passed
@codeforester
codeforester deleted the enhancement/60-20260804-batteries-included-config branch August 4, 2026 15:37
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.

Provide an optional batteries-included configuration profile

1 participant