2.6 KiB
2.6 KiB
AGENTS.md
Guidance for AI coding assistants working in this repository.
Project overview
basic_data_handling is a ComfyUI custom-node pack: lightweight Python nodes for common data
manipulation (boolean logic, casting, comparison, control flow, lists, dicts, sets, strings, math,
paths, regex, tensors, time). It has no runtime dependencies beyond ComfyUI itself.
Repository layout
src/basic_data_handling/— node implementations; each*_nodes.pymodule registers its nodes.tests/— pytest suite mirroring thesrc/modules.web/— frontend assets (icon, JS).pyproject.toml— package metadata, Comfy registry config ([tool.comfy]), and tool config (ruff / mypy / pytest).CHANGELOG.md— release notes in Keep-a-Changelog format; the publish workflow reads the section matching the current version..github/workflows/— CI (build-pipeline.yml,validate.yml) and registry publishing (publish_node.yml).
Versioning & releases (IMPORTANT)
- Single source of truth:
[project] versioninpyproject.toml. There is intentionally nobump-my-versionconfig — do not re-add one; it only duplicates the version string and causes drift. - To release a new version:
- Bump
[project] versioninpyproject.toml(semver: MAJOR = breaking, MINOR = feature, PATCH = fix). - Add a
## [X.Y.Z] - YYYY-MM-DDsection toCHANGELOG.md(Keep-a-Changelog format). - Push to
main..github/workflows/publish_node.ymlauto-triggers on any push touchingpyproject.tomland publishes to the Comfy registry.
- Bump
- Changelog → registry: the publish workflow extracts the
## [X.Y.Z]section fromCHANGELOG.mdand sends it viacomfy node publish --changelog-file. That text is what shows under Version history on the registry page. Published versions are immutable, so the changelog only appears for the newly published version. - Registry metadata lives in
[tool.comfy](PublisherId = "stablellama",DisplayName,Icon). ThenameandRepositoryURL must stay stable — they are the registry node ID.
Tooling
Python venv (repo lives under ComfyUI/custom_nodes): <repo>/../../venv/bin/python
- Lint:
python -m ruff check . - Format:
python -m ruff format . - Type check:
python -m mypy .(strict) - Tests:
python -m pytest tests/ - Pre-commit:
python -m pre_commit run --all-files
Workflow / commit policy
- The human reviews and commits all changes (commits are GPG-signed). Do not run
git commityourself; make the changes, optionally stage them, and hand off to the user.