zuke 1.0.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 (165) hide show
  1. zuke-1.0.0/.github/ISSUE_TEMPLATE/bug_report.yml +89 -0
  2. zuke-1.0.0/.github/ISSUE_TEMPLATE/chore.yml +57 -0
  3. zuke-1.0.0/.github/ISSUE_TEMPLATE/config.yml +11 -0
  4. zuke-1.0.0/.github/ISSUE_TEMPLATE/feature_request.yml +54 -0
  5. zuke-1.0.0/.github/dependabot.yml +25 -0
  6. zuke-1.0.0/.github/pull_request_template.md +45 -0
  7. zuke-1.0.0/.github/workflows/ai-review.yml +79 -0
  8. zuke-1.0.0/.github/workflows/ci.yml +47 -0
  9. zuke-1.0.0/.github/workflows/release.yml +43 -0
  10. zuke-1.0.0/.gitignore +24 -0
  11. zuke-1.0.0/.release-please-config.json +12 -0
  12. zuke-1.0.0/.release-please-manifest.json +3 -0
  13. zuke-1.0.0/AGENTS.md +230 -0
  14. zuke-1.0.0/CHANGELOG.md +27 -0
  15. zuke-1.0.0/CLAUDE.md +1 -0
  16. zuke-1.0.0/CODE_OF_CONDUCT.md +79 -0
  17. zuke-1.0.0/CONTRIBUTING.md +133 -0
  18. zuke-1.0.0/GOVERNANCE.md +78 -0
  19. zuke-1.0.0/LICENSE +21 -0
  20. zuke-1.0.0/PKG-INFO +130 -0
  21. zuke-1.0.0/README.md +111 -0
  22. zuke-1.0.0/SECURITY.md +62 -0
  23. zuke-1.0.0/build.py +539 -0
  24. zuke-1.0.0/pyproject.toml +107 -0
  25. zuke-1.0.0/spec/engine.json +72 -0
  26. zuke-1.0.0/spec/tools.json +69728 -0
  27. zuke-1.0.0/src/zuke/__init__.py +76 -0
  28. zuke-1.0.0/src/zuke/_awaited.py +15 -0
  29. zuke-1.0.0/src/zuke/_build.py +169 -0
  30. zuke-1.0.0/src/zuke/_ci.py +141 -0
  31. zuke-1.0.0/src/zuke/_context.py +214 -0
  32. zuke-1.0.0/src/zuke/_dsl.py +629 -0
  33. zuke-1.0.0/src/zuke/_duration.py +23 -0
  34. zuke-1.0.0/src/zuke/_facade.py +79 -0
  35. zuke-1.0.0/src/zuke/_field.py +28 -0
  36. zuke-1.0.0/src/zuke/_generate.py +411 -0
  37. zuke-1.0.0/src/zuke/_guard.py +69 -0
  38. zuke-1.0.0/src/zuke/_rpc.py +198 -0
  39. zuke-1.0.0/src/zuke/_run.py +34 -0
  40. zuke-1.0.0/src/zuke/_settings.py +162 -0
  41. zuke-1.0.0/src/zuke/_worker.py +214 -0
  42. zuke-1.0.0/src/zuke/py.typed +0 -0
  43. zuke-1.0.0/src/zuke/tools/__init__.py +9 -0
  44. zuke-1.0.0/src/zuke/tools/_tooling.py +116 -0
  45. zuke-1.0.0/src/zuke/tools/ai.py +428 -0
  46. zuke-1.0.0/src/zuke/tools/apple.py +1245 -0
  47. zuke-1.0.0/src/zuke/tools/argo_rollouts.py +596 -0
  48. zuke-1.0.0/src/zuke/tools/aws.py +2439 -0
  49. zuke-1.0.0/src/zuke/tools/az.py +2163 -0
  50. zuke-1.0.0/src/zuke/tools/biome.py +150 -0
  51. zuke-1.0.0/src/zuke/tools/bun.py +207 -0
  52. zuke-1.0.0/src/zuke/tools/chocolatey.py +540 -0
  53. zuke-1.0.0/src/zuke/tools/claude.py +186 -0
  54. zuke-1.0.0/src/zuke/tools/cmd.py +43 -0
  55. zuke-1.0.0/src/zuke/tools/codecov.py +129 -0
  56. zuke-1.0.0/src/zuke/tools/codex.py +135 -0
  57. zuke-1.0.0/src/zuke/tools/console.py +147 -0
  58. zuke-1.0.0/src/zuke/tools/cspell.py +119 -0
  59. zuke-1.0.0/src/zuke/tools/cypress.py +183 -0
  60. zuke-1.0.0/src/zuke/tools/dart.py +729 -0
  61. zuke-1.0.0/src/zuke/tools/deno.py +2765 -0
  62. zuke-1.0.0/src/zuke/tools/docker.py +1774 -0
  63. zuke-1.0.0/src/zuke/tools/docker_compose.py +1292 -0
  64. zuke-1.0.0/src/zuke/tools/docs.py +60 -0
  65. zuke-1.0.0/src/zuke/tools/dpdm.py +107 -0
  66. zuke-1.0.0/src/zuke/tools/dprint.py +87 -0
  67. zuke-1.0.0/src/zuke/tools/eslint.py +111 -0
  68. zuke-1.0.0/src/zuke/tools/flutter.py +655 -0
  69. zuke-1.0.0/src/zuke/tools/gcloud.py +2115 -0
  70. zuke-1.0.0/src/zuke/tools/gemini.py +155 -0
  71. zuke-1.0.0/src/zuke/tools/gh.py +97 -0
  72. zuke-1.0.0/src/zuke/tools/git.py +3293 -0
  73. zuke-1.0.0/src/zuke/tools/google.py +96 -0
  74. zuke-1.0.0/src/zuke/tools/helm.py +455 -0
  75. zuke-1.0.0/src/zuke/tools/homebrew.py +750 -0
  76. zuke-1.0.0/src/zuke/tools/husky.py +86 -0
  77. zuke-1.0.0/src/zuke/tools/jest.py +115 -0
  78. zuke-1.0.0/src/zuke/tools/jsr.py +135 -0
  79. zuke-1.0.0/src/zuke/tools/knip.py +79 -0
  80. zuke-1.0.0/src/zuke/tools/kubectl.py +1923 -0
  81. zuke-1.0.0/src/zuke/tools/kustomize.py +93 -0
  82. zuke-1.0.0/src/zuke/tools/lint_staged.py +82 -0
  83. zuke-1.0.0/src/zuke/tools/nest.py +259 -0
  84. zuke-1.0.0/src/zuke/tools/node.py +277 -0
  85. zuke-1.0.0/src/zuke/tools/npm.py +1320 -0
  86. zuke-1.0.0/src/zuke/tools/npx.py +71 -0
  87. zuke-1.0.0/src/zuke/tools/nx.py +135 -0
  88. zuke-1.0.0/src/zuke/tools/openapi_ts.py +72 -0
  89. zuke-1.0.0/src/zuke/tools/orval.py +80 -0
  90. zuke-1.0.0/src/zuke/tools/oxlint.py +103 -0
  91. zuke-1.0.0/src/zuke/tools/playwright.py +173 -0
  92. zuke-1.0.0/src/zuke/tools/pnpm.py +219 -0
  93. zuke-1.0.0/src/zuke/tools/prometheus.py +635 -0
  94. zuke-1.0.0/src/zuke/tools/qr.py +112 -0
  95. zuke-1.0.0/src/zuke/tools/redocly.py +143 -0
  96. zuke-1.0.0/src/zuke/tools/release_please.py +104 -0
  97. zuke-1.0.0/src/zuke/tools/security.py +341 -0
  98. zuke-1.0.0/src/zuke/tools/shellcheck.py +77 -0
  99. zuke-1.0.0/src/zuke/tools/signpath.py +376 -0
  100. zuke-1.0.0/src/zuke/tools/storybook.py +106 -0
  101. zuke-1.0.0/src/zuke/tools/terraform.py +269 -0
  102. zuke-1.0.0/src/zuke/tools/tofu.py +263 -0
  103. zuke-1.0.0/src/zuke/tools/tsc.py +164 -0
  104. zuke-1.0.0/src/zuke/tools/tsc_alias.py +91 -0
  105. zuke-1.0.0/src/zuke/tools/tsdown.py +124 -0
  106. zuke-1.0.0/src/zuke/tools/tsup.py +87 -0
  107. zuke-1.0.0/src/zuke/tools/tsx.py +111 -0
  108. zuke-1.0.0/src/zuke/tools/turbo.py +115 -0
  109. zuke-1.0.0/src/zuke/tools/vite.py +157 -0
  110. zuke-1.0.0/src/zuke/tools/vitest.py +131 -0
  111. zuke-1.0.0/src/zuke/tools/yarn.py +171 -0
  112. zuke-1.0.0/tests/conftest.py +184 -0
  113. zuke-1.0.0/tests/fixtures/facades/__init__.py +9 -0
  114. zuke-1.0.0/tests/fixtures/facades/_tooling.py +37 -0
  115. zuke-1.0.0/tests/fixtures/facades/tally.py +53 -0
  116. zuke-1.0.0/tests/fixtures/facades/widget.py +104 -0
  117. zuke-1.0.0/tests/fixtures/spec.json +590 -0
  118. zuke-1.0.0/tests/protocol/cases/VERSION +1 -0
  119. zuke-1.0.0/tests/protocol/cases/cachekey.json +25 -0
  120. zuke-1.0.0/tests/protocol/cases/ci.json +83 -0
  121. zuke-1.0.0/tests/protocol/cases/compensation.json +36 -0
  122. zuke-1.0.0/tests/protocol/cases/condition.json +33 -0
  123. zuke-1.0.0/tests/protocol/cases/context.json +88 -0
  124. zuke-1.0.0/tests/protocol/cases/engine_death.json +18 -0
  125. zuke-1.0.0/tests/protocol/cases/failure.json +42 -0
  126. zuke-1.0.0/tests/protocol/cases/graph.json +88 -0
  127. zuke-1.0.0/tests/protocol/cases/hooks.json +41 -0
  128. zuke-1.0.0/tests/protocol/cases/lock.json +31 -0
  129. zuke-1.0.0/tests/protocol/cases/ordering.json +37 -0
  130. zuke-1.0.0/tests/protocol/cases/parameters.json +167 -0
  131. zuke-1.0.0/tests/protocol/cases/recheck.json +95 -0
  132. zuke-1.0.0/tests/protocol/cases/respawn.json +37 -0
  133. zuke-1.0.0/tests/protocol/cases/retry.json +29 -0
  134. zuke-1.0.0/tests/protocol/cases/service.json +40 -0
  135. zuke-1.0.0/tests/protocol/cases/suspend.json +73 -0
  136. zuke-1.0.0/tests/protocol/cases/tool_call.json +34 -0
  137. zuke-1.0.0/tests/protocol/cases/tool_cancel.json +69 -0
  138. zuke-1.0.0/tests/protocol/cases/tool_dryrun.json +56 -0
  139. zuke-1.0.0/tests/protocol/cases/tool_env.json +54 -0
  140. zuke-1.0.0/tests/protocol/cases/tool_setter.json +37 -0
  141. zuke-1.0.0/tests/protocol/cases/triggers.json +29 -0
  142. zuke-1.0.0/tests/protocol/test_conformance.py +376 -0
  143. zuke-1.0.0/tests/protocol/worker.py +15 -0
  144. zuke-1.0.0/tests/test_build.py +154 -0
  145. zuke-1.0.0/tests/test_build_file.py +347 -0
  146. zuke-1.0.0/tests/test_ci.py +78 -0
  147. zuke-1.0.0/tests/test_context.py +300 -0
  148. zuke-1.0.0/tests/test_dsl.py +201 -0
  149. zuke-1.0.0/tests/test_facade.py +95 -0
  150. zuke-1.0.0/tests/test_gates.py +171 -0
  151. zuke-1.0.0/tests/test_generate.py +135 -0
  152. zuke-1.0.0/tests/test_hooks.py +105 -0
  153. zuke-1.0.0/tests/test_license_headers.py +28 -0
  154. zuke-1.0.0/tests/test_package.py +26 -0
  155. zuke-1.0.0/tests/test_rpc.py +251 -0
  156. zuke-1.0.0/tests/test_run.py +54 -0
  157. zuke-1.0.0/tests/test_services.py +98 -0
  158. zuke-1.0.0/tests/test_tools.py +61 -0
  159. zuke-1.0.0/tests/test_twins.py +21 -0
  160. zuke-1.0.0/tests/test_worker.py +264 -0
  161. zuke-1.0.0/tests/twins.py +449 -0
  162. zuke-1.0.0/uv.lock +282 -0
  163. zuke-1.0.0/zuke +211 -0
  164. zuke-1.0.0/zuke.json +5 -0
  165. zuke-1.0.0/zuke.ps1 +181 -0
