Skip to content

Add YAML settings#104

Merged
AndreuCodina merged 1 commit into
mainfrom
feature/add-yaml-settings
Jun 16, 2026
Merged

Add YAML settings#104
AndreuCodina merged 1 commit into
mainfrom
feature/add-yaml-settings

Conversation

@AndreuCodina

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 16, 2026 15:50
@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 99.461% (+0.001%) from 99.46% — feature/add-yaml-settings into main

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces YAML-based settings files into Wirio’s settings system, updating defaults, documentation, and tests accordingly, and extracting the JSON “flattening” parser into an internal module reused by the YAML provider.

Changes:

  • Add YamlSettingsProvider / YamlSettingsSource and make YAML files the default settings file format (settings.yaml, settings.{environment}.yaml).
  • Extract the settings-file “flattening” logic into wirio.settings._json._json_settings_file_parser.
  • Update tests and documentation to reflect YAML usage and add PyYAML as a dependency.

Reviewed changes

Copilot reviewed 9 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
uv.lock Adds pyyaml to the locked dependency set.
pyproject.toml Adds PyYAML as a runtime dependency.
src/wirio/settings/settings_manager.py Switches default providers and public API toward YAML (add_yaml_file, add_default_providers).
src/wirio/settings/yaml/yaml_settings_provider.py Implements YAML file loading via yaml.safe_load and flattens values into settings keys.
src/wirio/settings/yaml/yaml_settings_source.py Builds a YAML settings provider for the manager.
src/wirio/settings/_json/_json_settings_file_parser.py New internal parser that flattens nested structures into :-delimited keys.
src/wirio/settings/_json/init.py Adds internal package marker for the JSON parser.
src/wirio/settings/aws_secrets_manager/aws_secrets_manager_settings_provider.py Updates import to use the new internal JSON parser module.
tests/settings/yaml/test_yaml_settings_provider.py Replaces JSON provider tests with YAML provider tests and adds empty-file behavior.
tests/settings/yaml/init.py Adds test package marker for YAML settings tests.
tests/settings/test_settings_manager.py Updates default-provider expectations from JSON to YAML and adjusts method name patching.
tests/settings/json/test_json_settings_file_parser.py Updates test import path to the extracted internal JSON parser.
docs/pages/core-concepts/settings.md Updates docs to describe YAML defaults and YAML examples.
Comments suppressed due to low confidence (1)

tests/settings/yaml/test_yaml_settings_provider.py:136

  • notes_2 is added to the model and included in the YAML input, but the test never asserts the parsed value. Adding an assertion here would ensure null/empty YAML scalars are handled as expected for optional fields.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/wirio/settings/settings_manager.py
@AndreuCodina
AndreuCodina merged commit 6207f64 into main Jun 16, 2026
24 checks passed
@AndreuCodina
AndreuCodina deleted the feature/add-yaml-settings branch June 16, 2026 15:55
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.

3 participants