toolr 0.9.0__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.
Files changed (151) hide show
  1. toolr-0.9.0/.codespell.words.ignore +1 -0
  2. toolr-0.9.0/.coveragerc +37 -0
  3. toolr-0.9.0/.github/actions/apply-release-patch/action.yml +23 -0
  4. toolr-0.9.0/.github/actions/configure-git/action.yml +12 -0
  5. toolr-0.9.0/.github/actions/prepare-release/action.yml +163 -0
  6. toolr-0.9.0/.github/actions/setup-pre-commit/action.yml +63 -0
  7. toolr-0.9.0/.github/actions/setup-virtualenv/action.yml +79 -0
  8. toolr-0.9.0/.github/dependabot.yml +26 -0
  9. toolr-0.9.0/.github/workflows/build.yml +68 -0
  10. toolr-0.9.0/.github/workflows/ci.yml +235 -0
  11. toolr-0.9.0/.github/workflows/release.yml +244 -0
  12. toolr-0.9.0/.github/workflows/test.yml +108 -0
  13. toolr-0.9.0/.gitignore +236 -0
  14. toolr-0.9.0/.markdownlint.yaml +147 -0
  15. toolr-0.9.0/.mise-tasks/cargo-test.sh +4 -0
  16. toolr-0.9.0/.mise-tasks/pytest-test.sh +6 -0
  17. toolr-0.9.0/.pre-commit-config.yaml +110 -0
  18. toolr-0.9.0/.pre-commit-hooks/ref-doc-stubs.py +101 -0
  19. toolr-0.9.0/.readthedocs.yaml +24 -0
  20. toolr-0.9.0/.release-changes.md +130 -0
  21. toolr-0.9.0/CHANGELOG.md +138 -0
  22. toolr-0.9.0/Cargo.lock +590 -0
  23. toolr-0.9.0/Cargo.toml +38 -0
  24. toolr-0.9.0/LICENSE +201 -0
  25. toolr-0.9.0/PKG-INFO +107 -0
  26. toolr-0.9.0/README.md +83 -0
  27. toolr-0.9.0/action.yml +33 -0
  28. toolr-0.9.0/cliff.toml +105 -0
  29. toolr-0.9.0/docs/.nav.yml +6 -0
  30. toolr-0.9.0/docs/examples/files/calculator.py +19 -0
  31. toolr-0.9.0/docs/examples/files/example.py +24 -0
  32. toolr-0.9.0/docs/examples/files/files-star-args.py +17 -0
  33. toolr-0.9.0/docs/examples/files/files.py +17 -0
  34. toolr-0.9.0/docs/examples/files/function_name_conversion.py +49 -0
  35. toolr-0.9.0/docs/examples/files/hello.py +16 -0
  36. toolr-0.9.0/docs/examples/files/system.py +64 -0
  37. toolr-0.9.0/docs/examples/index.md +113 -0
  38. toolr-0.9.0/docs/imgs/toolr.png +0 -0
  39. toolr-0.9.0/docs/index.md +5 -0
  40. toolr-0.9.0/docs/installation/index.md +89 -0
  41. toolr-0.9.0/docs/reference/toolr/_context.md +3 -0
  42. toolr-0.9.0/docs/reference/toolr/_exc.md +3 -0
  43. toolr-0.9.0/docs/reference/toolr/_parser.md +3 -0
  44. toolr-0.9.0/docs/reference/toolr/_registry.md +3 -0
  45. toolr-0.9.0/docs/reference/toolr/testing.md +3 -0
  46. toolr-0.9.0/docs/reference/toolr/utils/_console.md +3 -0
  47. toolr-0.9.0/docs/reference/toolr/utils/_docstrings.md +3 -0
  48. toolr-0.9.0/docs/reference/toolr/utils/_logs.md +3 -0
  49. toolr-0.9.0/docs/reference/toolr/utils/_signature.md +3 -0
  50. toolr-0.9.0/docs/reference/toolr/utils/command.md +3 -0
  51. toolr-0.9.0/docs/usage/files/example1.py +19 -0
  52. toolr-0.9.0/docs/usage/files/example2.py +127 -0
  53. toolr-0.9.0/docs/usage/files/mutually-exclusive-1.py +29 -0
  54. toolr-0.9.0/docs/usage/files/mutually-exclusive-2.py +53 -0
  55. toolr-0.9.0/docs/usage/index.md +239 -0
  56. toolr-0.9.0/git-cliff/CHANGELOG.md +138 -0
  57. toolr-0.9.0/mise.toml +12 -0
  58. toolr-0.9.0/mkdocs.yml +89 -0
  59. toolr-0.9.0/pyproject.toml +283 -0
  60. toolr-0.9.0/python/toolr/__init__.py +14 -0
  61. toolr-0.9.0/python/toolr/__main__.py +45 -0
  62. toolr-0.9.0/python/toolr/_context.py +250 -0
  63. toolr-0.9.0/python/toolr/_context.pyi +198 -0
  64. toolr-0.9.0/python/toolr/_exc.py +24 -0
  65. toolr-0.9.0/python/toolr/_parser.py +188 -0
  66. toolr-0.9.0/python/toolr/_registry.py +312 -0
  67. toolr-0.9.0/python/toolr/py.typed +0 -0
  68. toolr-0.9.0/python/toolr/testing.py +97 -0
  69. toolr-0.9.0/python/toolr/utils/__init__.py +0 -0
  70. toolr-0.9.0/python/toolr/utils/_command.pyi +23 -0
  71. toolr-0.9.0/python/toolr/utils/_console.py +67 -0
  72. toolr-0.9.0/python/toolr/utils/_docstrings.py +31 -0
  73. toolr-0.9.0/python/toolr/utils/_logs.py +148 -0
  74. toolr-0.9.0/python/toolr/utils/_signature.py +506 -0
  75. toolr-0.9.0/python/toolr/utils/command.py +184 -0
  76. toolr-0.9.0/release-notes.md +128 -0
  77. toolr-0.9.0/src/command/command_test.rs +694 -0
  78. toolr-0.9.0/src/command/tests.rs +2 -0
  79. toolr-0.9.0/src/command.rs +481 -0
  80. toolr-0.9.0/src/lib.rs +15 -0
  81. toolr-0.9.0/src/python_bindings.rs +137 -0
  82. toolr-0.9.0/tests/__init__.py +0 -0
  83. toolr-0.9.0/tests/cli/__init__.py +1 -0
  84. toolr-0.9.0/tests/cli/conftest.py +37 -0
  85. toolr-0.9.0/tests/cli/test_boolean_arguments.py +151 -0
  86. toolr-0.9.0/tests/cli/test_enum_arguments.py +234 -0
  87. toolr-0.9.0/tests/cli/test_integer_arguments.py +143 -0
  88. toolr-0.9.0/tests/cli/test_list_arguments.py +277 -0
  89. toolr-0.9.0/tests/cli/test_mutually_exclusive_groups.py +55 -0
  90. toolr-0.9.0/tests/cli/test_nargs.py +139 -0
  91. toolr-0.9.0/tests/cli/test_string_arguments.py +87 -0
  92. toolr-0.9.0/tests/conftest.py +23 -0
  93. toolr-0.9.0/tests/context/__init__.py +1 -0
  94. toolr-0.9.0/tests/context/conftest.py +76 -0
  95. toolr-0.9.0/tests/context/test_core.py +117 -0
  96. toolr-0.9.0/tests/context/test_exit.py +54 -0
  97. toolr-0.9.0/tests/context/test_output.py +150 -0
  98. toolr-0.9.0/tests/context/test_prompt.py +200 -0
  99. toolr-0.9.0/tests/context/test_run.py +50 -0
  100. toolr-0.9.0/tests/context/test_verbosity.py +20 -0
  101. toolr-0.9.0/tests/parser/__init__.py +0 -0
  102. toolr-0.9.0/tests/parser/test_logging.py +78 -0
  103. toolr-0.9.0/tests/parser/test_parser_errors.py +50 -0
  104. toolr-0.9.0/tests/registry/__init__.py +1 -0
  105. toolr-0.9.0/tests/registry/cases/mixed/tools/__init__.py +1 -0
  106. toolr-0.9.0/tests/registry/cases/mixed/tools/deployment.py +53 -0
  107. toolr-0.9.0/tests/registry/cases/mixed/tools/utils.py +27 -0
  108. toolr-0.9.0/tests/registry/cases/nested/tools/__init__.py +1 -0
  109. toolr-0.9.0/tests/registry/cases/nested/tools/docker/__init__.py +8 -0
  110. toolr-0.9.0/tests/registry/cases/nested/tools/docker/build.py +50 -0
  111. toolr-0.9.0/tests/registry/cases/nested/tools/docker/compose.py +31 -0
  112. toolr-0.9.0/tests/registry/cases/simple/tools/__init__.py +1 -0
  113. toolr-0.9.0/tests/registry/cases/simple/tools/docker.py +21 -0
  114. toolr-0.9.0/tests/registry/cases/simple/tools/git.py +21 -0
  115. toolr-0.9.0/tests/registry/test_command_group_errors.py +43 -0
  116. toolr-0.9.0/tests/registry/test_command_override.py +394 -0
  117. toolr-0.9.0/tests/registry/test_discovery.py +98 -0
  118. toolr-0.9.0/tests/registry/test_discovery_errors.py +91 -0
  119. toolr-0.9.0/tests/registry/test_entry_points.py +36 -0
  120. toolr-0.9.0/tests/registry/test_integration.py +187 -0
  121. toolr-0.9.0/tests/registry/test_registry_basic.py +229 -0
  122. toolr-0.9.0/tests/registry/test_registry_errors.py +45 -0
  123. toolr-0.9.0/tests/support/3rd-party-pkg/README.md +28 -0
  124. toolr-0.9.0/tests/support/3rd-party-pkg/pyproject.toml +22 -0
  125. toolr-0.9.0/tests/support/3rd-party-pkg/thirdparty/__init__.py +1 -0
  126. toolr-0.9.0/tests/support/3rd-party-pkg/thirdparty/commands.py +57 -0
  127. toolr-0.9.0/tests/support/coverage/sitecustomize.py +8 -0
  128. toolr-0.9.0/tests/test_main.py +84 -0
  129. toolr-0.9.0/tests/test_parser.py +65 -0
  130. toolr-0.9.0/tests/utils/__init__.py +0 -0
  131. toolr-0.9.0/tests/utils/command/__init__.py +0 -0
  132. toolr-0.9.0/tests/utils/command/conftest.py +89 -0
  133. toolr-0.9.0/tests/utils/command/test_command.py +386 -0
  134. toolr-0.9.0/tests/utils/logs/__init__.py +1 -0
  135. toolr-0.9.0/tests/utils/logs/test_duplicate_times_formatter.py +73 -0
  136. toolr-0.9.0/tests/utils/logs/test_include_timestamps.py +35 -0
  137. toolr-0.9.0/tests/utils/logs/test_level_filter.py +74 -0
  138. toolr-0.9.0/tests/utils/logs/test_setup.py +138 -0
  139. toolr-0.9.0/tests/utils/signature/__init__.py +1 -0
  140. toolr-0.9.0/tests/utils/signature/test_arg.py +88 -0
  141. toolr-0.9.0/tests/utils/signature/test_argument_annotation.py +97 -0
  142. toolr-0.9.0/tests/utils/signature/test_get_signature.py +245 -0
  143. toolr-0.9.0/tests/utils/signature/test_integration.py +135 -0
  144. toolr-0.9.0/tests/utils/signature/test_kwarg.py +51 -0
  145. toolr-0.9.0/tests/utils/signature/test_signature.py +277 -0
  146. toolr-0.9.0/tests/utils/test_console.py +43 -0
  147. toolr-0.9.0/toolr-0.9.0.patch +184 -0
  148. toolr-0.9.0/tools/__init__.py +1 -0
  149. toolr-0.9.0/tools/ci.py +45 -0
  150. toolr-0.9.0/tools/version.py +142 -0
  151. toolr-0.9.0/uv.lock +1010 -0
