feat: prep archastro-sdk for PyPI — namespace phx_channel + enrich metadata - #6
Merged
calvin-archastro merged 1 commit intoApr 24, 2026
Conversation
…tadata
Single top-level package on PyPI: everything installs under `archastro`.
The hand-written Phoenix Channels client moves from `src/phx_channel/`
to `src/archastro/phx_channel/` so the distribution doesn't squat a
generic top-level name. All imports updated:
from phx_channel import ... → from archastro.phx_channel import ...
from phx_channel.socket import ... → from archastro.phx_channel.socket import ...
Channel files + contract tests regenerated from @archastro/sdk-generator
0.1.4, which emits the new namespace natively. Spec also pulled to
current ArchAstro/archastro-openapi@main (adds activity_feed + invites
resources; collapses chat/members/orgs/reactions/schedules/system types).
pyproject.toml enriched for PyPI:
- authors, license = { file = "LICENSE" }, classifiers, project.urls
- [project.optional-dependencies].dev mirrors [dependency-groups].dev
so `pip install -e ".[dev]"` works without uv
- [tool.hatch.build.targets.wheel] excludes **/tests/** so unit tests
don't ship to PyPI
- wheel packages: ["src/archastro"] only (phx_channel now nested)
Logger names upgraded to `archastro.phx_channel`. CI workflow path
and README updated to match the new layout.
Test coverage: 45 unit + 6 harness + 670 REST contract + 51 channel
contract = 772 passing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/phx_channel/→src/archastro/phx_channel/so the distribution publishes a single top-levelarchastropackage on PyPI (no squatting a genericphx_channelmodule).pyproject.tomlfor PyPI: authors, license, classifiers, urls, optional-depsdev, wheel excludes tests.@archastro/sdk-generator@0.1.4, which emits the new namespace natively. Also picks up the latestArchAstro/archastro-openapi@mainspec.Import changes (public API)
Logger name also renamed:
"phx_channel"→"archastro.phx_channel".pyproject.toml
license = { file = "LICENSE" }(MIT, added separately to main asfbe4aab)authors,keywords, troveclassifiers,[project.urls][project.optional-dependencies].devsopip install -e ".[dev]"works without uv[tool.hatch.build.targets.wheel].packages = ["src/archastro"]+exclude = ["**/tests/**"]— tests don't ship to PyPI anymoreSpec drift
The regen also pulled in the current platform spec from
main. Besides the namespace rename, you'll see:activity_feed+invitesresources and their contract teststypes/{chat,members,orgs,reactions,schedules,system}.py(collapsed/renamed upstream)I considered splitting these but they're genuinely coupled — the regen script is the mechanism that brings both the namespace change and the spec into the repo.
Test plan
uv run pytest tests/test_http_client.py src/archastro/phx_channel/tests/test_unit.py— 45/45uv run pytest tests/harness— 6/6uv run pytest tests/contract(REST) — 670/670ARCHASTRO_RUN_CHANNEL_CONTRACT_TESTS=1 uv run pytest tests/contract/channels— 51/51uv run ruff check && uv run ruff format --check— cleanuv build— producesarchastro_sdk-0.1.0-py3-none-any.whlwitharchastro/+archastro/phx_channel/, LICENSE indist-info/licenses/, no test filesFollow-ups (not in this PR)
0.1.0to prod.🤖 Generated with Claude Code