Skip to content

Generalise locating configuration files in 'settings' - #1086

Merged
pjbriggs merged 3 commits into
develfrom
settings-generalise-locating-config-file
Aug 27, 2025
Merged

pjbriggs merged 3 commits into
develfrom
settings-generalise-locating-config-file

Conversation

@pjbriggs

Copy link
Copy Markdown
Member

Generalises the locate_settings_file function in the settings module, so that it can operate with arbitrary config file names, search one or more environment variables specified by the calling subprogram, and use a custom search path also specified by the calling subprogram.

When the function is used from within the Settings class to search for the auto_process.ini file, then the name, the environment variable (AUTO_PROCESS_CONF) and search path (current directory, config directory and installation directory) are now provided expliciting within that class (rather than implicitly within the locate_settings_file function).

This update will allow the locate_settings_file function to be reused in other packages. It should also provide some additional flexibility if needed in future.

@pjbriggs
pjbriggs merged commit b54c1a3 into devel Aug 27, 2025
7 checks passed
@pjbriggs
pjbriggs deleted the settings-generalise-locating-config-file branch August 27, 2025 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant