Initial release: E1 genus probe package moved out of the E01 workflow

- src/custom_models torch modules, store, training, metrics, runner and CLI
  (package-relative imports for pip installability)
- test suite (49 tests) + conftest with fast synthetic-store fixtures
- uv-managed dev env (pyproject + CPU torch index), hatchling build
- README: uv for the package, pip install into conda envs for the workflow
This commit is contained in:
Tom Kasper
2026-09-22 13:22:50 +01:00
commit 88e98effad
18 changed files with 5988 additions and 0 deletions
+61
View File
@@ -0,0 +1,61 @@
[build-system]
requires = ["hatchling>=1.25"]
build-backend = "hatchling.build"
[project]
name = "custom-models"
version = "0.1.0"
description = "E1 genus probe: torch models and train/validate/test wrapper"
readme = "README.md"
requires-python = ">=3.11"
license = { text = "MIT" }
authors = [{ name = "Tom Kasper" }]
dependencies = [
"numpy>=2.0,<3",
"polars>=1.0",
"torch>=2.6",
]
[project.optional-dependencies]
pod5 = ["pod5"]
dev = ["pytest>=8", "ruff>=0.8", "pod5"]
[project.scripts]
custom-models = "custom_models.cli:main"
[tool.hatch.build.targets.wheel]
packages = ["src/custom_models"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-q"
[tool.ruff]
line-length = 100
src = ["src", "tests"]
[tool.ruff.lint]
select = ["E", "F", "W", "D", "B", "RUF", "TRY", "I"]
ignore = [
"TRY003", # long messages are the run-artifact contract here
"TRY004", # ValueError (not TypeError) on config/type misuse: deliberate
"TRY300",
"B905", # explicit strict in zip() is noisy for internal iteration
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D103", "D401"]
# UV: dev/build environment resolves torch from the CPU wheel index so the
# venv stays small. pip installs into the workflow's conda envs ignore this
# (torch comes from conda there and satisfies the requirement).
[tool.uv]
index-strategy = "unsafe-best-match"
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[tool.uv.sources]
torch = { index = "pytorch-cpu" }