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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
run: uv run ruff format --check

- name: Unit tests
run: uv run pytest tests/test_http_client.py src/phx_channel/tests/test_unit.py
run: uv run pytest tests/test_http_client.py src/archastro/phx_channel/tests/test_unit.py

- name: Harness-client integration tests
run: uv run pytest tests/harness
Expand Down
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,24 @@ teams = client.v1.teams.list()

## Packages

- **`archastro`** — typed REST + channel SDK generated from the canonical
OpenAPI spec at [`ArchAstro/archastro-openapi`](https://github.com/ArchAstro/archastro-openapi).
All public code lives under the single top-level `archastro` package:

- **`archastro.platform`** — typed REST + channel SDK generated from
the canonical OpenAPI spec at
[`ArchAstro/archastro-openapi`](https://github.com/ArchAstro/archastro-openapi).
Pydantic models, async channel classes, auth helpers.
- **`phx_channel`** — the hand-written Phoenix Channels client the
generated channel classes run on top of. WebSocket transport, join /
reply / push / leave, heartbeat, reconnect, and a `HarnessServiceClient`
for driving the
- **`archastro.phx_channel`** — the hand-written Phoenix Channels
client the generated channel classes run on top of. WebSocket
transport, join / reply / push / leave, heartbeat, reconnect, and a
`HarnessServiceClient` for driving the
[`@archastro/channel-harness`](https://www.npmjs.com/package/@archastro/channel-harness)
service from Python tests.

## Development

This repo contains:

- Python SDK (`src/archastro/`, `src/phx_channel/`) installed via `uv`
- Python SDK (`src/archastro/`) installed via `uv`
- JS tooling (`package.json`) — the channel-harness subprocess that
powers the channel contract tests, plus the Prism mock server that
backs the REST contract tests. Installed via `npm ci`.
Expand All @@ -45,7 +48,7 @@ uv sync # Python deps + dev deps (pytest, ruff)

```bash
# Unit tests only (no external services needed)
uv run pytest tests/test_http_client.py tests/test_synthetic.py src/phx_channel/tests/unit.test.py
uv run pytest tests/test_http_client.py src/archastro/phx_channel/tests/test_unit.py

# REST contract tests (spawns Prism mock server)
uv run pytest tests/contract
Expand Down
29 changes: 28 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,45 @@ version = "0.1.0"
description = "Python SDK for the ArchAstro Platform API"
readme = "README.md"
requires-python = ">=3.11"
license = { file = "LICENSE" }
authors = [{ name = "ArchAstro", email = "support@archastro.ai" }]
keywords = ["archastro", "sdk", "api", "phoenix-channels"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
dependencies = [
"httpx>=0.27",
"pydantic>=2.0",
"websockets>=13.0",
]

[project.optional-dependencies]
dev = [
"pytest>=8.0",
"pytest-asyncio>=0.24",
"ruff>=0.11",
]

[project.urls]
Homepage = "https://github.com/ArchAstro/archastro-python"
Repository = "https://github.com/ArchAstro/archastro-python"
Issues = "https://github.com/ArchAstro/archastro-python/issues"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["src/archastro", "src/phx_channel"]
packages = ["src/archastro"]
exclude = ["**/tests/**"]

[dependency-groups]
dev = [
Expand Down
Loading
Loading