Skip to content

Conversation

@harryswift01
Copy link
Contributor

Summary

This PR removes the static config.yaml file from the CodeEntropy repository and introduces dynamic configuration loading via the ConfigManager. It improves flexibility, robustness, and portability of the entropy analysis workflow.

Changes

Removal of static configuration file:

  • Deleted config.yaml from the repository root.
  • Eliminated dependency on hardcoded configuration paths.

Dynamic configuration loading:

  • Updated ConfigManager.load_config() to search for .yaml files in the current working directory.
  • Added fallback behavior to return a default configuration ({'run1': {}}) when no config file is found or if the file is empty/unreadable.
  • Improved logging to provide informative warnings and errors during config loading.

Workflow integration:

  • Modified run_entropy_workflow() to use the current working directory for config detection.
  • Ensured the workflow remains functional even without a config file, using default values.

Impact

  • Improves portability by removing reliance on a fixed config file.
  • Enhances robustness of the workflow in diverse environments.
  • Simplifies setup for new users and supports flexible configuration management.
  • Enables better logging and error handling for configuration-related issues.

- Removed the hardcoded `config.yaml` file from the `CodeEntropy` repository.
- Updated `ConfigManager` to dynamically detect and load YAML configuration files from the current working directory.
- Added fallback behavior to use default configuration `{'run1': {}}` when no YAML file is found or if the file is empty/unreadable.
@harryswift01 harryswift01 added this to the 1.0.0 release milestone Aug 18, 2025
@harryswift01 harryswift01 requested a review from jimboid August 18, 2025 11:20
@harryswift01 harryswift01 self-assigned this Aug 18, 2025
@harryswift01 harryswift01 added the bug Something isn't working label Aug 18, 2025
@harryswift01 harryswift01 linked an issue Aug 18, 2025 that may be closed by this pull request
@harryswift01 harryswift01 changed the title Remove static config.yaml and implement dynamic config loading: Remove static config.yaml and implement dynamic config loading Aug 18, 2025
Copy link
Member

@jimboid jimboid left a comment

Choose a reason for hiding this comment

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

Looks like this will improve the usability of the software. Nice PR

@harryswift01 harryswift01 merged commit ac24c8a into main Aug 18, 2025
7 checks passed
@harryswift01 harryswift01 deleted the 124-remove-config-yaml branch August 18, 2025 14:48
jimboid pushed a commit that referenced this pull request Sep 3, 2025
Remove static `config.yaml` and implement dynamic config loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CodeEntropy gives error when no config.yaml file

3 participants