Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- uses: astral-sh/setup-uv@v5

# retina-custody is a sibling library on no package index, so pip cannot
# resolve the `retina-custody>=0.1.0` dependency on its own. The pin stays
# generic in pyproject.toml on purpose: Tower-Finder installs these libs
# from local submodule paths, and a direct URL there would collide with
# "conflicting URLs for package retina-custody".
- run: uv pip install --system "retina-custody @ git+https://github.com/offworldlabs/retina-custody@v0.1.0"

# Pinned deliberately: an unpinned linter picks up new rules on release
# and turns a green branch red without anything in this repo changing.
- run: uv pip install --system -e '.[dev]' pre-commit==4.6.2 vulture==2.14

- run: pre-commit run --all-files --show-diff-on-failure

- run: pytest
26 changes: 0 additions & 26 deletions .github/workflows/lint.yml

This file was deleted.

16 changes: 10 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# The dead-code gate lives in offworldlabs/ops and is pinned here. Do not
# vendor it back into this repo. See 86cb417ty.
#
# ruff is deliberately still a separate CI step rather than a hook; aligning
# this repo with claude-shared's ci-python.yml is a separate piece of work.
# ruff and the dead-code gate both run through pre-commit, so `pre-commit run
# --all-files` locally reproduces CI exactly. See 86cb43xya.
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.16.2
hooks:
- id: ruff
- id: ruff-format

- repo: https://github.com/offworldlabs/ops
rev: dead-code-v1.0
rev: hooks-v1.0
hooks:
- id: dead-code
- id: ruff-config
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ retina_simulation = ["*.json", "data/*.geojson"]
[tool.pytest.ini_options]
testpaths = ["tests"]

# Shared ruff standard for offworldlabs Python repos.
# Keep in sync across repos; see offworldlabs/ops for the canonical copy.
# Shared ruff standard for offworldlabs Python repos. The keys below are checked
# against offworldlabs/ops:ruff-shared.toml by the `ruff-config` pre-commit hook
# — edit them there, not here. target-version is deliberately per-repo and
# tracks this package's requires-python.
[tool.ruff]
line-length = 120
target-version = "py310"
Expand Down
464 changes: 245 additions & 219 deletions retina_simulation/generator.py

Large diffs are not rendered by default.

Loading
Loading