bashrun 0.1.12__tar.gz → 0.1.13.dev37253071983__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 (26) hide show
  1. bashrun-0.1.13.dev37253071983/.github/actions/setup-release-devkit/action.yml +11 -0
  2. bashrun-0.1.13.dev37253071983/.github/workflows/integrate.yml +57 -0
  3. bashrun-0.1.13.dev37253071983/.github/workflows/merge-gate.yml +41 -0
  4. bashrun-0.1.13.dev37253071983/.github/workflows/release.yml +70 -0
  5. {bashrun-0.1.12 → bashrun-0.1.13.dev37253071983}/AGENTS.md +2 -8
  6. {bashrun-0.1.12 → bashrun-0.1.13.dev37253071983}/PKG-INFO +1 -1
  7. bashrun-0.1.13.dev37253071983/README.md +3 -0
  8. {bashrun-0.1.12 → bashrun-0.1.13.dev37253071983}/pyproject.toml +1 -1
  9. {bashrun-0.1.12 → bashrun-0.1.13.dev37253071983}/release-devkit.yaml +1 -2
  10. {bashrun-0.1.12 → bashrun-0.1.13.dev37253071983}/tools/devkit/pyproject.toml +1 -1
  11. {bashrun-0.1.12 → bashrun-0.1.13.dev37253071983}/tools/devkit/uv.lock +4 -4
  12. bashrun-0.1.12/.github/workflows/ci-cd.yml +0 -99
  13. bashrun-0.1.12/README.md +0 -45
  14. {bashrun-0.1.12 → bashrun-0.1.13.dev37253071983}/.gitattributes +0 -0
  15. {bashrun-0.1.12 → bashrun-0.1.13.dev37253071983}/.gitignore +0 -0
  16. {bashrun-0.1.12 → bashrun-0.1.13.dev37253071983}/.python-version +0 -0
  17. {bashrun-0.1.12 → bashrun-0.1.13.dev37253071983}/CLAUDE.md +0 -0
  18. {bashrun-0.1.12 → bashrun-0.1.13.dev37253071983}/LICENSE +0 -0
  19. {bashrun-0.1.12 → bashrun-0.1.13.dev37253071983}/NOTICE +0 -0
  20. {bashrun-0.1.12 → bashrun-0.1.13.dev37253071983}/ruff.base.toml +0 -0
  21. {bashrun-0.1.12 → bashrun-0.1.13.dev37253071983}/ruff.toml +0 -0
  22. {bashrun-0.1.12 → bashrun-0.1.13.dev37253071983}/src/bashrun/__init__.py +0 -0
  23. {bashrun-0.1.12 → bashrun-0.1.13.dev37253071983}/src/bashrun/bash.py +0 -0
  24. {bashrun-0.1.12 → bashrun-0.1.13.dev37253071983}/src/bashrun/py.typed +0 -0
  25. {bashrun-0.1.12 → bashrun-0.1.13.dev37253071983}/tests/test_bash.py +0 -0
  26. {bashrun-0.1.12 → bashrun-0.1.13.dev37253071983}/uv.lock +0 -0
