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
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: ci

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

jobs:
lint-and-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Sync deps (project + dev group)
run: uv sync --python ${{ matrix.python-version }}

- name: Ruff
run: uv run --python ${{ matrix.python-version }} ruff check .

- name: Pytest
run: uv run --python ${{ matrix.python-version }} pytest -q

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

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true

- name: Build wheel + sdist
run: |
uv sync
uv run python -m build
uv run twine check --strict dist/*

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
89 changes: 89 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: release

on:
push:
tags: ["v*.*.*", "v*.*.*a*", "v*.*.*b*", "v*.*.*rc*"]
workflow_dispatch:
inputs:
target:
description: "Where to publish"
required: true
default: "testpypi"
type: choice
options:
- testpypi
- pypi

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true

- name: Build wheel + sdist
run: |
uv sync
uv run python -m build
uv run twine check --strict dist/*

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

publish-testpypi:
# TestPyPI publish:
# * any pre-release tag (vX.Y.ZaN / bN / rcN), or
# * manual dispatch with target=testpypi.
# Stable tags skip TestPyPI and go straight to PyPI.
runs-on: ubuntu-latest
needs: build
if: |
(startsWith(github.ref, 'refs/tags/v') &&
(contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'rc')))
|| (github.event_name == 'workflow_dispatch' && inputs.target == 'testpypi')
environment:
name: testpypi
url: https://test.pypi.org/p/spiderwire
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/

- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

publish-pypi:
# Real PyPI publish:
# * stable tag (vX.Y.Z, no a/b/rc), or
# * manual dispatch with target=pypi.
runs-on: ubuntu-latest
needs: build
if: |
(startsWith(github.ref, 'refs/tags/v') &&
!contains(github.ref_name, 'a') && !contains(github.ref_name, 'b') && !contains(github.ref_name, 'rc'))
|| (github.event_name == 'workflow_dispatch' && inputs.target == 'pypi')
environment:
name: pypi
url: https://pypi.org/p/spiderwire
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Byte-compiled / cache
__pycache__/
*.py[cod]
*$py.class

# Distribution / packaging
build/
dist/
*.egg-info/
*.egg
wheels/

# Virtual envs
.venv/
venv/
env/

# Tooling caches
.ruff_cache/
.pytest_cache/
.mypy_cache/
.tox/
.coverage
htmlcov/

# uv
uv.lock.local

# Local secrets / env
.env
.env.local

# IDE / OS
.idea/
.vscode/
.DS_Store
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.1.0] - 2026-05-09

Initial release.

### Added

- `spiderwire` library: Modbus RTU protocol (`protocol`), RS-485 transport
(`transport`), per-device register map and decoders (`registers`), and
tiered bus master with setpoint heartbeat (`bus`).
- `gss-ctrl` CLI: `scan`, `poll`, `read`, `write`, `fan`, `blower`,
`light` commands. Acts as a stand-in master for the OEM SpiderFarmer
GSS hub on a USB-RS485 adapter.
- Reference docs: `docs/protocol-analysis.md`, `docs/device-map.md`,
`docs/hw-notes.md`.

[Unreleased]: https://github.com/1am/spiderwire/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/1am/spiderwire/releases/tag/v0.1.0
Loading
Loading