Skip to content

Conversation

@dworthen
Copy link
Contributor

@dworthen dworthen commented Nov 4, 2025

Move load_config to graphrag-common package.

@dworthen dworthen requested a review from a team as a code owner November 4, 2025 21:52
@dworthen dworthen requested a review from Copilot November 5, 2025 15:30
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 refactors the configuration loading system by removing the create_graphrag_config function and introducing a new load_config utility in the graphrag-common package. The changes centralize configuration parsing, improve error handling, and standardize how CLI overrides are applied across the codebase.

  • Removed create_graphrag_config function and replaced it with direct GraphRagConfig instantiation or the new graphrag_common.config.load_config utility
  • Added python-dotenv and pyyaml dependencies to graphrag-common package
  • Updated CLI override format from dot-notation strings (e.g., "output.base_dir") to nested dictionaries

Reviewed Changes

Copilot reviewed 36 out of 37 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/graphrag-common/pyproject.toml Added python-dotenv and pyyaml dependencies
packages/graphrag-common/graphrag_common/config/load_config.py New configuration loader with improved error handling and flexible parsing
packages/graphrag-common/graphrag_common/config/init.py Exports load_config and ConfigParsingError
packages/graphrag/graphrag/config/load_config.py Refactored to use graphrag_common.config.load_config
packages/graphrag/graphrag/config/create_graphrag_config.py Deleted - functionality replaced by direct GraphRagConfig instantiation
packages/graphrag/graphrag/cli/*.py Updated to use nested dict overrides instead of dot-notation strings
tests/verbs/*.py Replaced create_graphrag_config calls with direct GraphRagConfig instantiation
tests/unit/config/test_config.py Updated config loading tests to match new API signature
tests/unit/load_config/* New test suite for the load_config functionality
unified-search-app/app/*.py Updated imports and config instantiation
docs/examples_notebooks/*.ipynb Updated imports and minor formatting fixes

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

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