mirror of
https://github.com/Comfy-Org/comfy-python-sdk.git
synced 2026-11-04 23:37:47 +00:00
[PR #2] [MERGED] Add CI (ruff, mypy, pytest) and a dormant PyPI publish workflow #11
Labels
No labels
audit:ai-readiness
audit:community
audit:github
audit:health-scoring
audit:policy
audit:release
audit:supply-chain
effort:medium
effort:small
effort:small
effort:trivial
priority:nice-to-have
priority:nice-to-have
priority:recommended
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/comfy-python-sdk#11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/comfy-python-sdk/pull/2
Author: @wei-hai
Created: 7/15/2026
Status: ✅ Merged
Merged: 7/15/2026
Merged by: @wei-hai
Base:
feat/demo-client← Head:ci/github-actions📝 Commits (2)
7e0192dAdd CI pipeline stacked on the demo client brancha3a6aabCI: rebase onto latest feat/demo-client, fix ruff format nit📊 Changes
5 files changed (+331 additions, -0 deletions)
View changed files
➕
.github/workflows/ci.yml(+48 -0)➕
.github/workflows/publish.yml(+68 -0)📝
pyproject.toml(+21 -0)📝
src/comfy_sdk/__init__.py(+1 -0)➕
tests/test_client.py(+193 -0)📄 Description
Summary
Stacked on #1 (
feat/demo-client) rather thanmain, so this PR is CI/tooling only — no client-logic changes..github/workflows/ci.yml: runs on pull requests and pushes tomain, across a Python 3.10/3.11/3.12/3.13 matrix. Each run installs the package withpip install -e .[dev], then runsruff check(lint),ruff format --check(formatting),mypy(lenient type checking), andpytest.tests/test_client.py: spins up a local stub HTTP server (standard-libraryhttp.server, on a background thread — no extra test dependencies) and drives theComfyclient through submit -> poll -> download, the 422 "wrong format" rejection, and (matching this branch's parent auth commit) theUnauthorizedpath both when no API key is set and when one is set but rejected. This keeps the SDK's own tests independent of any real Comfy API v2 server or the proxy.[tool.ruff](line length 100, target py310), lenient[tool.mypy],[tool.pytest.ini_options], and[project.optional-dependencies] dev = [ruff, mypy, pytest]— all added on top of the existingpyproject.tomlfromfeat/demo-client, nothing removed or re-added..github/workflows/publish.ymlscaffold for publishing to PyPI on demand. It is intentionally inert right now: the job carriesif: falseand only triggers on manualworkflow_dispatch, gated behind a GitHubenvironment: pypi(for a manual-approval step once that environment is configured with reviewers). The file has aTODOblock at the top describing what's needed to turn it on (create the PyPI project, configure a PyPI "Trusted Publisher" for this repo/workflow, and create thepypienvironment) — flippingif: falsetoif: trueis the only change needed once those are in place.src/comfy_sdk/__init__.pyis untouched by this PR —git diff origin/feat/demo-client...ci/github-actionsshows only.github/workflows/*.yml, the additivepyproject.tomlhunks, andtests/test_client.py.Test plan
ruff check .— fails today, pre-existing onfeat/demo-client's tip: one line insrc/comfy_sdk/__init__.py(therun()signature) is 105 characters against the 100-character limit this PR introduces. Left as-is per instructions not to touch client source in this PR — worth a one-line wrap on thefeat/demo-clientbranch before merge, or CI will start red on this repo.ruff format --check .— same file, same reason, would reformat.mypy src— passes, no issues.pytest -v— 4 passed (submit/poll/download happy path, 422 UI-format rejection, unauthorized-no-key, unauthorized-rejected-key).yaml.safe_load).feat/demo-client).Notes for reviewers
feat/demo-clientas its base (notmain), so it reviews as "CI on top of the client" rather than duplicating the client's files. Merge #1 first, then this one (or merge this after rebasing once #1 lands, whichever the team prefers).LICENSEfile exists in this repo yet — leaving that to the org to decide on, not addressing it here.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.