Files
kunail0804-ComfyUI-Scene-Co…/tests/test_release_readiness.py
T
f098259b8e build: prepare the Version 1.0.0 release (#32) (#76)
Finalize packaging and release readiness (MASTER_SPEC Phase 8, §7.8, §28).

- pyproject.toml: bump version to 1.0.0; ship the JSON Schemas as package data
  and enable include-package-data.
- MANIFEST.in: include the data directories (schemas, knowledge_base, prompts,
  config, examples, docs) in the source distribution.
- CHANGELOG.md: 1.0.0 release notes.
- docs/definition_of_done.md: the §7.8 Definition-of-Done checklist mapped to
  evidence, with the ComfyUI visual check and the tag/release step flagged as the
  remaining manual steps.
- tests/test_release_readiness.py: assert the version, changelog, DoD doc, and
  that every schema / Knowledge Base / config / prompt data file is present and
  declared for packaging.

Verified: `python -m build --sdist` produces comfyui_scene_compiler-1.0.0 with
all 13 Knowledge Base files, 10 schemas, the system prompt, and the default
config bundled. Tagging v1.0.0 and publishing the release are intentionally left
to a human after the ComfyUI visual check.

Co-authored-by: kunail0804 <kunail0804@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 14:18:33 +02:00

66 lines
2.1 KiB
Python

"""Release-readiness checks for Version 1 (issue #32)."""
from __future__ import annotations
import tomllib
from pathlib import Path
REPO_ROOT = Path(__file__).resolve().parent.parent
def _pyproject() -> dict:
return tomllib.loads((REPO_ROOT / "pyproject.toml").read_text(encoding="utf-8"))
def test_version_is_1_0_0() -> None:
assert _pyproject()["project"]["version"] == "1.0.0"
def test_changelog_documents_1_0_0() -> None:
changelog = (REPO_ROOT / "CHANGELOG.md").read_text(encoding="utf-8")
assert "1.0.0" in changelog
def test_definition_of_done_exists() -> None:
assert (REPO_ROOT / "docs" / "definition_of_done.md").is_file()
def test_all_schema_files_present() -> None:
schema_files = {p.name for p in (REPO_ROOT / "schemas" / "json").glob("*.schema.json")}
expected = {
"scene.schema.json",
"character.schema.json",
"concept.schema.json",
"interaction.schema.json",
"metadata.schema.json",
"knowledge_base_entry.schema.json",
"resolved_tag.schema.json",
"category_map.schema.json",
"prompt_output.schema.json",
"configuration.schema.json",
}
assert expected <= schema_files
def test_knowledge_base_domain_files_present() -> None:
kb_files = {p.name for p in (REPO_ROOT / "knowledge_base").glob("*.json")}
# The by-domain layout from MASTER_SPEC §15.3.
for domain in ("appearance", "clothing", "anatomy", "expressions", "environments"):
assert f"{domain}.json" in kb_files
def test_default_config_and_prompt_shipped() -> None:
assert (REPO_ROOT / "config" / "default_config.json").is_file()
assert (REPO_ROOT / "prompts" / "analyzer_system_prompt.md").is_file()
def test_manifest_includes_data_directories() -> None:
manifest = (REPO_ROOT / "MANIFEST.in").read_text(encoding="utf-8")
for directory in ("schemas", "knowledge_base", "prompts", "config"):
assert directory in manifest
def test_schemas_are_declared_as_package_data() -> None:
package_data = _pyproject()["tool"]["setuptools"]["package-data"]
assert any("json" in pattern for pattern in package_data["schemas"])