diff --git a/README.md b/README.md index 408d50d..d77f9f3 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,4 @@ If you're building a custom IoT device, a script to monitor your system, or just ## Documentation -[See Documentation](docs/index.md) - -- [Quick Start](docs/quick-start.md) -- [Control Types](docs/controls.md) +[See Documentation](https://fmtr.link/haco/doc) diff --git a/docs/changelog/changelog.md b/docs/changelog/changelog.md new file mode 100644 index 0000000..1502b84 --- /dev/null +++ b/docs/changelog/changelog.md @@ -0,0 +1,6 @@ +- Refactored core models from `dataclass` to Pydantic across active entities (`Base`, `Device`, `Control`, `Capability`, topic models, and concrete control types like `Switch`, `Climate`, `Sensor`, etc.). +- Replaced dataclass-specific field metadata (`metadata=dict(exclude=True)`, `field(...)`, `__post_init__`) with native Pydantic patterns (`Field(...)`, `model_post_init`, class inheritance from `corio.dm.Base`). +- Updated parent/back-reference handling to follow the parent-typing pattern, including explicit in-`__init__` imports for forward references (e.g. `Device.parent: ClientHaco | None`). +- Reworked `Base.model_dump()` to preserve discovery behavior by merging class `DATA`, defaulting to `exclude_none=True`, and excluding runtime extra attributes so dynamic callbacks do not leak into HA announce payloads. +- Cleaned up dataclass leftovers by removing the unused `Metadata` helper from `haco/utils.py` and simplifying related imports. +- Added packaging metadata and testing support updates: `pyproject.toml` project metadata/uv source config, `setup.py` test extras (`pytest`, `pytest-cov`), and initial `haco/tests` package scaffolding. diff --git a/pyproject.toml b/pyproject.toml index 78fdce7..aafd9d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,8 +4,16 @@ build-backend = "setuptools.build_meta" # [project] name= "haco" -dynamic = ["description", "readme", "version", "dependencies", "optional-dependencies"] +dynamic = [ + "description", + "readme", + "version", + "dependencies", + "optional-dependencies", + "license", + "authors", + "keywords", +] [tool.uv.sources] corio = { path = "../corio", editable = true } -