Skip to content

dizzy.generators.type_packages

dizzy.generators.type_packages

Manifest emitters for the generated gen_def / gen_int type packages.

These two packages hold the LinkML-compiled types (gen_def) and the typed Protocols/contexts/adapters (gen_int). They are emitted as installable uv workspace members so element packages can depend on them instead of importing undeclared top-level modules.

write_type_packages(output_dir)

Write pyproject.toml for the gen_def and gen_int packages (always overwritten).

Source code in dizzy/src/dizzy/generators/type_packages.py
57
58
59
60
61
62
63
64
65
66
def write_type_packages(output_dir: Path) -> None:
    """Write pyproject.toml for the gen_def and gen_int packages (always overwritten)."""
    for pkg_dir, content in [
        (gen_def_pkg_dir(output_dir), render_gen_def_pyproject()),
        (gen_int_pkg_dir(output_dir), render_gen_int_pyproject()),
    ]:
        pkg_dir.mkdir(parents=True, exist_ok=True)
        dest = pkg_dir / "pyproject.toml"
        dest.write_text(content)
        logger.debug("wrote file", extra={"path": str(dest)})