@@ -0,0 +1,89 @@
1
+ name: Bug report
2
+ description: Report something in zuke-python that isn't working as documented.
3
+ title: "bug: "
4
+ labels: ["bug"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Thanks for taking the time to file a bug! A minimal reproduction is the
10
+ single most useful thing you can give us.
11
+
12
+ Before you start, please
13
+ [search existing issues](https://github.com/zuke-build/zuke-python/issues?q=is%3Aissue)
14
+ to avoid duplicates. **Do not report security vulnerabilities here** —
15
+ follow the private process in
16
+ [SECURITY.md](https://github.com/zuke-build/zuke-python/blob/main/SECURITY.md).
17
+ - type: checkboxes
18
+ id: preflight
19
+ attributes:
20
+ label: Pre-flight checklist
21
+ options:
22
+ - label: I searched existing issues and did not find a duplicate.
23
+ required: true
24
+ - label: This is a bug, not a security vulnerability or a usage question.
25
+ required: true
26
+ - type: textarea
27
+ id: what-happened
28
+ attributes:
29
+ label: What happened?
30
+ description: A clear and concise description of the bug.
31
+ placeholder: Running `zuke test` fails to resolve a dependency that is declared above its dependent.
32
+ validations:
33
+ required: true
34
+ - type: textarea
35
+ id: expected
36
+ attributes:
37
+ label: Expected behaviour
38
+ description: What did you expect to happen instead?
39
+ validations:
40
+ required: true
41
+ - type: textarea
42
+ id: reproduction
43
+ attributes:
44
+ label: Minimal reproduction
45
+ description: >
46
+ The smallest build file and commands that reproduce the problem. Paste a
47
+ self-contained `build.py` (or snippet) and the exact command you ran.
48
+ Code blocks here are automatically formatted, so no backticks are needed.
49
+ render: python
50
+ validations:
51
+ required: true
52
+ - type: input
53
+ id: package
54
+ attributes:
55
+ label: Affected versions
56
+ description: The zuke-python version and the Zuke engine version it ran on.
57
+ placeholder: "zuke-python 0.1.0, zuke engine 2.0.0"
58
+ validations:
59
+ required: true
60
+ - type: input
61
+ id: python-version
62
+ attributes:
63
+ label: Python version
64
+ description: Output of `python --version`.
65
+ placeholder: "Python 3.12.x"
66
+ validations:
67
+ required: true
68
+ - type: input
69
+ id: os
70
+ attributes:
71
+ label: Operating system
72
+ placeholder: "macOS 14, Ubuntu 24.04, Windows 11, …"
73
+ validations:
74
+ required: true
75
+ - type: textarea
76
+ id: logs
77
+ attributes:
78
+ label: Relevant logs or output
79
+ description: Any error output, stack traces, or `--list`/`graph` output. Automatically formatted as code.
80
+ render: shell
81
+ validations:
82
+ required: false
83
+ - type: textarea
84
+ id: context
85
+ attributes:
86
+ label: Additional context
87
+ description: Anything else that helps us understand the problem.
88
+ validations:
89
+ required: false
@@ -0,0 +1,57 @@
1
+ name: Chore or documentation
2
+ description: Track documentation, refactoring, tests, or repository work.
3
+ title: "chore: "
4
+ labels: ["chore"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Every change in this repository starts with an issue — including docs,
10
+ refactors, tests, and build work. This is the template for the work that
11
+ is neither a new capability nor a bug.
12
+
13
+ Please
14
+ [search existing issues](https://github.com/zuke-build/zuke-python/issues?q=is%3Aissue)
15
+ first to avoid duplicates.
16
+ - type: checkboxes
17
+ id: preflight
18
+ attributes:
19
+ label: Pre-flight checklist
20
+ options:
21
+ - label: I searched existing issues and did not find a duplicate.
22
+ required: true
23
+ - label: This is not a new capability or a bug report — those have their own templates.
24
+ required: true
25
+ - type: textarea
26
+ id: what
27
+ attributes:
28
+ label: What needs doing?
29
+ description: The change itself, concretely.
30
+ placeholder: Document the resolution order the tool wrappers use when both a local binary and a project-local install are present.
31
+ validations:
32
+ required: true
33
+ - type: textarea
34
+ id: why
35
+ attributes:
36
+ label: Why now?
37
+ description: What is harder, riskier, or more confusing than it should be until this lands?
38
+ validations:
39
+ required: true
40
+ - type: input
41
+ id: scope
42
+ attributes:
43
+ label: Affected area(s)
44
+ description: The packages, directories, or files involved.
45
+ placeholder: "docs/, AGENTS.md, .github/"
46
+ validations:
47
+ required: false
48
+ - type: textarea
49
+ id: acceptance
50
+ attributes:
51
+ label: Acceptance criteria
52
+ description: How a reviewer confirms this is done.
53
+ placeholder: |
54
+ - The resolution order is described in docs/tooling.md.
55
+ - `uv run poe ci` passes.
56
+ validations:
57
+ required: true
@@ -0,0 +1,11 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Report a security vulnerability
4
+ url: https://github.com/zuke-build/zuke-python/security/advisories/new
5
+ about: Do not file security issues publicly. Use private vulnerability reporting — see SECURITY.md.
6
+ - name: The Zuke engine and its protocol
7
+ url: https://github.com/zuke-build/zuke
8
+ about: The engine this SDK talks to, its tool wrappers, and the worker protocol live there.
9
+ - name: Contributing guide
10
+ url: https://github.com/zuke-build/zuke-python/blob/main/CONTRIBUTING.md
11
+ about: How to set up, run the gate, and open a good pull request.
@@ -0,0 +1,54 @@
1
+ name: Feature request
2
+ description: Suggest a new capability, tool wrapper, or improvement.
3
+ title: "feat: "
4
+ labels: ["enhancement"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Thanks for the idea! If you are planning a large change, opening this
10
+ issue first lets us agree on the direction before you invest the effort.
11
+
12
+ Please
13
+ [search existing issues](https://github.com/zuke-build/zuke-python/issues?q=is%3Aissue)
14
+ first to avoid duplicates.
15
+ - type: checkboxes
16
+ id: preflight
17
+ attributes:
18
+ label: Pre-flight checklist
19
+ options:
20
+ - label: I searched existing issues and did not find a duplicate.
21
+ required: true
22
+ - type: textarea
23
+ id: problem
24
+ attributes:
25
+ label: Problem or motivation
26
+ description: What are you trying to do, and what makes it hard today? Focus on the "why".
27
+ placeholder: I want to wrap the `foo` CLI as a typed `FooTasks` object so my build doesn't fall back to raw shell.
28
+ validations:
29
+ required: true
30
+ - type: textarea
31
+ id: proposal
32
+ attributes:
33
+ label: Proposed solution
34
+ description: >
35
+ How would you like it to work? Sketches of the public surface are
36
+ welcome. A new tool wrapper belongs in the engine repository, since the
37
+ Python facades are generated from it.
38
+ render: python
39
+ validations:
40
+ required: true
41
+ - type: textarea
42
+ id: alternatives
43
+ attributes:
44
+ label: Alternatives considered
45
+ description: Other approaches you weighed, including running the command through `ctx.sh`.
46
+ validations:
47
+ required: false
48
+ - type: textarea
49
+ id: context
50
+ attributes:
51
+ label: Additional context
52
+ description: Links to the tool's CLI docs, related issues, or anything else that helps.
53
+ validations:
54
+ required: false
@@ -0,0 +1,25 @@
1
+ version: 2
2
+ updates:
3
+ # Keep the SHA-pinned GitHub Actions current. Dependabot reads the version
4
+ # comment next to each pinned SHA and opens PRs that bump both together, so
5
+ # pinning to a commit never means going stale on security fixes.
6
+ - package-ecosystem: github-actions
7
+ directory: "/"
8
+ schedule:
9
+ interval: weekly
10
+ groups:
11
+ actions:
12
+ patterns: ["*"]
13
+ commit-message:
14
+ prefix: "ci"
15
+ # The development tools in pyproject.toml and uv.lock. The package itself has
16
+ # no runtime dependencies.
17
+ - package-ecosystem: uv
18
+ directory: "/"
19
+ schedule:
20
+ interval: weekly
21
+ groups:
22
+ dev-tools:
23
+ patterns: ["*"]
24
+ commit-message:
25
+ prefix: "chore"
@@ -0,0 +1,45 @@
1
+ <!--
2
+ Thanks for contributing to zuke-python! A few things that make review fast:
3
+
4
+ The PR title IS the release trigger. This repo squash-merges, and
5
+ release-please parses only the squashed subject (your PR title). Title this PR
6
+ as a Conventional Commit so the right version is cut:
7
+
8
+ feat: add the service builder -> minor bump
9
+ fix: honour the worker's cwd in exec -> patch bump
10
+ docs|chore|refactor|test: ... -> no release
11
+ -->
12
+
13
+ ## What & why
14
+
15
+ <!-- What does this change do, and what problem does it solve? Explain the
16
+ motivation, not just the mechanics. -->
17
+
18
+ ## Related issues
19
+
20
+ <!-- Required: "Closes #123". Every change starts with an issue — file one from
21
+ .github/ISSUE_TEMPLATE (feature request, bug report, or chore) before opening
22
+ this PR. See AGENTS.md. -->
23
+
24
+ ## Checklist
25
+
26
+ - [ ] This PR closes a tracking issue (`Closes #<n>` above).
27
+ - [ ] The PR title is a
28
+ [Conventional Commit](https://www.conventionalcommits.org/)
29
+ (`type(scope): summary`).
30
+ - [ ] `uv run poe ci` passes locally (format, lint, type-check, tests).
31
+ - [ ] Tests were added or updated; coverage stays at 95%+ (lines and branches).
32
+ - [ ] Docs updated in the same PR (`README.md`, docstrings) when behaviour
33
+ changed.
34
+ - [ ] No `Any`, no `cast`, no `type: ignore` in `src/` (narrow with guards
35
+ instead).
36
+ - [ ] No dead code: unreachable branches and can't-fire fallbacks are removed,
37
+ with types tightened so the impossible state is unrepresentable.
38
+ - [ ] No duplicated logic: an existing helper is imported rather than retyped.
39
+ - [ ] A protocol change was made in the engine repository first, and this PR
40
+ pins the engine version that carries it.
41
+ - [ ] The code is written using AI assisted coding.
42
+
43
+ <!-- Keep illustrative code in this description, not in commit message bodies:
44
+ release-please's strict parser can drop a commit whose body contains code with
45
+ parentheses, silently skipping it from the release. -->
@@ -0,0 +1,79 @@
1
+ name: AI Review
2
+ "on":
3
+ pull_request: {}
4
+ issue_comment:
5
+ types:
6
+ - created
7
+ permissions:
8
+ contents: read
9
+ concurrency:
10
+ group: "ai-review-${{ github.event.pull_request.number || github.event.issue.number }}"
11
+ cancel-in-progress: true
12
+ jobs:
13
+ review:
14
+ name: AI review
15
+ runs-on: ubuntu-latest
16
+ permissions:
17
+ contents: read
18
+ pull-requests: write
19
+ if: "${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}"
20
+ timeout-minutes: 15
21
+ steps:
22
+ - name: Harden and check out with Zuke
23
+ uses: zuke-build/zuke@b0832247daa16321be405a10b71c022317d2c5a4 # v1.0.8
24
+ with:
25
+ egress-policy: block
26
+ persist-credentials: "false"
27
+ allowed-endpoints: "deno.land:443 dl.deno.land:443 jsr.io:443 github.com:443 api.github.com:443 codeload.github.com:443 objects.githubusercontent.com:443 release-assets.githubusercontent.com:443 pypi.org:443 files.pythonhosted.org:443 api.openai.com:443"
28
+ - name: Install uv
29
+ shell: bash
30
+ run: pipx install uv
31
+ - name: Sync the locked environment
32
+ shell: bash
33
+ run: uv sync --locked
34
+ - name: AI review with Zuke
35
+ run: ./zuke review
36
+ env:
37
+ OPENAI_API_KEY: "${{ secrets.OPENAI_API_KEY }}"
38
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
39
+ commandReview:
40
+ name: AI review on command
41
+ runs-on: ubuntu-latest
42
+ permissions:
43
+ contents: read
44
+ pull-requests: write
45
+ if: "${{ github.event_name == 'issue_comment' && github.event.issue.pull_request && github.event.comment.user.type != 'Bot' && (startsWith(github.event.comment.body, '@zuke-build review') || startsWith(github.event.comment.body, '@zuke-build accept')) }}"
46
+ timeout-minutes: 15
47
+ steps:
48
+ - name: Harden and check out with Zuke
49
+ uses: zuke-build/zuke@b0832247daa16321be405a10b71c022317d2c5a4 # v1.0.8
50
+ with:
51
+ egress-policy: block
52
+ persist-credentials: "false"
53
+ allowed-endpoints: "deno.land:443 dl.deno.land:443 jsr.io:443 github.com:443 api.github.com:443 codeload.github.com:443 objects.githubusercontent.com:443 release-assets.githubusercontent.com:443 pypi.org:443 files.pythonhosted.org:443 api.openai.com:443"
54
+ - name: Install uv
55
+ shell: bash
56
+ run: pipx install uv
57
+ - name: Sync the locked environment
58
+ shell: bash
59
+ run: uv sync --locked
60
+ - name: Check the commenter may start a review
61
+ id: callers
62
+ run: ./zuke review_preflight
63
+ env:
64
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
65
+ ZUKE_REVIEW_PR: "${{ github.event.issue.number }}"
66
+ ZUKE_REVIEW_COMMENT: "${{ github.event.comment.id }}"
67
+ ZUKE_REVIEW_ACTOR: "${{ github.event.comment.user.login }}"
68
+ ZUKE_REVIEW_ROLE: write
69
+ continue-on-error: true
70
+ - name: AI review with Zuke
71
+ if: "steps.callers.outcome == 'success'"
72
+ run: ./zuke review
73
+ env:
74
+ OPENAI_API_KEY: "${{ secrets.OPENAI_API_KEY }}"
75
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
76
+ ZUKE_REVIEW_PR: "${{ github.event.issue.number }}"
77
+ ZUKE_REVIEW_COMMENT: "${{ github.event.comment.id }}"
78
+ ZUKE_REVIEW_ACTOR: "${{ github.event.comment.user.login }}"
79
+ ZUKE_REVIEW_ROLE: write
@@ -0,0 +1,47 @@
1
+ name: CI
2
+ "on":
3
+ push:
4
+ branches:
5
+ - main
6
+ pull_request:
7
+ branches:
8
+ - main
9
+ permissions:
10
+ contents: read
11
+ concurrency:
12
+ group: "ci-${{ github.ref }}"
13
+ cancel-in-progress: true
14
+ jobs:
15
+ ci:
16
+ name: "Gate (${{ matrix.os }})"
17
+ runs-on: "${{ matrix.os }}"
18
+ timeout-minutes: 15
19
+ strategy:
20
+ fail-fast: false
21
+ matrix:
22
+ os:
23
+ - ubuntu-latest
24
+ - macos-latest
25
+ - windows-latest
26
+ steps:
27
+ - name: Harden and check out with Zuke
28
+ uses: zuke-build/zuke@b0832247daa16321be405a10b71c022317d2c5a4 # v1.0.8
29
+ with:
30
+ egress-policy: audit
31
+ persist-credentials: "false"
32
+ - name: Install uv
33
+ shell: bash
34
+ run: pipx install uv
35
+ - name: Sync the locked environment
36
+ shell: bash
37
+ run: uv sync --locked
38
+ - name: Run the gate with the bash launcher
39
+ if: "runner.os != 'Windows'"
40
+ run: ./zuke ci
41
+ - name: Run the gate with the PowerShell launcher
42
+ if: "runner.os == 'Windows'"
43
+ shell: pwsh
44
+ run: ./zuke.ps1 ci
45
+ - name: Check the generated workflow is current
46
+ if: "runner.os != 'Windows'"
47
+ run: ./zuke generate-ci --check
@@ -0,0 +1,43 @@
1
+ name: Release
2
+ "on":
3
+ push:
4
+ branches:
5
+ - main
6
+ permissions:
7
+ contents: read
8
+ concurrency:
9
+ group: "release-${{ github.ref }}"
10
+ cancel-in-progress: false
11
+ jobs:
12
+ release:
13
+ name: "Maintain the release PR, and publish a cut release"
14
+ runs-on: ubuntu-latest
15
+ environment: pypi
16
+ permissions:
17
+ contents: write
18
+ pull-requests: write
19
+ id-token: write
20
+ timeout-minutes: 15
21
+ steps:
22
+ - name: Harden and check out with Zuke
23
+ uses: zuke-build/zuke@b0832247daa16321be405a10b71c022317d2c5a4 # v1.0.8
24
+ with:
25
+ egress-policy: audit
26
+ persist-credentials: "false"
27
+ - name: Maintain the release PR and cut the release
28
+ id: release
29
+ uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1
30
+ with:
31
+ config-file: .release-please-config.json
32
+ manifest-file: .release-please-manifest.json
33
+ - name: Install uv
34
+ if: steps.release.outputs.release_created
35
+ shell: bash
36
+ run: pipx install uv
37
+ - name: Sync the locked environment
38
+ if: steps.release.outputs.release_created
39
+ shell: bash
40
+ run: uv sync --locked
41
+ - name: Publish to PyPI with Zuke
42
+ if: steps.release.outputs.release_created
43
+ run: ./zuke publish
zuke-1.0.0/.gitignore ADDED
@@ -0,0 +1,24 @@
1
+ # Python
2
+ __pycache__/
3
+ *.pyc
4
+ .venv/
5
+ /dist/
6
+ /build/
7
+ *.egg-info/
8
+
9
+ # Tooling caches and reports
10
+ .ruff_cache/
11
+ .pytest_cache/
12
+ .coverage
13
+ /coverage.xml
14
+ /htmlcov/
15
+
16
+ # Generated Zuke artifacts, once the build is a Zuke build
17
+ /.zuke/
18
+
19
+ # Editor / OS noise
20
+ .DS_Store
21
+ *.swp
22
+
23
+ # Env
24
+ .env
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3
+ "release-type": "simple",
4
+ "bump-minor-pre-major": false,
5
+ "packages": {
6
+ ".": {
7
+ "package-name": "zuke",
8
+ "changelog-path": "CHANGELOG.md",
9
+ "extra-files": ["src/zuke/__init__.py"]
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "1.0.0"
3
+ }