Skip to content

Commit 3f9a211

Browse files
physicsrobclaude
andcommitted
Packaging: hatchling build backend, PyPI metadata, py.typed
First step of the publication plan. Explicit [build-system] (hatchling) replaces the legacy setuptools fallback; wheel/sdist ship only the torchwright package (report templates included, tests/scripts/modal launchers excluded). Adds readme, authors, keywords, classifiers, and project URLs for PyPI, plus the py.typed marker so downstream type checkers use our annotations. uv.lock: torchwright flips from virtual to editable now that a build backend exists. Verified: wheel built with uv build, installed into a clean venv, and the README binary_increment flow (compile_hf_bundle -> transformers pipeline) produced the correct output. Test Suite Status: Unknown Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 01e1d47 commit 3f9a211

3 files changed

Lines changed: 43 additions & 1 deletion

File tree

pyproject.toml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,37 @@
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
15
[project]
26
name = "torchwright"
37
version = "0.1.0"
48
description = "A compiler that transforms computation graphs into transformer neural network weights"
9+
readme = "README.md"
510
license = "Apache-2.0"
11+
license-files = ["LICENSE"]
12+
authors = [
13+
{ name = "Rob Porter", email = "physicsrob@gmail.com" },
14+
]
15+
keywords = [
16+
"transformer",
17+
"compiler",
18+
"weights",
19+
"interpretability",
20+
"onnx",
21+
"huggingface",
22+
]
23+
classifiers = [
24+
"Development Status :: 3 - Alpha",
25+
"Intended Audience :: Developers",
26+
"Intended Audience :: Science/Research",
27+
"Programming Language :: Python :: 3",
28+
"Programming Language :: Python :: 3.10",
29+
"Programming Language :: Python :: 3.11",
30+
"Programming Language :: Python :: 3.12",
31+
"Programming Language :: Python :: 3.13",
32+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
33+
"Typing :: Typed",
34+
]
635
requires-python = ">=3.10"
736
dependencies = [
837
"torch",
@@ -11,6 +40,11 @@ dependencies = [
1140
"pydantic>=2.0",
1241
]
1342

43+
[project.urls]
44+
Homepage = "https://github.com/physicsrob/torchwright"
45+
Repository = "https://github.com/physicsrob/torchwright"
46+
Changelog = "https://github.com/physicsrob/torchwright/blob/main/RELEASE_NOTES.md"
47+
1448
[project.optional-dependencies]
1549
# Pinned: the CUDA-graph capture path (torchwright_doom render runtime)
1650
# depends on 1.26.0 mechanics — per-annotation-id run counters,
@@ -59,6 +93,14 @@ test-onnx = [
5993
"onnxruntime; python_version < '3.11'",
6094
]
6195

96+
# Only the library ships: tests/, scripts/, examples/, docs/, and the
97+
# modal_*.py launchers are repo infrastructure, not distribution content.
98+
[tool.hatch.build.targets.wheel]
99+
packages = ["torchwright"]
100+
101+
[tool.hatch.build.targets.sdist]
102+
include = ["torchwright"]
103+
62104
[[tool.uv.index]]
63105
name = "pytorch-cu128"
64106
url = "https://download.pytorch.org/whl/cu128"

torchwright/py.typed

Whitespace-only changes.

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)