Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config loading and hierarchical merging #223

Merged
merged 4 commits into from Sep 1, 2022
Merged

Conversation

amyreese
Copy link
Member

Summary

First piece of config loading based on the proposal in https://github.com/amyreese/Fixit/tree/config-prototype

  • Walks the tree up from a target path to either a config with root = true or the top of the drive/filesystem.
  • Loads all discovered files using tomllib/tomli.
  • Basic priority-based overrides of values from outer configs.

Future work will add support for more intelligent merging of values rather than strict overrides, as well as support for multiple path-based overrides in a single config.

Test Plan

Tests!

@amyreese amyreese added the enhancement New feature or request label Aug 30, 2022
@amyreese amyreese requested a review from zsol August 30, 2022 02:02
@amyreese amyreese self-assigned this Aug 30, 2022
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 30, 2022
src/fixit/config.py Outdated Show resolved Hide resolved
@amyreese amyreese merged commit c95b0ef into Instagram:next Sep 1, 2022
@amyreese amyreese deleted the config branch September 1, 2022 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants