Skip to content

Commit 012950c

Browse files
art-dsitclaude
andcommitted
Prepare first real PyPI release (0.1.1)
Replaces the 0.0.1 placeholder on PyPI. Mirrors the inspect_k8s_sandbox manual release flow: uv build / uv publish, vX.Y.Z tag, dated changelog heading, process documented in CONTRIBUTING.md. - pyproject: license, project URLs, explicit sdist allowlist (keeps infra/, tests/ and uv.lock out of the sdist), drop the now-unneeded allow-direct-references - README: install from PyPI; absolute links so the PyPI page renders Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 0f764d1 commit 012950c

5 files changed

Lines changed: 35 additions & 11 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ __pycache__/
77
.vscode/
88
.ruff_cache
99
cdk.out
10+
dist/

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## Unreleased
3+
## 2026-08-20 0.1.1
44

55
- EC2 sandbox logs now appear in the `.eval` transcript at the default log level.
66
- `AWS_REGION` ignored for boto compatibility; use `AWS_DEFAULT_REGION` or `INSPECT_EC2_SANDBOX_REGION`

CONTRIBUTING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,19 @@ manually:
6868
```bash
6969
mypy
7070
```
71+
72+
## Releasing
73+
74+
Releases are published manually using uv's standard
75+
[build](https://docs.astral.sh/uv/guides/package/#building-your-package) and
76+
[publish](https://docs.astral.sh/uv/guides/package/#publishing-your-package) flow —
77+
this guide does not duplicate those steps.
78+
79+
The repo-specific parts are:
80+
81+
- Bump `version` in `pyproject.toml` and run `uv lock` to update `uv.lock`.
82+
- Replace the `## Unreleased` heading in `CHANGELOG.md` with `## <YYYY-MM-DD> <version>`
83+
(see existing entries for the format).
84+
- After merging, tag the release commit `vX.Y.Z` and push the tag.
85+
- Before publishing, check the sdist and wheel contents (`tar -tzf` / `unzip -l` on
86+
`dist/*`) — in particular that `infra/` hasn't crept into the sdist.

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ as sandboxes, running within AWS EC2.
1010
Add this using [uv](https://github.com/astral-sh/uv)
1111

1212
```
13-
uv add git+ssh://git@github.com/UKGovernmentBEIS/inspect_ec2_sandbox.git
14-
```
15-
or in [Poetry](https://python-poetry.org/),
13+
uv add inspect-ec2-sandbox
14+
```
15+
or with pip,
1616

1717
```
18-
poetry add git+ssh://git@github.com/UKGovernmentBEIS/inspect_ec2_sandbox.git
18+
pip install inspect-ec2-sandbox
1919
```
2020

2121

2222
## AWS Infrastructure
2323

24-
This plugin depends on certain infrastructure existing already. See the [infra docs](infra/README.md) for a
24+
This plugin depends on certain infrastructure existing already. See the [infra docs](https://github.com/UKGovernmentBEIS/inspect_ec2_sandbox/blob/main/infra/README.md) for a
2525
reference CDK stack which you can use to create it. If you use the reference stack, you can skip reading
2626
the rest of this section.
2727

@@ -132,7 +132,7 @@ sandbox = SandboxEnvironmentSpec(
132132
)
133133
```
134134

135-
See [schema.py](src/ec2sandbox/schema.py) for details.
135+
See [schema.py](https://github.com/UKGovernmentBEIS/inspect_ec2_sandbox/blob/main/src/ec2sandbox/schema.py) for details.
136136

137137
## Compatibility with existing Inspect evals
138138

@@ -143,7 +143,7 @@ It is not a drop-in replacement; passing `--sandbox ec2` is unlikely to work for
143143

144144
## Sample evaluation
145145

146-
You can look at an existing [sample eval](src/ec2sandbox/examples/where_am_i.py) for how to get started.
146+
You can look at an existing [sample eval](https://github.com/UKGovernmentBEIS/inspect_ec2_sandbox/blob/main/src/ec2sandbox/examples/where_am_i.py) for how to get started.
147147

148148
A more complex eval is [Sandbox Escape Bench](https://github.com/UKGovernmentBEIS/sandbox_escape_bench), where this EC2 sandbox is used as an outer sandbox and the agent is tasked with escaping an inner sandbox, generally Docker or Kubernetes.
149149

@@ -163,4 +163,4 @@ For the EC2 sandbox specifically, beware that the IAM role used by the sandbox E
163163

164164
## Developing
165165

166-
See [CONTRIBUTING.md](CONTRIBUTING.md)
166+
See [CONTRIBUTING.md](https://github.com/UKGovernmentBEIS/inspect_ec2_sandbox/blob/main/CONTRIBUTING.md)

pyproject.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "inspect-ec2-sandbox"
33
version = "0.1.1"
44
description = "An EC2 Sandbox Environment for Inspect"
55
readme = "README.md"
6+
license = "MIT"
67
authors = [
78
{name = "UK AI Security Institute"}
89
]
@@ -20,6 +21,10 @@ dependencies = [
2021
"pydantic-settings>=2.14.2",
2122
]
2223

24+
[project.urls]
25+
Repository = "https://github.com/UKGovernmentBEIS/inspect_ec2_sandbox"
26+
Changelog = "https://github.com/UKGovernmentBEIS/inspect_ec2_sandbox/blob/main/CHANGELOG.md"
27+
2328
[project.entry-points."inspect_ai"]
2429
"ec2-sandbox" = "ec2sandbox._ec2_sandbox_environment"
2530

@@ -41,8 +46,10 @@ build-backend = "hatchling.build"
4146
[tool.hatch.build.targets.wheel]
4247
packages = ["src/ec2sandbox"]
4348

44-
[tool.hatch.metadata]
45-
allow-direct-references = true
49+
# Keep infra/ (contains environment-specific CDK context), tests/ and uv.lock
50+
# out of the published sdist
51+
[tool.hatch.build.targets.sdist]
52+
only-include = ["src", "README.md", "CHANGELOG.md", "LICENSE"]
4653

4754
[tool.ruff]
4855
target-version = "py310"

0 commit comments

Comments
 (0)