Skip to content

Resolve config-relative paths from the config file directory#1502

Open
biefan wants to merge 1 commit intoAzure:mainfrom
biefan:resolve-config-relative-paths-from-config-dir
Open

Resolve config-relative paths from the config file directory#1502
biefan wants to merge 1 commit intoAzure:mainfrom
biefan:resolve-config-relative-paths-from-config-dir

Conversation

@biefan
Copy link
Contributor

@biefan biefan commented Mar 17, 2026

Summary

  • resolve relative initialization_scripts and env_files from the configuration file directory when loading YAML config files
  • preserve the existing current-working-directory behavior for CLI path overrides
  • add regression tests for both from_yaml_file() and load_with_overrides(config_file=...)

Problem

ConfigurationLoader currently resolves relative initialization_scripts and env_files from the caller's working directory. When a config file lives in another directory, values like ./scripts/init.py or ./env/local.env point to the wrong files.

Validation

  • .venv/bin/pytest tests/unit/setup -q
  • .venv/bin/ruff check pyrit/setup/configuration_loader.py tests/unit/setup/test_configuration_loader.py

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.

1 participant