toml-combine 1.0.0__py3-none-any.whl → 1.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: toml-combine
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: A tool for combining complex configurations in TOML format.
5
5
  Author-email: Joachim Jablon <ewjoachim@gmail.com>
6
6
  License-Expression: MIT
@@ -74,18 +74,28 @@ Overrides define a set of condition where they apply (`when.<dimension> =
74
74
  - In case 2 overrides are applicable and define a value for the same key, if one is more
75
75
  specific than the other (e.g. env=prod,region=us is more specific than env=prod) then
76
76
  its values will have precedence.
77
- - If they are mutually exclusive, (env=prod vs env=staging) precedence is irrelevant.
78
- - If you try to generate the configuration and 2 applicable overrides define a value for
79
- the same key, an error will be raised (e.g. env=staging and region=eu). In that case,
80
- you should add dimensions to either override to make them mutually exclusive or make
81
- one more specific than the other.
82
-
83
- Note that it's not a problem if incompatible overrides exist in your configuration, as
84
- long as they are not both applicable in the same call.
77
+ - If 2 applicable overrides both define a dimension that the other one doesn't, they're
78
+ incompatible, and running the tool with a configuration that would select both of them
79
+ will yield an error.
80
+
81
+ Examples:
82
+ - Override 1: `env=staging` & Override 2: `region=eu` are incompatible (1 defines
83
+ `env` not in 2, 2 defines `region` not in 1).
84
+ - Override 1: `env=staging` & Override 2: `env=staging, region=eu` are compatible
85
+ (all dimensions defined in 1 are also in 2)
86
+ - Override 1: `env=staging` & Override 2: `env=prod` are compatible
87
+ (they define the same dimensions)
88
+ - Override 1: `env=staging, service=frontend` & Override 2: `region=eu, service=frontend`
89
+ are incompatible (1 defines `env` not in 2, 2 defines `region` not in 1)
85
90
 
86
91
  > [!Note]
87
- > Defining a list as the value of one or more conditions in an override
88
- > means that the override will apply to any of the dimension values of the list
92
+ > Instead of defining a single value for the override dimensions, you can define a list.
93
+ > This is a shortcut to duplicating the override with each individual value:
94
+ > ```
95
+ > [[override]]
96
+ > when.environment = ["staging", "prod"]
97
+ > service_account = "my-service-account"
98
+ > ```
89
99
 
90
100
  ### The configuration itself
91
101
 
@@ -5,8 +5,8 @@ toml_combine/combiner.py,sha256=HG7KV3EGwmcHOMruhp7sMkH-uXqWKpsO7_BvhNQ2KQY,5668
5
5
  toml_combine/exceptions.py,sha256=cRAZhxg3OHgzp5hJzyxNGG_jvGUm8gG8XzndQXBhvo8,1116
6
6
  toml_combine/lib.py,sha256=jh6OG57JefpGa-WE-mLSIK6KjyJ0-1yGBynr_kiVTww,1634
7
7
  toml_combine/toml.py,sha256=iBV8xj0qWcvGp2AZaML8FCT3i2X9DL7iA6jd-wcP5Bc,814
8
- toml_combine-1.0.0.dist-info/METADATA,sha256=JxCXUhIW1v3MyM1ut0ZXbE6B6IuiXj4bf0YpwvlxGCw,8466
9
- toml_combine-1.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
- toml_combine-1.0.0.dist-info/entry_points.txt,sha256=dXUQNom54uZt_7ylEG81iNYMamYpaFo9-ItcZJU6Uzc,58
11
- toml_combine-1.0.0.dist-info/licenses/LICENSE,sha256=tA7wpipzIPGl7xL5xzMMg0RhhXz9CKOa-ZnlYzgiTKg,1059
12
- toml_combine-1.0.0.dist-info/RECORD,,
8
+ toml_combine-1.0.1.dist-info/METADATA,sha256=K0j97FCiS7tpENiP_HVoxE1b6_nLDqk_E1OklTtFhpk,8812
9
+ toml_combine-1.0.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
+ toml_combine-1.0.1.dist-info/entry_points.txt,sha256=dXUQNom54uZt_7ylEG81iNYMamYpaFo9-ItcZJU6Uzc,58
11
+ toml_combine-1.0.1.dist-info/licenses/LICENSE,sha256=tA7wpipzIPGl7xL5xzMMg0RhhXz9CKOa-ZnlYzgiTKg,1059
12
+ toml_combine-1.0.1.dist-info/RECORD,,