toml-combine 0.1.4__tar.gz → 0.1.6__tar.gz
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.
- {toml_combine-0.1.4 → toml_combine-0.1.6}/PKG-INFO +7 -6
- {toml_combine-0.1.4 → toml_combine-0.1.6}/README.md +6 -5
- toml_combine-0.1.4/.github/workflows/coverage-comment.yml +0 -21
- toml_combine-0.1.4/.github/workflows/pr-labels.yml +0 -42
- {toml_combine-0.1.4 → toml_combine-0.1.6}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {toml_combine-0.1.4 → toml_combine-0.1.6}/.github/renovate.json5 +0 -0
- {toml_combine-0.1.4 → toml_combine-0.1.6}/.github/workflows/ci.yml +0 -0
- {toml_combine-0.1.4 → toml_combine-0.1.6}/.pre-commit-config.yaml +0 -0
- {toml_combine-0.1.4 → toml_combine-0.1.6}/pyproject.toml +0 -0
- {toml_combine-0.1.4 → toml_combine-0.1.6}/tests/result.json +0 -0
- {toml_combine-0.1.4 → toml_combine-0.1.6}/tests/test.toml +0 -0
- {toml_combine-0.1.4 → toml_combine-0.1.6}/tests/test_cli.py +0 -0
- {toml_combine-0.1.4 → toml_combine-0.1.6}/tests/test_combiner.py +0 -0
- {toml_combine-0.1.4 → toml_combine-0.1.6}/tests/test_lib.py +0 -0
- {toml_combine-0.1.4 → toml_combine-0.1.6}/toml_combine/__init__.py +0 -0
- {toml_combine-0.1.4 → toml_combine-0.1.6}/toml_combine/__main__.py +0 -0
- {toml_combine-0.1.4 → toml_combine-0.1.6}/toml_combine/cli.py +0 -0
- {toml_combine-0.1.4 → toml_combine-0.1.6}/toml_combine/combiner.py +0 -0
- {toml_combine-0.1.4 → toml_combine-0.1.6}/toml_combine/exceptions.py +0 -0
- {toml_combine-0.1.4 → toml_combine-0.1.6}/toml_combine/toml.py +0 -0
- {toml_combine-0.1.4 → toml_combine-0.1.6}/uv.lock +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: toml-combine
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.6
|
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
|
@@ -19,10 +19,11 @@ Description-Content-Type: text/markdown
|
|
19
19
|
|
20
20
|
# Toml-combine
|
21
21
|
|
22
|
-
`toml-combine` is a Python lib and CLI-tool that reads a
|
23
|
-
a default configuration
|
24
|
-
final configurations.
|
25
|
-
want to describe them all without repeating the
|
22
|
+
`toml-combine` is a Python lib and CLI-tool that reads a TOML configuration file
|
23
|
+
defining a default configuration alongside with overrides, and merges everything
|
24
|
+
following rules you define to get final configurations. Let's say: you have multiple
|
25
|
+
services, and environments, and you want to describe them all without repeating the
|
26
|
+
parts that are common to everyone.
|
26
27
|
|
27
28
|
## Concepts
|
28
29
|
|
@@ -55,7 +56,7 @@ service_account = "my-staging-service-account"
|
|
55
56
|
### Dimensions
|
56
57
|
|
57
58
|
Consider all the configurations you want to generate. Each one differs from the others.
|
58
|
-
Dimensions lets you describe the main "thing" that makes
|
59
|
+
Dimensions lets you describe the main "thing" that makes the outputs differents, e.g.:
|
59
60
|
`environment` might be `staging` or `production`, region might be `eu` or `us`, and
|
60
61
|
service might be `frontend` or `backend`. Some combinations of dimensions might not
|
61
62
|
exists, for example, maybe there's no `staging` in `eu`.
|
@@ -1,9 +1,10 @@
|
|
1
1
|
# Toml-combine
|
2
2
|
|
3
|
-
`toml-combine` is a Python lib and CLI-tool that reads a
|
4
|
-
a default configuration
|
5
|
-
final configurations.
|
6
|
-
want to describe them all without repeating the
|
3
|
+
`toml-combine` is a Python lib and CLI-tool that reads a TOML configuration file
|
4
|
+
defining a default configuration alongside with overrides, and merges everything
|
5
|
+
following rules you define to get final configurations. Let's say: you have multiple
|
6
|
+
services, and environments, and you want to describe them all without repeating the
|
7
|
+
parts that are common to everyone.
|
7
8
|
|
8
9
|
## Concepts
|
9
10
|
|
@@ -36,7 +37,7 @@ service_account = "my-staging-service-account"
|
|
36
37
|
### Dimensions
|
37
38
|
|
38
39
|
Consider all the configurations you want to generate. Each one differs from the others.
|
39
|
-
Dimensions lets you describe the main "thing" that makes
|
40
|
+
Dimensions lets you describe the main "thing" that makes the outputs differents, e.g.:
|
40
41
|
`environment` might be `staging` or `production`, region might be `eu` or `us`, and
|
41
42
|
service might be `frontend` or `backend`. Some combinations of dimensions might not
|
42
43
|
exists, for example, maybe there's no `staging` in `eu`.
|
@@ -1,21 +0,0 @@
|
|
1
|
-
name: Post coverage comment
|
2
|
-
|
3
|
-
on:
|
4
|
-
workflow_run:
|
5
|
-
workflows: ["CI"]
|
6
|
-
types:
|
7
|
-
- completed
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
test:
|
11
|
-
name: Run tests & display coverage
|
12
|
-
runs-on: ubuntu-latest
|
13
|
-
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
|
14
|
-
steps:
|
15
|
-
# DO NOT run actions/checkout@v2 here, for securitity reasons
|
16
|
-
# For details, refer to https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
|
17
|
-
- name: Post comment
|
18
|
-
uses: ewjoachim/python-coverage-comment-action@v3
|
19
|
-
with:
|
20
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
21
|
-
GITHUB_PR_RUN_ID: ${{ github.event.workflow_run.id }}
|
@@ -1,42 +0,0 @@
|
|
1
|
-
name: Label PR
|
2
|
-
|
3
|
-
on:
|
4
|
-
pull_request_target:
|
5
|
-
types:
|
6
|
-
- opened
|
7
|
-
- reopened
|
8
|
-
- edited
|
9
|
-
|
10
|
-
jobs:
|
11
|
-
label:
|
12
|
-
name: Label PR
|
13
|
-
runs-on: ubuntu-latest
|
14
|
-
permissions:
|
15
|
-
pull-requests: write
|
16
|
-
steps:
|
17
|
-
- run: |
|
18
|
-
export LABELS=$(gh repo view $REPO --json="labels" --jq='.labels[].name | select(startswith(env.PREFIX))')
|
19
|
-
python <(cat <<EOF
|
20
|
-
import sys, os
|
21
|
-
from urllib.parse import quote
|
22
|
-
url = f"https://github.com/{os.environ['REPO']}/labels/"
|
23
|
-
labels = os.environ['LABELS'].strip().splitlines()
|
24
|
-
prefix = os.environ['PREFIX']
|
25
|
-
checked = "- [x] "
|
26
|
-
unchecked = "- [ ] "
|
27
|
-
for line in os.environ["BODY"].splitlines():
|
28
|
-
for label in labels:
|
29
|
-
if label.startswith(prefix) and line.strip().endswith(url + quote(label)):
|
30
|
-
if line.strip().startswith(checked):
|
31
|
-
print(f"--add-label={label}")
|
32
|
-
elif line.strip().startswith(unchecked):
|
33
|
-
print(f"--remove-label={label}")
|
34
|
-
EOF
|
35
|
-
) | xargs --no-run-if-empty --delimiter '\n' gh pr --repo $REPO edit $NUMBER
|
36
|
-
|
37
|
-
env:
|
38
|
-
PREFIX: "PR type: "
|
39
|
-
REPO: procrastinate-org/procrastinate
|
40
|
-
BODY: ${{github.event.pull_request.body}}
|
41
|
-
NUMBER: ${{ github.event.pull_request.number }}
|
42
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|