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
14 changes: 14 additions & 0 deletions .github/workflows/test-python-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,17 @@ jobs:
run: pip install -e ".[dev]"
- name: Test
run: pytest tests/ -v --tb=short

lint:
# `ruff` was a declared dev dependency that CI never invoked, so it enforced
# nothing. Run it on one version (lint results don't vary across the matrix).
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install
run: pip install -e ".[dev]"
- name: Lint (ruff)
run: ruff check .
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@ Release tags use the `python-vX.Y.Z` prefix.

## [Unreleased]

### Fixed
- **`ruff` was a declared dev dependency that CI never ran, so it enforced
nothing — it's now pinned `<0.16` and actually invoked.** ruff 0.16 moved a
large set of opinionated rules into its **default** set; unpinned, `ruff check .`
reported 76 findings here, of which 73 were annotation-style suggestions
(`UP045`/`UP037`/`UP006`) that the rest of the suite doesn't enforce either. With
the cap, 3 real findings remained, all in `examples/` and all fixed:
- `marimo_example.py` computed a `state_color` for the instance state and then
never used it — the status table rendered the state uncolored. Now applied, as
originally intended.
- `script_example.py` had an f-string with no placeholders.
- `jupyter_example.ipynb` tripped `E402` (import not at top of cell), which is
inherent to notebooks — every cell is its own top level — so it's excluded per
file rather than worked around in the example.
A `lint` job now runs `ruff check .` on 3.12 (lint results don't vary across the
test matrix), so the pin protects a check that actually executes. Matches the cap
on the four workflow adapters.
No change to the shipped `spore` package — examples, tooling and CI only.

## [0.1.5] - 2026-07-10

### Added
Expand Down
2 changes: 1 addition & 1 deletion examples/marimo_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def _(inst_input, mo):
| Field | Value |
|-------|-------|
| Type | {inst.instance_type} |
| State | **{inst.state}** |
| State | <span style="color:{state_color}">**{inst.state}**</span> |
| Region | {inst.region} |
| IP | {inst.public_ip or "—"} |
| TTL | {inst.ttl or "—"} |
Expand Down
2 changes: 1 addition & 1 deletion examples/script_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def extend_if_needed(name: str, min_ttl_hours: float = 1.0):
# For demo: just show how to extend
if inst.state == "running":
inst.extend("2h")
print(f" → Extended TTL by 2h")
print(" → Extended TTL by 2h")


if __name__ == "__main__":
Expand Down
17 changes: 16 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ dependencies = [

[project.optional-dependencies]
jupyter = ["ipywidgets>=8.0", "IPython>=8.0"]
dev = ["pytest>=7", "pytest-asyncio", "black", "ruff"]
# ruff is capped below 0.16: that release moved a large set of opinionated rules
# (UP045, UP037, UP006, BLE, TRY, C408, B017, …) into the DEFAULT rule set, so an
# unpinned `ruff check .` changes what it enforces whenever ruff publishes — here
# it took the count from 3 real findings to 76, the rest being annotation-style
# suggestions. Same cap as the workflow adapters (airflow-spawn, cwl-spawn,
# miniwdl-spawn, snakemake-executor-plugin-spawn). Raising it is a deliberate
# change: pick the rules to adopt via an explicit `[tool.ruff.lint] select`.
dev = ["pytest>=7", "pytest-asyncio", "black", "ruff>=0.5,<0.16"]

[project.urls]
Homepage = "https://spore.host"
Expand All @@ -42,3 +49,11 @@ Issues = "https://github.com/spore-host/spore-host/issues"

[tool.hatch.build.targets.wheel]
packages = ["spore"]

[tool.ruff]
line-length = 100

[tool.ruff.lint.per-file-ignores]
# Notebook cells legitimately import mid-document (each cell is its own top
# level), so E402 "import not at top of cell" is noise for an example notebook.
"examples/*.ipynb" = ["E402"]
Loading