@@ -0,0 +1 @@
1
+ thirdparty
@@ -0,0 +1,37 @@
1
+ [run]
2
+ branch = True
3
+ cover_pylib = False
4
+ parallel = True
5
+ concurrency = multiprocessing
6
+
7
+ source =
8
+ python/
9
+ tests/
10
+
11
+ omit =
12
+ setup.py
13
+
14
+ [report]
15
+ # Regexes for lines to exclude from consideration
16
+ exclude_lines =
17
+ # Have to re-enable the standard pragma
18
+ pragma: no cover
19
+
20
+ # Don't complain about missing debug-only code:
21
+ def __repr__
22
+
23
+ # Don't complain if tests don't hit defensive assertion code:
24
+ raise AssertionError
25
+ raise NotImplementedError
26
+
27
+ # Don't complain if non-runnable code isn't run:
28
+ if 0:
29
+ if False:
30
+ if __name__ == .__main__.:
31
+ if TYPE_CHECKING:
32
+
33
+ omit =
34
+ setup.py
35
+
36
+
37
+ ignore_errors = True
@@ -0,0 +1,23 @@
1
+ name: Apply Release Patch
2
+ description: Prepare a release of ToolR
3
+
4
+ inputs:
5
+ release-patch-name:
6
+ required: true
7
+ description: 'Release patch to apply'
8
+
9
+
10
+ runs:
11
+ using: composite
12
+
13
+ steps:
14
+
15
+ - name: Download Release Patch Artifact
16
+ uses: actions/download-artifact@v4
17
+ with:
18
+ name: ${{ inputs.release-patch-name }}
19
+
20
+ - name: Apply The Release Patch
21
+ shell: bash
22
+ run: |
23
+ git am --committer-date-is-author-date ${{ inputs.release-patch-name }}
@@ -0,0 +1,12 @@
1
+ name: Configure Git
2
+ description: Configure git
3
+
4
+ runs:
5
+ using: composite
6
+
7
+ steps:
8
+ - name: Configure Git
9
+ shell: bash
10
+ run: |
11
+ git config user.name "github-actions[bot]"
12
+ git config user.email "github-actions[bot]@users.noreply.github.com"
@@ -0,0 +1,163 @@
1
+ name: Prepare Release
2
+ description: Prepare a release of ToolR
3
+
4
+ inputs:
5
+ release-version:
6
+ required: false
7
+ description: 'Release version to prepare'
8
+
9
+ release-type:
10
+ required: false
11
+ description: 'Release type to prepare'
12
+ default: 'dev'
13
+ choices:
14
+ - 'major'
15
+ - 'minor'
16
+ - 'patch'
17
+ - 'dev'
18
+
19
+ outputs:
20
+ release-version:
21
+ description: 'Prepared release version'
22
+ value: ${{ steps.bump-version.outputs.release-version }}
23
+
24
+ release-patch-name:
25
+ description: 'Name of the release patch'
26
+ value: ${{ steps.bump-version.outputs.release-patch-name }}
27
+
28
+ release-notes-filename:
29
+ description: 'Name of the release notes file'
30
+ value: ${{ steps.prepare-release-notes.outputs.release-notes-filename }}
31
+
32
+ release-tarball-name:
33
+ description: 'Name of the release tarball'
34
+ value: ${{ steps.create-source-tarball.outputs.release-tarball-name }}
35
+
36
+ runs:
37
+ using: composite
38
+
39
+ steps:
40
+
41
+ - name: Setup Virtual Environment
42
+ uses: ./.github/actions/setup-virtualenv
43
+ with:
44
+ cache-prefix: prepare-release
45
+ python-version: "3.11"
46
+ uv-sync-args: "--group docs"
47
+
48
+ - name: Setup Pre-Commit
49
+ uses: ./.github/actions/setup-pre-commit
50
+
51
+ - name: Bump Version
52
+ id: bump-version
53
+ shell: bash
54
+ run: |
55
+ if [ -z "${{ inputs.release-version }}" ]; then
56
+ echo "No release version provided, bumping version based on release type: ${{ inputs.release-type }}"
57
+ RELEASE_VERSION=$(uv run toolr version bump --${{ inputs.release-type }} --write --check-existing-tag)
58
+ else
59
+ echo "Using provided release version: ${{ inputs.release-version }}"
60
+ RELEASE_VERSION=$(uv run toolr version bump ${{ inputs.release-version }} --write --check-existing-tag)
61
+ fi
62
+
63
+ - name: Generate changelog for GH release
64
+ id: git-cliff
65
+ uses: orhun/git-cliff-action@v4
66
+ with:
67
+ config: cliff.toml
68
+ args: --unreleased --strip all
69
+ env:
70
+ OUTPUT: .release-changes.md
71
+ GITHUB_REPO: ${{ github.repository }}
72
+
73
+ - name: Prepare GH Release changelog
74
+ id: prepare-release-notes
75
+ shell: bash
76
+ run: |
77
+ tail -n +3 .release-changes.md > release-notes.md
78
+ echo "release-notes-filename=release-notes.md" >> "$GITHUB_OUTPUT"
79
+
80
+ - name: Upload Release Notes Artifact
81
+ id: upload-release-notes
82
+ uses: actions/upload-artifact@v4
83
+ with:
84
+ name: ${{ steps.prepare-release-notes.outputs.release-notes-filename }}
85
+ path: ${{ steps.prepare-release-notes.outputs.release-notes-filename }}
86
+ retention-days: 7
87
+ if-no-files-found: error
88
+
89
+ - name: Attest release notes artifact
90
+ uses: actions/attest-build-provenance@v3
91
+ with:
92
+ subject-name: ${{ steps.prepare-release-notes.outputs.release-notes-filename }}
93
+ subject-digest: sha256:${{ steps.upload-release-notes.outputs.artifact-digest }}
94
+
95
+ - name: Update CHANGELOG.md
96
+ uses: orhun/git-cliff-action@v4
97
+ with:
98
+ config: cliff.toml
99
+ args: --verbose --unreleased --tag '${{ env.RELEASE_VERSION }}' --prepend CHANGELOG.md
100
+ env:
101
+ GITHUB_REPO: ${{ github.repository }}
102
+
103
+ - name: Show Changes Diff
104
+ shell: bash
105
+ run: |
106
+ git diff --color
107
+
108
+ - name: Commit changes
109
+ shell: bash
110
+ run: |
111
+ # Add the CHANGELOG.md file to the commit
112
+ git add CHANGELOG.md
113
+ # Run pre-commit against the changes
114
+ pre-commit run --all-files --show-diff-on-failure --color=always || true
115
+ # Commit the changes
116
+ git commit -am "chore(release): Prepare for ${{ env.RELEASE_VERSION }} release"
117
+
118
+ - name: Tag the release
119
+ shell: bash
120
+ run: |
121
+ git tag -a "${{ env.RELEASE_VERSION }}" -m "Release ${{ env.RELEASE_VERSION }}"
122
+
123
+ - name: Create Release Patch
124
+ shell: bash
125
+ run: |
126
+ git format-patch --keep-subject --binary --stdout HEAD^ > toolr-${{ env.RELEASE_VERSION }}.patch
127
+
128
+ - name: Upload Changes Diff Artifact
129
+ id: upload-release-patch
130
+ uses: actions/upload-artifact@v4
131
+ with:
132
+ name: toolr-${{ env.RELEASE_VERSION }}.patch
133
+ path: toolr-${{ env.RELEASE_VERSION }}.patch
134
+ retention-days: 7
135
+ if-no-files-found: error
136
+
137
+ - name: Attest release patch artifact
138
+ uses: actions/attest-build-provenance@v3
139
+ with:
140
+ subject-name: toolr-${{ env.RELEASE_VERSION }}.patch
141
+ subject-digest: sha256:${{ steps.upload-release-patch.outputs.artifact-digest }}
142
+
143
+ - name: Create Source Tarball
144
+ id: create-source-tarball
145
+ shell: bash
146
+ run: |
147
+ uv build --sdist
148
+ echo "release-tarball-name=$(ls dist/ | grep gz)" >> "$GITHUB_OUTPUT"
149
+
150
+ - name: Upload Source Tarball Artifact
151
+ id: upload-source-tarball
152
+ uses: actions/upload-artifact@v4
153
+ with:
154
+ name: ${{ steps.create-source-tarball.outputs.release-tarball-name }}
155
+ path: dist/${{ steps.create-source-tarball.outputs.release-tarball-name }}
156
+ retention-days: 7
157
+ if-no-files-found: error
158
+
159
+ - name: Attest source tarball artifact
160
+ uses: actions/attest-build-provenance@v3
161
+ with:
162
+ subject-name: ${{ steps.create-source-tarball.outputs.release-tarball-name }}
163
+ subject-digest: sha256:${{ steps.upload-source-tarball.outputs.artifact-digest }}
@@ -0,0 +1,63 @@
1
+ name: setup-pre-commit
2
+ description: Setup 'pre-commit'
3
+
4
+ inputs:
5
+ version:
6
+ description: Pre-commit version to install
7
+ default: "4.3.0"
8
+ rust-toolchain:
9
+ required: true
10
+ description: Rust toolchain to install
11
+ default: stable
12
+ rust-components:
13
+ required: true
14
+ description: Rust components to install
15
+ default: clippy,rustfmt
16
+
17
+
18
+ runs:
19
+ using: composite
20
+
21
+ steps:
22
+ - name: Setup pre-commit home
23
+ shell: bash
24
+ id: setup-pre-commit-home
25
+ run: |
26
+ PRE_COMMIT_HOME=${{ github.workspace }}/.cache/pre-commit
27
+ echo "pre-commit-home=${PRE_COMMIT_HOME}" >> "$GITHUB_OUTPUT"
28
+ echo "PRE_COMMIT_HOME=${PRE_COMMIT_HOME}" >> "$GITHUB_ENV"
29
+
30
+ - name: Setup Rust Toolchain
31
+ uses: actions-rust-lang/setup-rust-toolchain@v1
32
+ with:
33
+ toolchain: ${{ inputs.rust-toolchain }}
34
+ components: ${{ inputs.rust-components }}
35
+
36
+ - name: Install pre-commit
37
+ shell: bash
38
+ run: |
39
+ pip install pre-commit==${{ inputs.version }}
40
+
41
+ - name: Get Python version checksum
42
+ id: python-version-checksum
43
+ shell: bash
44
+ run: |
45
+ echo "version-sha256sum=$(python --version --version | sha256sum | cut -d ' ' -f1)" >> "$GITHUB_OUTPUT"
46
+
47
+ - name: Get pre-commit version checksum
48
+ id: pre-commit-version-checksum
49
+ shell: bash
50
+ run: |
51
+ echo "version-sha256sum=$(pre-commit --version | sha256sum | cut -d ' ' -f1)" >> "$GITHUB_OUTPUT"
52
+
53
+ - name: Set up cache
54
+ uses: actions/cache@v4
55
+ with:
56
+ path: ${{ steps.setup-pre-commit-home.outputs.pre-commit-home }}
57
+ key: >-
58
+ pre-commit-home|${{ runner.os }}|${{ steps.python-version-checksum.outputs.version-sha256sum }}|${{ steps.pre-commit-version-checksum.outputs.version-sha256sum }}|${{ hashFiles('.pre-commit-config.yaml') }}
59
+
60
+ - name: Install pre-commit hooks
61
+ shell: bash
62
+ run: |
63
+ pre-commit install --install-hooks
@@ -0,0 +1,79 @@
1
+ name: Setup UV
2
+ description: Setup UV for a given Python version
3
+
4
+ inputs:
5
+ python-version:
6
+ required: true
7
+ description: 'Python version to use'
8
+
9
+ cache-prefix:
10
+ required: true
11
+ description: "The prefix to use for the cache key"
12
+
13
+ uv-version:
14
+ default: ""
15
+ description: "The version of uv to install e.g., `0.5.0` Defaults to the version in pyproject.toml or 'latest'."
16
+
17
+ uv-sync-args:
18
+ default: "--all-extras --dev"
19
+ description: "The arguments to pass to the uv sync command. e.g., `--group docs` or `--dev`"
20
+
21
+ outputs:
22
+ uv-version:
23
+ description: "The version of uv installed"
24
+ value: ${{ steps.install-uv.outputs.uv-version }}
25
+
26
+ python-version-checksum:
27
+ description: "The checksum of the Python version"
28
+ value: ${{ steps.python-version-checksum.outputs.version-sha256sum }}
29
+
30
+ uv-version-checksum:
31
+ description: "The checksum of the UV version"
32
+ value: ${{ steps.uv-version-checksum.outputs.version-sha256sum }}
33
+
34
+ runs:
35
+ using: composite
36
+ steps:
37
+ - name: Install Python
38
+ uses: actions/setup-python@v5
39
+ with:
40
+ python-version: ${{ inputs.python-version }}
41
+
42
+ - name: Get Python version checksum
43
+ id: python-version-checksum
44
+ shell: bash
45
+ run: |
46
+ VERSION_SHA256SUM=$(python --version --version | sha256sum | cut -d ' ' -f 1)
47
+ echo "VERSION_SHA256SUM=$VERSION_SHA256SUM"
48
+ echo "version-sha256sum=$VERSION_SHA256SUM" >> "$GITHUB_OUTPUT"
49
+
50
+ - name: Install uv
51
+ id: install-uv
52
+ uses: astral-sh/setup-uv@v6
53
+ with:
54
+ version: ${{ inputs.uv-version }}
55
+
56
+ - name: Get UV version checksum
57
+ id: uv-version-checksum
58
+ shell: bash
59
+ run: |
60
+ VERSION_SHA256SUM=$(uv --version | sha256sum | cut -d ' ' -f 1)
61
+ echo "VERSION_SHA256SUM=$VERSION_SHA256SUM"
62
+ echo "version-sha256sum=$VERSION_SHA256SUM" >> "$GITHUB_OUTPUT"
63
+
64
+ - name: Set up cache
65
+ uses: actions/cache@v4
66
+ with:
67
+ path: .venv
68
+ key: >-
69
+ venv|
70
+ ${{ runner.os }}|
71
+ ${{ inputs.cache-prefix }}|
72
+ ${{ steps.python-version-checksum.outputs.version-sha256sum }}|
73
+ ${{ steps.uv-version-checksum.outputs.version-sha256sum }}|
74
+ ${{ hashFiles('**/uv.lock') }}
75
+
76
+ - name: Install Python Dependencies
77
+ shell: bash
78
+ run: |
79
+ uv sync ${{ inputs.uv-sync-args }}
@@ -0,0 +1,26 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ labels:
8
+ - dependencies:github-actions
9
+ assignees:
10
+ - s0undt3ch
11
+ - package-ecosystem: "cargo"
12
+ directory: "/"
13
+ schedule:
14
+ interval: "weekly"
15
+ labels:
16
+ - dependencies:rust
17
+ assignees:
18
+ - s0undt3ch
19
+ - package-ecosystem: "uv"
20
+ directory: "/"
21
+ schedule:
22
+ interval: "weekly"
23
+ labels:
24
+ - dependencies:python
25
+ assignees:
26
+ - s0undt3ch
@@ -0,0 +1,68 @@
1
+ name: Build
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ display-name:
7
+ required: true
8
+ type: string
9
+ description: 'Display name for the build job'
10
+ release-tarball-name:
11
+ required: true
12
+ type: string
13
+ description: 'Release tarball name'
14
+ platform-matrix:
15
+ required: true
16
+ type: string
17
+ description: 'Platform matrix as JSON string'
18
+
19
+ jobs:
20
+ build:
21
+ name: ${{ inputs.display-name }} (${{ matrix.python }}, ${{ matrix.platform.name }})
22
+ runs-on: ${{ matrix.platform.os }}
23
+ permissions:
24
+ id-token: write
25
+ contents: read
26
+ attestations: write
27
+ strategy:
28
+ fail-fast: false
29
+ matrix:
30
+ platform: ${{ fromJson(inputs.platform-matrix) }}
31
+ python:
32
+ - "cp311"
33
+ - "cp312"
34
+ - "cp313"
35
+
36
+ defaults:
37
+ run:
38
+ shell: bash
39
+
40
+ steps:
41
+ - name: Download Source Tarball Artifact
42
+ uses: actions/download-artifact@v4
43
+ with:
44
+ name: ${{ inputs.release-tarball-name }}
45
+
46
+ - name: Set up QEMU
47
+ uses: docker/setup-qemu-action@v3
48
+ if: ${{ matrix.platform.emulation }}
49
+ with:
50
+ platforms: all
51
+
52
+ - name: Build wheels
53
+ uses: pypa/cibuildwheel@v3.1.4
54
+ env:
55
+ CIBW_ARCHS_LINUX: all
56
+ CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform.name }}
57
+ with:
58
+ package-dir: ${{ inputs.release-tarball-name }}
59
+
60
+ - name: Attest build provenance
61
+ uses: actions/attest-build-provenance@v3
62
+ with:
63
+ subject-path: wheelhouse/*.whl
64
+
65
+ - uses: actions/upload-artifact@v4
66
+ with:
67
+ name: cibw-wheel-${{ matrix.python }}-${{ matrix.platform.name }}
68
+ path: wheelhouse/*.whl