composition
- Dominant language
- Python
- Stars
- 424
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Description
Compositions of configurations should be defined independent of the sources of those configurations.
Let us define a composition operator for configurations: `override`. **`override`** takes two configurations, `top` and `bottom`, and returns a new configuration with a union of every variable in the two configurations with the values from `top` taking precedence. In general, clients will start with a configuration of defaults and apply a sequence of overrides.
`override` may optionally throw, warn, or ignore overrides that do not exist in `bottom`. Ignore is a good option for migrating configurations across client versions. If a client updates from version 1 to 2 and drops configuration variable "x", a good migration tool will silently drop overrides of "x" in old configurations. Warn and throw are good for clients of varying pedantry.
`override` may optionally type check overrides. Some clients may want to delay validation until use, to avoid validating unused variables. Some may want pedantic validation of all overrides.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.