markdown-include-variants 0.0.8__tar.gz → 0.0.10__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.
- markdown_include_variants-0.0.10/.github/dependabot.yml +33 -0
- markdown_include_variants-0.0.10/.github/latest-changes.yml +6 -0
- markdown_include_variants-0.0.10/.github/pr-push.yml +2 -0
- markdown_include_variants-0.0.10/.github/pr-submit.yml +3 -0
- markdown_include_variants-0.0.10/.github/workflows/bump-pre-commit-hooks.yml +73 -0
- markdown_include_variants-0.0.10/.github/workflows/create-draft-release.yml +54 -0
- markdown_include_variants-0.0.10/.github/workflows/issue-manager.yml +32 -0
- markdown_include_variants-0.0.10/.github/workflows/pre-commit.yml +96 -0
- markdown_include_variants-0.0.10/.github/workflows/prepare-release.yml +80 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/.github/workflows/publish.yml +7 -5
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/.github/workflows/smokeshow.yml +10 -7
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/.github/workflows/test.yml +36 -41
- markdown_include_variants-0.0.10/.github/workflows/zizmor.yml +22 -0
- markdown_include_variants-0.0.10/.pre-commit-config.yaml +60 -0
- markdown_include_variants-0.0.10/.python-version +1 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/PKG-INFO +51 -18
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/README.md +48 -15
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/pyproject.toml +10 -3
- markdown_include_variants-0.0.10/release-notes.md +165 -0
- markdown_include_variants-0.0.10/scripts/add_latest_release_date.py +40 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/scripts/lint.sh +1 -0
- markdown_include_variants-0.0.10/scripts/prepare_release.py +216 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/src/markdown_include_variants/_main.py +125 -228
- markdown_include_variants-0.0.10/src/markdown_include_variants/_version.py +1 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/tests/test_all_variants.py +180 -180
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/tests/test_all_variants_folder.py +91 -91
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/tests/test_another_preferred_variant.py +2 -2
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/tests/test_no_py39.py +2 -2
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/tests/test_only_preview.py +0 -2
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/tests/test_only_py_no_an.py +1 -1
- markdown_include_variants-0.0.10/tests/test_prepare_release.py +304 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/tests/test_simple_hl.py +5 -15
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/tests/test_simple_ln.py +28 -88
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/tests/test_simple_ln_hl.py +25 -61
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/tests/test_simple_no_configs.py +4 -12
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/tests/test_simple_title.py +2 -6
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/tests/test_up_to_py39.py +6 -6
- markdown_include_variants-0.0.10/tests/test_variant_discovery.py +350 -0
- markdown_include_variants-0.0.10/uv.lock +769 -0
- markdown_include_variants-0.0.8/.github/DISCUSSION_TEMPLATE/questions.yml +0 -127
- markdown_include_variants-0.0.8/.github/FUNDING.yml +0 -1
- markdown_include_variants-0.0.8/.github/ISSUE_TEMPLATE/config.yml +0 -10
- markdown_include_variants-0.0.8/.github/ISSUE_TEMPLATE/privileged.yml +0 -22
- markdown_include_variants-0.0.8/.github/dependabot.yml +0 -16
- markdown_include_variants-0.0.8/.github/labeler.yml +0 -10
- markdown_include_variants-0.0.8/.github/workflows/issue-manager.yml +0 -43
- markdown_include_variants-0.0.8/.github/workflows/labeler.yml +0 -33
- markdown_include_variants-0.0.8/.github/workflows/latest-changes.yml +0 -40
- markdown_include_variants-0.0.8/.pre-commit-config.yaml +0 -25
- markdown_include_variants-0.0.8/.python-version +0 -1
- markdown_include_variants-0.0.8/release-notes.md +0 -92
- markdown_include_variants-0.0.8/src/markdown_include_variants/_version.py +0 -1
- markdown_include_variants-0.0.8/uv.lock +0 -693
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/.gitignore +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/CITATION.cff +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/LICENSE +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/all_variants/tutorial001_an_py310.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/all_variants/tutorial001_an_py311.py +0 -0
- /markdown_include_variants-0.0.8/docs_src/all_variants/tutorial001_an.py → /markdown_include_variants-0.0.10/docs_src/all_variants/tutorial001_an_py38.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/all_variants/tutorial001_an_py39.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/all_variants/tutorial001_py310.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/all_variants/tutorial001_py311.py +0 -0
- /markdown_include_variants-0.0.8/docs_src/all_variants/tutorial001.py → /markdown_include_variants-0.0.10/docs_src/all_variants/tutorial001_py38.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/all_variants/tutorial001_py39.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/all_variants_folder/app_an_py310/tutorial001.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/all_variants_folder/app_an_py311/tutorial001.py +0 -0
- {markdown_include_variants-0.0.8/docs_src/all_variants_folder/app_an → markdown_include_variants-0.0.10/docs_src/all_variants_folder/app_an_py38}/tutorial001.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/all_variants_folder/app_an_py39/tutorial001.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/all_variants_folder/app_py310/tutorial001.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/all_variants_folder/app_py311/tutorial001.py +0 -0
- {markdown_include_variants-0.0.8/docs_src/all_variants_folder/app → markdown_include_variants-0.0.10/docs_src/all_variants_folder/app_py38}/tutorial001.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/all_variants_folder/app_py39/tutorial001.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/no_py39/tutorial001_an_py310.py +0 -0
- /markdown_include_variants-0.0.8/docs_src/no_py39/tutorial001_an.py → /markdown_include_variants-0.0.10/docs_src/no_py39/tutorial001_an_py38.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/no_py39/tutorial001_py310.py +0 -0
- /markdown_include_variants-0.0.8/docs_src/no_py39/tutorial001.py → /markdown_include_variants-0.0.10/docs_src/no_py39/tutorial001_py38.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/only_py310/tutorial001_an_py310.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/only_py310/tutorial001_py310.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/only_py310_no_an_folder/app_py310/tutorial001.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/only_py_no_an/tutorial001_py310.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/only_py_no_an/tutorial001_py311.py +0 -0
- /markdown_include_variants-0.0.8/docs_src/only_py_no_an/tutorial001.py → /markdown_include_variants-0.0.10/docs_src/only_py_no_an/tutorial001_py38.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/only_py_no_an/tutorial001_py39.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/simple/tutorial001.py +0 -0
- /markdown_include_variants-0.0.8/docs_src/up_to_py39/tutorial001_an.py → /markdown_include_variants-0.0.10/docs_src/up_to_py39/tutorial001_an_py38.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/up_to_py39/tutorial001_an_py39.py +0 -0
- /markdown_include_variants-0.0.8/docs_src/up_to_py39/tutorial001.py → /markdown_include_variants-0.0.10/docs_src/up_to_py39/tutorial001_py38.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/docs_src/up_to_py39/tutorial001_py39.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/scripts/format.sh +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/scripts/test.sh +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/src/markdown_include_variants/__init__.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/src/markdown_include_variants/py.typed +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/tests/test_only_py310.py +0 -0
- {markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/tests/test_only_py310_no_an_folder.py +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
# GitHub Actions
|
|
4
|
+
- package-ecosystem: "github-actions"
|
|
5
|
+
directory: "/"
|
|
6
|
+
schedule:
|
|
7
|
+
interval: "monthly"
|
|
8
|
+
commit-message:
|
|
9
|
+
prefix: ⬆
|
|
10
|
+
cooldown:
|
|
11
|
+
default-days: 7
|
|
12
|
+
labels:
|
|
13
|
+
- "internal"
|
|
14
|
+
- "dependencies"
|
|
15
|
+
- "github_actions"
|
|
16
|
+
groups:
|
|
17
|
+
github-actions:
|
|
18
|
+
patterns:
|
|
19
|
+
- "*"
|
|
20
|
+
# Python
|
|
21
|
+
- package-ecosystem: "uv"
|
|
22
|
+
directory: "/"
|
|
23
|
+
schedule:
|
|
24
|
+
interval: "monthly"
|
|
25
|
+
commit-message:
|
|
26
|
+
prefix: ⬆
|
|
27
|
+
cooldown:
|
|
28
|
+
default-days: 7
|
|
29
|
+
groups:
|
|
30
|
+
python-packages:
|
|
31
|
+
dependency-type: "development"
|
|
32
|
+
patterns:
|
|
33
|
+
- "*"
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
name: Bump pre-commit hooks
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: "0 12 1 * *"
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions: {}
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
bump-pre-commit-hooks:
|
|
12
|
+
if: github.repository_owner == 'tiangolo'
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
timeout-minutes: 10
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
id-token: write
|
|
18
|
+
steps:
|
|
19
|
+
- name: Dump GitHub context
|
|
20
|
+
env:
|
|
21
|
+
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
22
|
+
run: echo "$GITHUB_CONTEXT"
|
|
23
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
24
|
+
with:
|
|
25
|
+
persist-credentials: false
|
|
26
|
+
- name: Set up Python
|
|
27
|
+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
28
|
+
with:
|
|
29
|
+
python-version-file: ".python-version"
|
|
30
|
+
- name: Setup uv
|
|
31
|
+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
|
|
32
|
+
with:
|
|
33
|
+
# Before upgrading uv version, make sure astral-sh/setup-uv knows its checksum.
|
|
34
|
+
# See: https://github.com/astral-sh/setup-uv/issues/851#issuecomment-4282017837
|
|
35
|
+
version: "0.11.18"
|
|
36
|
+
cache-dependency-glob: |
|
|
37
|
+
pyproject.toml
|
|
38
|
+
uv.lock
|
|
39
|
+
- name: Bump pre-commit hooks
|
|
40
|
+
run: uv run prek auto-update --freeze --cooldown-days 7
|
|
41
|
+
- name: Get PR Submit token
|
|
42
|
+
id: pr-submit
|
|
43
|
+
uses: tiangolo/pr-submit@d802fdf59bde80bc3eb8bd3259f4cbeec63de4aa # 0.0.1
|
|
44
|
+
- name: Create pull request
|
|
45
|
+
env:
|
|
46
|
+
GH_TOKEN: ${{ steps.pr-submit.outputs.token }}
|
|
47
|
+
BASE_BRANCH: ${{ github.event.repository.default_branch }}
|
|
48
|
+
run: |
|
|
49
|
+
set -euo pipefail
|
|
50
|
+
if git diff --quiet; then
|
|
51
|
+
echo "No pre-commit hook updates available"
|
|
52
|
+
exit 0
|
|
53
|
+
fi
|
|
54
|
+
git config user.name "pr-submit[bot]"
|
|
55
|
+
git config user.email "pr-submit[bot]@users.noreply.github.com"
|
|
56
|
+
branch="bump-pre-commit-hooks"
|
|
57
|
+
git switch -C "$branch"
|
|
58
|
+
git add .pre-commit-config.yaml
|
|
59
|
+
git commit -m "⬆ Bump pre-commit hooks"
|
|
60
|
+
gh auth setup-git
|
|
61
|
+
git push --force origin "$branch"
|
|
62
|
+
if [ -z "$(gh pr list --head "$branch" --state open --json number --jq '.[].number')" ]; then
|
|
63
|
+
gh pr create \
|
|
64
|
+
--base "$BASE_BRANCH" \
|
|
65
|
+
--head "$branch" \
|
|
66
|
+
--title "⬆ Bump pre-commit hooks" \
|
|
67
|
+
--body "Bump pre-commit hook versions via \`prek auto-update --freeze --cooldown-days 7\`." \
|
|
68
|
+
--label internal \
|
|
69
|
+
--label dependencies \
|
|
70
|
+
--label pre-commit
|
|
71
|
+
else
|
|
72
|
+
echo "PR for \"$branch\" already open; branch updated in place."
|
|
73
|
+
fi
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: Create Draft Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types:
|
|
6
|
+
- closed
|
|
7
|
+
|
|
8
|
+
permissions: {}
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
create-draft-release:
|
|
12
|
+
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
timeout-minutes: 5
|
|
15
|
+
permissions:
|
|
16
|
+
contents: write
|
|
17
|
+
env:
|
|
18
|
+
PREPARE_RELEASE_VERSION_FILE: src/markdown_include_variants/_version.py
|
|
19
|
+
PREPARE_RELEASE_RELEASE_NOTES_FILE: release-notes.md
|
|
20
|
+
steps:
|
|
21
|
+
- name: Dump GitHub context
|
|
22
|
+
env:
|
|
23
|
+
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
24
|
+
run: echo "$GITHUB_CONTEXT"
|
|
25
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
26
|
+
with:
|
|
27
|
+
ref: ${{ github.event.repository.default_branch }}
|
|
28
|
+
persist-credentials: true
|
|
29
|
+
- name: Set up Python
|
|
30
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
31
|
+
with:
|
|
32
|
+
python-version-file: ".python-version"
|
|
33
|
+
- name: Install uv
|
|
34
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
35
|
+
with:
|
|
36
|
+
version: "latest-known"
|
|
37
|
+
- name: Extract release details
|
|
38
|
+
id: release-details
|
|
39
|
+
run: |
|
|
40
|
+
set -euo pipefail
|
|
41
|
+
version="$(uv run python scripts/prepare_release.py current-version)"
|
|
42
|
+
uv run python scripts/prepare_release.py release-notes > draft-release-notes.md
|
|
43
|
+
echo "version=$version" >> "$GITHUB_OUTPUT"
|
|
44
|
+
- name: Create draft release
|
|
45
|
+
env:
|
|
46
|
+
GH_TOKEN: ${{ github.token }}
|
|
47
|
+
VERSION: ${{ steps.release-details.outputs.version }}
|
|
48
|
+
run: |
|
|
49
|
+
set -euo pipefail
|
|
50
|
+
gh release create "$VERSION" \
|
|
51
|
+
--draft \
|
|
52
|
+
--title "$VERSION" \
|
|
53
|
+
--notes-file draft-release-notes.md \
|
|
54
|
+
--target "$(git rev-parse HEAD)"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Issue Manager
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: "13 18 * * *"
|
|
6
|
+
issue_comment:
|
|
7
|
+
types:
|
|
8
|
+
- created
|
|
9
|
+
issues:
|
|
10
|
+
types:
|
|
11
|
+
- labeled
|
|
12
|
+
pull_request_target: # zizmor: ignore[dangerous-triggers]
|
|
13
|
+
types:
|
|
14
|
+
- labeled
|
|
15
|
+
workflow_dispatch:
|
|
16
|
+
|
|
17
|
+
permissions:
|
|
18
|
+
issues: write
|
|
19
|
+
pull-requests: write
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
issue-manager:
|
|
23
|
+
if: github.repository_owner == 'tiangolo'
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
steps:
|
|
26
|
+
- name: Dump GitHub context
|
|
27
|
+
env:
|
|
28
|
+
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
29
|
+
run: echo "$GITHUB_CONTEXT"
|
|
30
|
+
- uses: tiangolo/issue-manager@dc846170c36eb62fb434b3d943b36399fe240fb5 # 0.8.1
|
|
31
|
+
with:
|
|
32
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
name: pre-commit
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
permissions: {}
|
|
5
|
+
env:
|
|
6
|
+
CAN_PUSH: ${{ github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }}
|
|
7
|
+
jobs:
|
|
8
|
+
pre-commit:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
id-token: write
|
|
13
|
+
steps:
|
|
14
|
+
- name: Dump GitHub context
|
|
15
|
+
env:
|
|
16
|
+
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
17
|
+
run: echo "$GITHUB_CONTEXT"
|
|
18
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
19
|
+
name: Checkout PR for own repo
|
|
20
|
+
if: env.CAN_PUSH == 'true'
|
|
21
|
+
with:
|
|
22
|
+
# To be able to commit it needs to fetch the head of the branch, not the
|
|
23
|
+
# merge commit
|
|
24
|
+
ref: ${{ github.head_ref }}
|
|
25
|
+
# And it needs the full history to be able to compute diffs
|
|
26
|
+
fetch-depth: 0
|
|
27
|
+
persist-credentials: false
|
|
28
|
+
# pre-commit lite ci needs the default checkout configs to work
|
|
29
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
30
|
+
name: Checkout PR for fork
|
|
31
|
+
if: env.CAN_PUSH == 'false'
|
|
32
|
+
with:
|
|
33
|
+
# To be able to commit it needs the head branch of the PR, the remote one
|
|
34
|
+
ref: ${{ github.event.pull_request.head.sha }}
|
|
35
|
+
fetch-depth: 0
|
|
36
|
+
persist-credentials: false
|
|
37
|
+
- name: Set up Python
|
|
38
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
39
|
+
with:
|
|
40
|
+
python-version: "3.14"
|
|
41
|
+
- name: Setup uv
|
|
42
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
43
|
+
with:
|
|
44
|
+
version: "latest-known"
|
|
45
|
+
cache-dependency-glob: |
|
|
46
|
+
pyproject.toml
|
|
47
|
+
uv.lock
|
|
48
|
+
- name: Run prek - pre-commit
|
|
49
|
+
id: precommit
|
|
50
|
+
run: uvx prek run --from-ref origin/${GITHUB_BASE_REF} --to-ref HEAD --show-diff-on-failure
|
|
51
|
+
continue-on-error: true
|
|
52
|
+
- name: Check for changes
|
|
53
|
+
id: changes
|
|
54
|
+
run: |
|
|
55
|
+
if [[ -n "$(git status --porcelain)" ]]; then
|
|
56
|
+
echo "changed=true" >> "$GITHUB_OUTPUT"
|
|
57
|
+
else
|
|
58
|
+
echo "changed=false" >> "$GITHUB_OUTPUT"
|
|
59
|
+
fi
|
|
60
|
+
- name: Get PR Push token
|
|
61
|
+
id: pr-push
|
|
62
|
+
if: env.CAN_PUSH == 'true' && steps.changes.outputs.changed == 'true'
|
|
63
|
+
uses: tiangolo/pr-push@ff4e51a433de4c22bbf90597e069e8247b9203d2 # 0.0.1
|
|
64
|
+
- name: Commit and push changes
|
|
65
|
+
if: env.CAN_PUSH == 'true' && steps.changes.outputs.changed == 'true'
|
|
66
|
+
env:
|
|
67
|
+
GH_TOKEN: ${{ steps.pr-push.outputs.token }}
|
|
68
|
+
run: |
|
|
69
|
+
git config user.name "pr-push[bot]"
|
|
70
|
+
git config user.email "pr-push[bot]@users.noreply.github.com"
|
|
71
|
+
gh auth setup-git
|
|
72
|
+
git add -A
|
|
73
|
+
git commit -m "🎨 Auto format"
|
|
74
|
+
git push
|
|
75
|
+
- uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 # v1.1.0
|
|
76
|
+
if: env.CAN_PUSH == 'false'
|
|
77
|
+
with:
|
|
78
|
+
msg: 🎨 Auto format
|
|
79
|
+
- name: Error out on pre-commit errors
|
|
80
|
+
if: steps.precommit.outcome == 'failure'
|
|
81
|
+
run: exit 1
|
|
82
|
+
# https://github.com/marketplace/actions/alls-green#why
|
|
83
|
+
pre-commit-alls-green: # This job does nothing and is only used for the branch protection
|
|
84
|
+
if: always()
|
|
85
|
+
needs:
|
|
86
|
+
- pre-commit
|
|
87
|
+
runs-on: ubuntu-latest
|
|
88
|
+
steps:
|
|
89
|
+
- name: Dump GitHub context
|
|
90
|
+
env:
|
|
91
|
+
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
92
|
+
run: echo "$GITHUB_CONTEXT"
|
|
93
|
+
- name: Decide whether the needed jobs succeeded or failed
|
|
94
|
+
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
|
|
95
|
+
with:
|
|
96
|
+
jobs: ${{ toJSON(needs) }}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
name: Prepare Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
bump:
|
|
7
|
+
description: Release bump
|
|
8
|
+
required: true
|
|
9
|
+
type: choice
|
|
10
|
+
options:
|
|
11
|
+
- patch
|
|
12
|
+
- minor
|
|
13
|
+
- major
|
|
14
|
+
date:
|
|
15
|
+
description: Release date in YYYY-MM-DD format. Defaults to today.
|
|
16
|
+
required: false
|
|
17
|
+
type: string
|
|
18
|
+
|
|
19
|
+
permissions: {}
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
prepare-release:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
timeout-minutes: 5
|
|
25
|
+
permissions:
|
|
26
|
+
contents: read
|
|
27
|
+
id-token: write
|
|
28
|
+
env:
|
|
29
|
+
PREPARE_RELEASE_VERSION_FILE: src/markdown_include_variants/_version.py
|
|
30
|
+
PREPARE_RELEASE_RELEASE_NOTES_FILE: release-notes.md
|
|
31
|
+
steps:
|
|
32
|
+
- name: Dump GitHub context
|
|
33
|
+
env:
|
|
34
|
+
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
35
|
+
run: echo "$GITHUB_CONTEXT"
|
|
36
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
37
|
+
with:
|
|
38
|
+
persist-credentials: false
|
|
39
|
+
- name: Set up Python
|
|
40
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
41
|
+
with:
|
|
42
|
+
python-version-file: ".python-version"
|
|
43
|
+
- name: Install uv
|
|
44
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
45
|
+
with:
|
|
46
|
+
version: "latest-known"
|
|
47
|
+
- name: Prepare release
|
|
48
|
+
env:
|
|
49
|
+
PREPARE_RELEASE_BUMP: ${{ inputs.bump }}
|
|
50
|
+
PREPARE_RELEASE_DATE: ${{ inputs.date }}
|
|
51
|
+
run: uv run python scripts/prepare_release.py prepare
|
|
52
|
+
- name: Get release version
|
|
53
|
+
id: release-version
|
|
54
|
+
run: |
|
|
55
|
+
version="$(uv run python scripts/prepare_release.py current-version)"
|
|
56
|
+
echo "$version"
|
|
57
|
+
echo "version=$version" >> "$GITHUB_OUTPUT"
|
|
58
|
+
- name: Get PR Submit token
|
|
59
|
+
id: pr-submit
|
|
60
|
+
uses: tiangolo/pr-submit@d802fdf59bde80bc3eb8bd3259f4cbeec63de4aa # 0.0.1
|
|
61
|
+
- name: Create release pull request
|
|
62
|
+
env:
|
|
63
|
+
GH_TOKEN: ${{ steps.pr-submit.outputs.token }}
|
|
64
|
+
VERSION: ${{ steps.release-version.outputs.version }}
|
|
65
|
+
run: |
|
|
66
|
+
set -euo pipefail
|
|
67
|
+
branch="release-${VERSION}-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
|
|
68
|
+
git config user.name "pr-submit[bot]"
|
|
69
|
+
git config user.email "pr-submit[bot]@users.noreply.github.com"
|
|
70
|
+
git switch -c "$branch"
|
|
71
|
+
git add $PREPARE_RELEASE_VERSION_FILE $PREPARE_RELEASE_RELEASE_NOTES_FILE
|
|
72
|
+
git commit -m "🔖 Release version ${VERSION}"
|
|
73
|
+
gh auth setup-git
|
|
74
|
+
git push --set-upstream origin "$branch"
|
|
75
|
+
gh pr create \
|
|
76
|
+
--base main \
|
|
77
|
+
--head "$branch" \
|
|
78
|
+
--title "🔖 Release version ${VERSION}" \
|
|
79
|
+
--body "Prepare release ${VERSION}." \
|
|
80
|
+
--label release
|
{markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/.github/workflows/publish.yml
RENAMED
|
@@ -3,7 +3,7 @@ name: Publish
|
|
|
3
3
|
on:
|
|
4
4
|
release:
|
|
5
5
|
types:
|
|
6
|
-
-
|
|
6
|
+
- published
|
|
7
7
|
workflow_dispatch:
|
|
8
8
|
inputs:
|
|
9
9
|
debug_enabled:
|
|
@@ -13,13 +13,15 @@ on:
|
|
|
13
13
|
|
|
14
14
|
jobs:
|
|
15
15
|
publish:
|
|
16
|
-
runs-on: ubuntu-latest
|
|
17
16
|
permissions:
|
|
18
17
|
id-token: write
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
19
|
steps:
|
|
20
|
-
- uses: actions/checkout@
|
|
20
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
21
|
+
with:
|
|
22
|
+
persist-credentials: false
|
|
21
23
|
- name: Set up Python
|
|
22
|
-
uses: actions/setup-python@
|
|
24
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
23
25
|
with:
|
|
24
26
|
python-version: "3.11"
|
|
25
27
|
- name: Install build dependencies
|
|
@@ -27,4 +29,4 @@ jobs:
|
|
|
27
29
|
- name: Build distribution
|
|
28
30
|
run: python -m build
|
|
29
31
|
- name: Publish
|
|
30
|
-
uses: pypa/gh-action-pypi-publish@v1.
|
|
32
|
+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
|
{markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/.github/workflows/smokeshow.yml
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
name: Smokeshow
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
workflow_run:
|
|
4
|
+
workflow_run: # zizmor: ignore[dangerous-triggers]
|
|
5
5
|
workflows:
|
|
6
6
|
- Test
|
|
7
7
|
types:
|
|
@@ -15,7 +15,6 @@ env:
|
|
|
15
15
|
|
|
16
16
|
jobs:
|
|
17
17
|
smokeshow:
|
|
18
|
-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
19
18
|
runs-on: ubuntu-latest
|
|
20
19
|
|
|
21
20
|
steps:
|
|
@@ -23,14 +22,18 @@ jobs:
|
|
|
23
22
|
env:
|
|
24
23
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
25
24
|
run: echo "$GITHUB_CONTEXT"
|
|
26
|
-
- uses: actions/checkout@
|
|
27
|
-
- uses: actions/setup-python@v6
|
|
25
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
28
26
|
with:
|
|
29
|
-
|
|
30
|
-
- uses:
|
|
27
|
+
persist-credentials: false
|
|
28
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
29
|
+
with:
|
|
30
|
+
python-version: '3.13'
|
|
31
|
+
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
32
|
+
with:
|
|
33
|
+
version: "latest-known"
|
|
31
34
|
- name: Install Dependencies
|
|
32
35
|
run: uv sync
|
|
33
|
-
- uses: actions/download-artifact@
|
|
36
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
34
37
|
with:
|
|
35
38
|
name: coverage-html
|
|
36
39
|
path: htmlcov
|
{markdown_include_variants-0.0.8 → markdown_include_variants-0.0.10}/.github/workflows/test.yml
RENAMED
|
@@ -1,70 +1,61 @@
|
|
|
1
1
|
name: Test
|
|
2
|
-
|
|
3
2
|
on:
|
|
4
3
|
push:
|
|
5
4
|
branches:
|
|
6
5
|
- main
|
|
7
6
|
pull_request:
|
|
8
|
-
types:
|
|
9
|
-
- opened
|
|
10
|
-
- synchronize
|
|
11
7
|
schedule:
|
|
12
8
|
# cron every week on monday
|
|
13
9
|
- cron: "0 0 * * 1"
|
|
14
|
-
|
|
10
|
+
permissions: {}
|
|
15
11
|
jobs:
|
|
16
|
-
lint:
|
|
17
|
-
runs-on: ubuntu-latest
|
|
18
|
-
steps:
|
|
19
|
-
- name: Dump GitHub context
|
|
20
|
-
env:
|
|
21
|
-
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
22
|
-
run: echo "$GITHUB_CONTEXT"
|
|
23
|
-
- uses: actions/checkout@v6
|
|
24
|
-
- name: Set up Python
|
|
25
|
-
uses: actions/setup-python@v6
|
|
26
|
-
with:
|
|
27
|
-
python-version: "3.11"
|
|
28
|
-
- uses: astral-sh/setup-uv@v7
|
|
29
|
-
- name: Install Dependencies
|
|
30
|
-
run: uv sync
|
|
31
|
-
- name: Lint
|
|
32
|
-
run: uv run bash scripts/lint.sh
|
|
33
|
-
|
|
34
12
|
test:
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
35
15
|
runs-on: ubuntu-latest
|
|
36
16
|
strategy:
|
|
37
17
|
matrix:
|
|
38
18
|
python-version:
|
|
39
|
-
- "3.
|
|
19
|
+
- "3.10"
|
|
20
|
+
uv-resolution:
|
|
21
|
+
- highest
|
|
22
|
+
- lowest-direct
|
|
40
23
|
fail-fast: false
|
|
24
|
+
env:
|
|
25
|
+
UV_RESOLUTION: ${{ matrix.uv-resolution }}
|
|
41
26
|
steps:
|
|
42
27
|
- name: Dump GitHub context
|
|
43
28
|
env:
|
|
44
29
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
45
30
|
run: echo "$GITHUB_CONTEXT"
|
|
46
|
-
- uses: actions/checkout@
|
|
31
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
32
|
+
with:
|
|
33
|
+
persist-credentials: false
|
|
47
34
|
- name: Set up Python
|
|
48
|
-
uses: actions/setup-python@
|
|
35
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
49
36
|
with:
|
|
50
37
|
python-version: ${{ matrix.python-version }}
|
|
51
|
-
- uses: astral-sh/setup-uv@
|
|
38
|
+
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
39
|
+
with:
|
|
40
|
+
version: "latest-known"
|
|
52
41
|
- name: Install Dependencies
|
|
53
42
|
run: uv sync
|
|
54
43
|
- run: mkdir coverage
|
|
55
44
|
- name: Test
|
|
56
45
|
run: uv run bash scripts/test.sh
|
|
57
46
|
env:
|
|
58
|
-
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
|
|
59
|
-
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
|
|
47
|
+
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.uv-resolution }}
|
|
48
|
+
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.uv-resolution }}
|
|
60
49
|
- name: Store coverage files
|
|
61
|
-
uses: actions/upload-artifact@
|
|
50
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
62
51
|
with:
|
|
63
|
-
name: coverage-${{ matrix.python-version }}
|
|
52
|
+
name: coverage-${{ matrix.python-version }}-${{ matrix.uv-resolution }}
|
|
64
53
|
path: coverage
|
|
65
54
|
include-hidden-files: true
|
|
66
|
-
|
|
67
55
|
coverage-combine:
|
|
56
|
+
permissions:
|
|
57
|
+
actions: read
|
|
58
|
+
contents: read
|
|
68
59
|
needs:
|
|
69
60
|
- test
|
|
70
61
|
runs-on: ubuntu-latest
|
|
@@ -73,13 +64,17 @@ jobs:
|
|
|
73
64
|
env:
|
|
74
65
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
75
66
|
run: echo "$GITHUB_CONTEXT"
|
|
76
|
-
- uses: actions/checkout@
|
|
77
|
-
|
|
67
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
68
|
+
with:
|
|
69
|
+
persist-credentials: false
|
|
70
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
78
71
|
with:
|
|
79
72
|
python-version: '3.11'
|
|
80
|
-
- uses: astral-sh/setup-uv@
|
|
73
|
+
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
74
|
+
with:
|
|
75
|
+
version: "latest-known"
|
|
81
76
|
- name: Get coverage files
|
|
82
|
-
uses: actions/download-artifact@
|
|
77
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
83
78
|
with:
|
|
84
79
|
pattern: coverage-*
|
|
85
80
|
path: coverage
|
|
@@ -87,20 +82,20 @@ jobs:
|
|
|
87
82
|
- run: uv sync
|
|
88
83
|
- run: ls -la coverage
|
|
89
84
|
- run: uv run coverage combine coverage
|
|
90
|
-
- run: uv run coverage report
|
|
91
85
|
- run: uv run coverage html --title "Coverage for ${{ github.sha }}"
|
|
92
86
|
- name: Store coverage HTML
|
|
93
|
-
uses: actions/upload-artifact@
|
|
87
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
94
88
|
with:
|
|
95
89
|
name: coverage-html
|
|
96
90
|
path: htmlcov
|
|
97
91
|
include-hidden-files: true
|
|
98
|
-
|
|
92
|
+
- run: uv run coverage report --fail-under=100
|
|
99
93
|
# https://github.com/marketplace/actions/alls-green#why
|
|
100
|
-
tests-alls-green:
|
|
94
|
+
tests-alls-green: # This job does nothing and is only used for the branch protection
|
|
101
95
|
if: always()
|
|
102
96
|
needs:
|
|
103
97
|
- coverage-combine
|
|
98
|
+
- test
|
|
104
99
|
runs-on: ubuntu-latest
|
|
105
100
|
steps:
|
|
106
101
|
- name: Dump GitHub context
|
|
@@ -108,6 +103,6 @@ jobs:
|
|
|
108
103
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
109
104
|
run: echo "$GITHUB_CONTEXT"
|
|
110
105
|
- name: Decide whether the needed jobs succeeded or failed
|
|
111
|
-
uses: re-actors/alls-green@
|
|
106
|
+
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
|
|
112
107
|
with:
|
|
113
108
|
jobs: ${{ toJSON(needs) }}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: Zizmor
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
permissions: {}
|
|
9
|
+
jobs:
|
|
10
|
+
zizmor:
|
|
11
|
+
permissions:
|
|
12
|
+
security-events: write # Required for upload-sarif (used by zizmor-action) to upload SARIF files.
|
|
13
|
+
name: Run zizmor
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
timeout-minutes: 5
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout repository
|
|
18
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
|
|
19
|
+
with:
|
|
20
|
+
persist-credentials: false
|
|
21
|
+
- name: Run zizmor
|
|
22
|
+
uses: zizmorcore/zizmor-action@3dc1ecc9bcb9e94e9b2c709687979e1298497054 # v0.6.2
|