c49fa88b80
* refactor(skills): shipped-set slim — 15 skills to optional, github six-way merge, pdf absorbs OCR+nano-pdf, channel-gated teams pipeline
Maintainer-directed shipped-skills curation (skills index 1,900 -> ~1,400
tok/call on desktop; every session pays the index, so this is a per-call
diet on all installs):
- optional-skills moves (installable via skills hub, history preserved):
creative comfyui/ascii-art/excalidraw/pretext/sketch/touchdesigner-mcp;
ALL of mlops (huggingface-hub, llama-cpp, serving-llms-vllm,
weights-and-biases, evaluating-llms-harness — subcategory structure
kept); research-paper-writing (55 supporting files, 17.3K-tok load);
openhue; blogwatcher (first taught the cronjob monitor-field watch
pattern + web_extract instead of pre-cron manual workflows)
- DELETED session-librarian (Aug-12 'inspired by Perplexity Computer'
port, never maintainer-intended; session_search covers discovery)
- github: six skills (auth, issues, pr-workflow, issue-to-pr,
code-review, repo-management) merged into ONE software-development/
github skill — routing body + complete per-workflow references;
benbarclay authorship credited; codebase-inspection rides along;
discipline pins from test_github_issue_to_pr_skill.py preserved
against the reference body in the new test_github_skill.py
- pdf absorbs ocr-and-documents + nano-pdf as references/ + scripts
(extract_pymupdf, extract_marker converted to the argparse house
standard its contract test enforces)
- NEW session_platforms frontmatter gate (metadata.hermes): hides a
skill from the index on gateway channels it is not for; fail-open on
unknown platform; teams-meeting-pipeline gated to [teams, cron]
- blocked-page-recovery: research -> new web category; trigger-first
description ('Use when a fetch fails: 403/429, paywall, WAF, bot
wall.') so the model actually reaches for it on blocked fetches
- docs regenerated via generate-skill-docs.py (195 pages); related_skills
swept repo-wide; tests: 1672 passed (2 openclaw failures pre-existing
on clean main, Windows-local)
* chore: ignore .skills_prompt_snapshot.json (local index cache, accidentally committed)
53 lines
2.2 KiB
Markdown
53 lines
2.2 KiB
Markdown
# ComfyUI Skill Tests
|
|
|
|
Pytest suite covering the skill's scripts. Pure-stdlib unit tests run
|
|
without any setup; cloud integration tests need a Comfy Cloud API key.
|
|
|
|
## Running
|
|
|
|
```bash
|
|
# Unit tests only (no network required) — runs in <1s
|
|
python3 -m pytest tests/ -c tests/pytest.ini -o addopts="-p no:xdist"
|
|
|
|
# Including cloud integration tests
|
|
COMFY_CLOUD_API_KEY="comfyui-..." python3 -m pytest tests/ \
|
|
-c tests/pytest.ini -o addopts="-p no:xdist"
|
|
|
|
# Just cloud tests
|
|
COMFY_CLOUD_API_KEY="comfyui-..." python3 -m pytest tests/test_cloud_integration.py \
|
|
-c tests/pytest.ini -o addopts="-p no:xdist" -v
|
|
```
|
|
|
|
The `-c` and `-o` overrides isolate this suite from any parent
|
|
`pyproject.toml` pytest config (e.g. the `-n auto` from a parent repo).
|
|
|
|
## Test files
|
|
|
|
| File | Coverage |
|
|
|------|----------|
|
|
| `test_common.py` | Cloud detection, URL routing, format validation, embeddings, paths, seeds, model-list parsing, folder aliases |
|
|
| `test_extract_schema.py` | Connection tracing, positive/negative prompt detection, dedup logic, embedding deps |
|
|
| `test_run_workflow.py` | Param injection (incl. -1 seed, link refusal), output download walk, runner construction |
|
|
| `test_check_deps.py` | Model-name fuzzy matching, install command suggestions |
|
|
| `test_cloud_integration.py` | Live cloud API contract tests (auto-skipped without API key) |
|
|
|
|
## Adding tests
|
|
|
|
When you change a script:
|
|
|
|
1. Add a unit test if the change is pure logic (cloud detection, parsing, etc.)
|
|
2. Add a cloud integration test if the change depends on cloud API behavior
|
|
(use `pytestmark = pytest.mark.cloud` so it auto-skips without a key)
|
|
3. Workflow fixtures live in `conftest.py` (`sd15_workflow`, `flux_workflow`,
|
|
`video_workflow`)
|
|
|
|
## Why the explicit `-c` / `-o`?
|
|
|
|
The parent hermes-agent repo used to enable `pytest-xdist` by default
|
|
(`-n auto`); the canonical runner has since moved to per-file subprocess
|
|
isolation via `scripts/run_tests_parallel.py` and no longer uses xdist.
|
|
This suite is small enough that parallelism isn't worth the complexity, and
|
|
pytest-xdist isn't always installed in the user's environment. The
|
|
`-c tests/pytest.ini -o addopts="-p no:xdist"` flags make the suite run
|
|
identically regardless of the parent project's config.
|