Skip to content

Conversation

@jcabrero
Copy link
Member

This PR adds the option to load configurations in a hierarchical way from a single point in the whole infrastructure. In that way, we avoid having multiple places where to load configurations.

Aside from that, the configuration is first loaded from ".env" and then if not present from "config.yaml". All the configuration values can come from both places.

@jcabrero jcabrero requested a review from Copilot September 10, 2025 07:38
Copy link
Contributor

Copilot AI left a comment

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 a hierarchical configuration system that centralizes all configuration loading through a single entry point. The system prioritizes environment variables over YAML configuration files, ensuring consistent configuration management across the infrastructure.

Key changes:

  • Restructured configuration architecture with Pydantic models for type safety and validation
  • Replaced scattered environment variable access with a unified CONFIG object
  • Added comprehensive YAML configuration support with environment variable overrides

Reviewed Changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
nilai-api/src/nilai_api/config/init.py Complete rewrite to implement hierarchical configuration with Pydantic models
nilai-api/src/nilai_api/config/utils.py New utility functions for YAML loading and configuration model creation
nilai-api/src/nilai_api/config/*.py New configuration modules for different system components
Multiple test and source files Updated imports and references to use the new CONFIG object
.env.ci Added new NilDB configuration variables

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@blefo blefo left a comment

Choose a reason for hiding this comment

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

Looks good to me! It's a good update for everything related to config

@jcabrero jcabrero changed the base branch from feat/nildb_prompt_storage to main September 12, 2025 13:30
@jcabrero jcabrero merged commit 90b39c4 into main Sep 12, 2025
8 checks passed
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