@@ -0,0 +1,11 @@
1
+ name: setup-release-devkit
2
+ description: Install release-devkit at the pinned commit into RUNNER_TEMP
3
+ runs:
4
+ using: composite
5
+ steps:
6
+ - shell: bash
7
+ env:
8
+ RELEASE_DEVKIT_COMMIT: ad4215260f7b24ec36d94ddc2ba6660be8afc5fb
9
+ run: |
10
+ git clone https://github.com/outernet-foundation/release-devkit.git "$RUNNER_TEMP/release-devkit"
11
+ git -C "$RUNNER_TEMP/release-devkit" checkout "$RELEASE_DEVKIT_COMMIT"
@@ -0,0 +1,57 @@
1
+ name: Integrate
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ pull_request:
6
+ branches: [dev]
7
+
8
+ concurrency:
9
+ group: integrate-${{ github.ref }}
10
+ cancel-in-progress: true
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ jobs:
16
+ lint-workflows:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - &checkout
20
+ uses: actions/checkout@v5
21
+ with:
22
+ ref: ${{ github.event.pull_request.head.sha }}
23
+ persist-credentials: false
24
+ - &uv-restore
25
+ uses: astral-sh/setup-uv@v7
26
+ with:
27
+ enable-cache: true
28
+ save-cache: "false"
29
+ - &setup-release-devkit
30
+ uses: ./.github/actions/setup-release-devkit
31
+ - run: uv run --project "$RUNNER_TEMP/release-devkit" --locked --no-dev lint-workflows
32
+
33
+ preflight:
34
+ needs: [lint-workflows]
35
+ runs-on: ubuntu-latest
36
+ steps:
37
+ - *checkout
38
+ - uses: astral-sh/setup-uv@v7
39
+ with:
40
+ enable-cache: true
41
+ save-cache: "true"
42
+ - run: uv lock --check --project tools/devkit
43
+ - run: uv run --project tools/devkit preflight-python
44
+
45
+ validate-release-plan:
46
+ runs-on: ubuntu-latest
47
+ steps:
48
+ - uses: actions/checkout@v5
49
+ with:
50
+ ref: ${{ github.event.pull_request.head.sha }}
51
+ # Perform a full clone, required for tags
52
+ fetch-depth: 0
53
+ fetch-tags: true
54
+ persist-credentials: false
55
+ - *uv-restore
56
+ - *setup-release-devkit
57
+ - run: uv run --project "$RUNNER_TEMP/release-devkit" --locked --no-dev validate-release-plan
@@ -0,0 +1,41 @@
1
+ name: Merge gate
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [dev]
6
+ types: [labeled]
7
+ workflow_run:
8
+ workflows: [Integrate]
9
+ types: [completed]
10
+
11
+ concurrency:
12
+ group: merge-gate-${{ github.event.pull_request.number || github.event.workflow_run.head_branch }}
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ jobs:
18
+ merge-gate:
19
+ if: github.event.label.name == 'ready-to-merge' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - uses: actions/checkout@v5
23
+ with:
24
+ ref: ${{ github.event.pull_request.head.sha || github.event.workflow_run.head_sha }}
25
+ # Perform a full clone, required so merge-gate can validate that this PR is a fast forward from dev
26
+ fetch-depth: 0
27
+ persist-credentials: false
28
+ - uses: astral-sh/setup-uv@v7
29
+ with:
30
+ enable-cache: true
31
+ save-cache: "false"
32
+ - uses: ./.github/actions/setup-release-devkit
33
+ - uses: actions/create-github-app-token@v3
34
+ id: mint
35
+ with:
36
+ app-id: ${{ vars.MERGE_BOT_APP_ID }}
37
+ private-key: ${{ secrets.MERGE_BOT_APP_PRIVATE_KEY }}
38
+ - run: uv run --project "$RUNNER_TEMP/release-devkit" --locked --no-dev merge-gate
39
+ env:
40
+ GITHUB_TOKEN: ${{ steps.mint.outputs.token }}
41
+ HEAD_SHA: ${{ github.event.pull_request.head.sha || github.event.workflow_run.head_sha }}
@@ -0,0 +1,70 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches: [main, dev]
6
+
7
+ concurrency:
8
+ group: release-${{ github.ref }}
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ jobs:
14
+ ensure-release-pr:
15
+ if: github.ref == 'refs/heads/dev'
16
+ runs-on: ubuntu-latest
17
+ permissions:
18
+ contents: write
19
+ pull-requests: write
20
+ steps:
21
+ - uses: actions/checkout@v5
22
+ with:
23
+ persist-credentials: false
24
+ - &uv-restore
25
+ uses: astral-sh/setup-uv@v7
26
+ with:
27
+ enable-cache: true
28
+ save-cache: "false"
29
+ - &setup-release-devkit
30
+ uses: ./.github/actions/setup-release-devkit
31
+ - run: uv run --project "$RUNNER_TEMP/release-devkit" --locked --no-dev ensure-release-pr
32
+ env:
33
+ GITHUB_TOKEN: ${{ github.token }}
34
+
35
+ publish-prerelease:
36
+ if: github.ref == 'refs/heads/dev'
37
+ runs-on: ubuntu-latest
38
+ permissions:
39
+ contents: read
40
+ id-token: write
41
+ steps:
42
+ - uses: actions/checkout@v5
43
+ with:
44
+ # Perform a full clone, required for tags
45
+ fetch-depth: 0
46
+ fetch-tags: true
47
+ persist-credentials: false
48
+ - *uv-restore
49
+ - *setup-release-devkit
50
+ - run: uv run --project "$RUNNER_TEMP/release-devkit" --locked --no-dev publish-prerelease
51
+
52
+ release:
53
+ if: github.ref == 'refs/heads/main'
54
+ runs-on: ubuntu-latest
55
+ permissions:
56
+ contents: write
57
+ id-token: write
58
+ steps:
59
+ - uses: actions/checkout@v5
60
+ with:
61
+ # Perform a full clone, required for tags
62
+ fetch-depth: 0
63
+ fetch-tags: true
64
+ # Persist credentials so that the release command can push release tags
65
+ persist-credentials: true
66
+ - *uv-restore
67
+ - *setup-release-devkit
68
+ - run: uv run --project "$RUNNER_TEMP/release-devkit" --locked --no-dev release
69
+ env:
70
+ GITHUB_TOKEN: ${{ github.token }}
@@ -35,12 +35,6 @@ The package is `bashrun` (src-layout under `src/bashrun/`); consumer repos decla
35
35
 
36
36
  ## Release flow
37
37
 
38
- Publishing rides `ci-cd.yml`, which combines CI and release: `check` runs python-devkit's `preflight-python` through a sidecar virtual project at `tools/devkit/` (`uv run --project tools/devkit preflight-python`) then `publish-stable --dry-run` as its trailing step, and the publish jobs (`publish-stable`, `publish-dev`, `ensure-release-pr`) run release-devkit's verbs as inlined `uvx --from release-devkit==${{ env.RELEASE_DEVKIT_VERSION }}` steps, version-pinned in the workflow `env:` (see release-devkit's `AGENTS.md`), never a project dependency (bashrun sits inside release-devkit's own dependency graph; a project-level edge is a resolver cycle).
38
+ release-devkit's `AGENTS.md` owns the three-workflow contract; this repo follows it unchanged. Repo-specific facts: release-devkit is never a project dependency (bashrun sits inside its dependency graph; a project-level edge is a resolver cycle), and API-breaking changes ship with a manually bumped `major_minor` (patch-auto assumes additive changes).
39
39
 
40
- The sidecar exists because bashrun cannot take python-devkit as a dependency: python-devkit runtime-depends on bashrun, so uv's resolver rejects the name-shadowing as a self-dependency. `tools/devkit/pyproject.toml` is a `package = false` project named `bashrun-devkit` (not `bashrun`) that exact-pins `python-devkit`; the different root name lets python-devkit's `bashrun` dep resolve to PyPI inside the sidecar's isolated env with no shadowing. `--project` uses the sidecar env but leaves cwd at the repo root, so preflight's child `uv run` calls (sync, ruff, pytest, …) re-discover bashrun's real project and run in bashrun's `.venv`. The committed `tools/devkit/uv.lock` is the single version surface (exact pin plus locked transitives), checked with `uv lock --check --project tools/devkit`.
41
-
42
- The dev channel (`publish-dev` on `dev` push, an in-run job gated on `check`) ships immutable `-dev.<run-id>` prereleases; `ensure-release-pr` maintains the standing `dev` → `main` release-PR gate; `publish-stable` runs on `main` push under OIDC trusted publishing (publisher bound to `ci-cd.yml`, `release` environment). The committed `pyproject.toml` version is permanently the `0.0.0.dev0` sentinel; the `bashrun-v*` tags are the version ledger (declared `major_minor` line in `release-devkit.yaml`, patch-auto within the line). API-breaking changes ship with a manually bumped `major_minor` — patch-auto assumes additive changes.
43
-
44
- ## See also
45
-
46
- - `README.md` — human-facing setup and usage.
40
+ This repo cannot take python-devkit as a dependency (python-devkit runtime-depends on bashrun; uv's resolver rejects the name-shadowing as a self-dependency), so its own preflight consumes python-devkit through the `tools/devkit/` sidecar: a `package = false` project named `bashrun-devkit` that exact-pins `python-devkit` — the different root name lets the dependency resolve to PyPI inside the sidecar's isolated env with no shadowing. `--project` uses the sidecar env but leaves cwd at the repo root, so preflight's child `uv run` calls (sync, ruff, pytest, …) re-discover bashrun's real project and run in bashrun's `.venv`. The committed `tools/devkit/uv.lock` is the single version surface, checked with `uv lock --check --project tools/devkit`.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: bashrun
3
- Version: 0.1.12
3
+ Version: 0.1.13.dev37253071983
4
4
  Summary: Guardrailed shell-exec helpers for Python
5
5
  License-File: LICENSE
6
6
  License-File: NOTICE
@@ -0,0 +1,3 @@
1
+ # bashrun
2
+
3
+ Guardrailed shell-exec helpers for Python — a thin, zero-dependency layer over `subprocess`. Agent-facing documentation lives in [`AGENTS.md`](./AGENTS.md).
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "bashrun"
3
- version = "0.1.12"
3
+ version = "0.1.13.dev37253071983"
4
4
  description = "Guardrailed shell-exec helpers for Python"
5
5
  requires-python = ">=3.13"
6
6
  dependencies = []
@@ -1,5 +1,4 @@
1
- requires: ">=0.1"
2
- ci_workflow: ci-cd.yml
1
+ ci_workflow: release.yml
3
2
  packages:
4
3
  bashrun:
5
4
  path: .
@@ -2,7 +2,7 @@
2
2
  name = "bashrun-devkit"
3
3
  version = "0"
4
4
  requires-python = ">=3.13"
5
- dependencies = ["python-devkit==0.1.14"]
5
+ dependencies = ["python-devkit==0.1.15"]
6
6
 
7
7
  [tool.uv]
8
8
  package = false
@@ -38,7 +38,7 @@ dependencies = [
38
38
  ]
39
39
 
40
40
  [package.metadata]
41
- requires-dist = [{ name = "python-devkit", specifier = "==0.1.14" }]
41
+ requires-dist = [{ name = "python-devkit", specifier = "==0.1.15" }]
42
42
 
43
43
  [[package]]
44
44
  name = "ci-devkit"
@@ -180,7 +180,7 @@ wheels = [
180
180
 
181
181
  [[package]]
182
182
  name = "python-devkit"
183
- version = "0.1.14"
183
+ version = "0.1.15"
184
184
  source = { registry = "https://pypi.org/simple" }
185
185
  dependencies = [
186
186
  { name = "bashrun" },
@@ -188,9 +188,9 @@ dependencies = [
188
188
  { name = "pydantic" },
189
189
  { name = "typer" },
190
190
  ]
191
- sdist = { url = "https://files.pythonhosted.org/packages/0a/3c/4b64ad57a191fc8f6c1cf7d45619a0cc27e05bc68a1d019f67e61a68a0be/python_devkit-0.1.14.tar.gz", hash = "sha256:0e2d4f4acee43ffb13eb52b03b4f25378d28869864f7e6f4825c936f441dff2f", size = 34183, upload-time = "2026-09-28T23:51:28.654Z" }
191
+ sdist = { url = "https://files.pythonhosted.org/packages/82/53/c3b37f69c35475b09cdf1c18deb193238d7ab5143ee6bc97e5c22c48fe87/python_devkit-0.1.15.tar.gz", hash = "sha256:ac1ef0f2a4622e9c97763f4e353005c41164e2d6d4b130cdb709e811947f253d", size = 34651, upload-time = "2026-09-30T04:12:18.88Z" }
192
192
  wheels = [
193
- { url = "https://files.pythonhosted.org/packages/27/7c/c0a7820892b8ba0c889b3ba20f1271f6fb2883b1fd3f846bd49607ad475d/python_devkit-0.1.14-py3-none-any.whl", hash = "sha256:309c7ed1cb6ca8ba831d961cc8725f177c71af2b57083da0a169398535b4dfb8", size = 14261, upload-time = "2026-09-28T23:51:27.769Z" },
193
+ { url = "https://files.pythonhosted.org/packages/b6/81/da4f76cbfccb5a4d5a58a9f51d3e2b7d40f6dc9edd931d7891b2789adeae/python_devkit-0.1.15-py3-none-any.whl", hash = "sha256:0c13684cc780e3ba9b3e25feed61065b355e8fc7436bee043e7c6adf71fa40e7", size = 14537, upload-time = "2026-09-30T04:12:17.918Z" },
194
194
  ]
195
195
 
196
196
  [[package]]
@@ -1,99 +0,0 @@
1
- name: CI/CD
2
-
3
- on:
4
- workflow_dispatch:
5
- push:
6
- branches: [main, dev]
7
- pull_request:
8
- branches: [dev]
9
-
10
- # Cancel superseded runs on the same branch, except main — where publish-stable
11
- # must never die mid-release (overlapping release merges queue instead).
12
- concurrency:
13
- group: ci-${{ github.ref }}
14
- cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
15
-
16
- permissions:
17
- contents: read
18
-
19
- env:
20
- RELEASE_DEVKIT_VERSION: 0.1.25
21
-
22
- jobs:
23
- check:
24
- if: github.ref != 'refs/heads/main'
25
- runs-on: ubuntu-latest
26
- steps:
27
- - uses: actions/checkout@v5
28
- with:
29
- fetch-depth: 0
30
- fetch-tags: true
31
- persist-credentials: false
32
- - uses: astral-sh/setup-uv@v7
33
- with:
34
- enable-cache: true
35
- - run: uv lock --check --project tools/devkit
36
- - run: uv run --project tools/devkit preflight-python
37
- - shell: bash
38
- run: uvx --from release-devkit==${{ env.RELEASE_DEVKIT_VERSION }} publish-stable --dry-run
39
-
40
- ensure-release-pr:
41
- if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
42
- runs-on: ubuntu-latest
43
- permissions:
44
- contents: write
45
- pull-requests: write
46
- env:
47
- GH_TOKEN: ${{ github.token }}
48
- steps:
49
- - uses: actions/checkout@v5
50
- with:
51
- fetch-depth: 0
52
- fetch-tags: true
53
- persist-credentials: false
54
- - uses: astral-sh/setup-uv@v7
55
- - shell: bash
56
- run: uvx --from release-devkit==${{ env.RELEASE_DEVKIT_VERSION }} ensure-release-pr
57
-
58
- publish-stable:
59
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
60
- runs-on: ubuntu-latest
61
- environment: release
62
- permissions:
63
- contents: write
64
- id-token: write
65
- env:
66
- GH_TOKEN: ${{ github.token }}
67
- steps:
68
- - uses: actions/checkout@v5
69
- with:
70
- ref: main
71
- fetch-depth: 0
72
- fetch-tags: true
73
- - uses: astral-sh/setup-uv@v7
74
- - shell: bash
75
- run: uvx --from release-devkit==${{ env.RELEASE_DEVKIT_VERSION }} publish-stable
76
- env:
77
- NPM_CONFIG_LOGLEVEL: verbose
78
-
79
- publish-dev:
80
- if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
81
- needs: [check]
82
- runs-on: ubuntu-latest
83
- environment: release
84
- permissions:
85
- contents: read
86
- id-token: write
87
- env:
88
- GH_TOKEN: ${{ github.token }}
89
- steps:
90
- - uses: actions/checkout@v5
91
- with:
92
- fetch-depth: 0
93
- fetch-tags: true
94
- persist-credentials: false
95
- - uses: astral-sh/setup-uv@v7
96
- - shell: bash
97
- run: uvx --from release-devkit==${{ env.RELEASE_DEVKIT_VERSION }} publish-dev
98
- env:
99
- NPM_CONFIG_LOGLEVEL: verbose
bashrun-0.1.12/README.md DELETED
@@ -1,45 +0,0 @@
1
- # bashrun
2
-
3
- Guardrailed shell-exec helpers for Python. A thin, zero-dependency layer over `subprocess` that closes the sharp edges: quoted arguments are parsed with `shlex`, shell operators like `|`, `||`, `&&`, `;`, `&`, `<`, `>`, and backtick command substitution are rejected in single-command helpers (a separate `bash_pipe()` handles real pipelines), `KeyboardInterrupt` waits for the child to exit cleanly instead of leaving it orphaned, and failure paths raise `CalledProcessError` with `stdout` and `stderr` attached rather than a bare non-zero return code. On Windows, executables are resolved against `PATH` up front so a missing binary fails with a clear `FileNotFoundError`, not `WinError 2`.
4
-
5
- The helpers form one small vocabulary — `bash`, `bash_output`, `bash_check`, `bash_check_stream`, `bash_no_raise`, `bash_pipe`, `bash_handoff` — each covering a specific failure-and-output shape, with `CalledProcessError` re-exported for consumers that need to catch the failure type. See the module docstring conventions in [`AGENTS.md`](./AGENTS.md) for which helper to reach for.
6
-
7
- ## Setup
8
-
9
- Requires Python 3.13+ and [uv](https://docs.astral.sh/uv/).
10
-
11
- ```bash
12
- uv sync
13
- ```
14
-
15
- ## Usage
16
-
17
- ```python
18
- from bashrun import bash, bash_check, bash_output
19
-
20
- bash("docker compose up -d") # streams to stdout/stderr; raises on failure
21
- text = bash_output("git rev-parse HEAD") # captures stdout; raises on failure
22
- if bash_check("test -f .env"): # silent boolean; never raises
23
- ...
24
- bash("make", env={"CC": "clang"}) # env overlays the inherited environment for this child only
25
- ```
26
-
27
- ## Consuming from another repo
28
-
29
- Install from PyPI:
30
-
31
- ```toml
32
- [project]
33
- dependencies = ["bashrun>=0.1.0"]
34
- ```
35
-
36
- To test an unreleased change, pin the repo at a git ref in a scratch branch instead (`bashrun = { git = "https://github.com/outernet-foundation/bashrun.git", rev = "<sha>" }` under `[tool.uv.sources]`) and drop the pin when the release lands.
37
-
38
- ## Development
39
-
40
- ```bash
41
- uv run ruff check .
42
- uv run ruff format --check .
43
- uv run basedpyright
44
- uv run pytest
45
- ```
File without changes