From 20fc696f8ec6d83085291623d50f20ffe069842e Mon Sep 17 00:00:00 2001 From: Joshua King Date: Fri, 11 Sep 2026 09:06:02 -0400 Subject: [PATCH] docs: add HACS repository metadata and developer setup docs --- .gitignore | 6 +++++ LICENSE | 21 +++++++++++++++ README.md | 64 ++++++++++++++++++++++++++++++++++++++++++++ hacs.json | 5 ++++ tests/test_hacs.py | 66 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 162 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 hacs.json create mode 100644 tests/test_hacs.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7b33e7f --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +__pycache__/ +*.py[cod] +*$py.class +.venv/ +.pytest_cache/ +*.metadata.json diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7eaf5ba --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 NestQuest Contributors / Maniacs Mansion + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index e69de29..6083a8e 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,64 @@ +# NestQuest - House Chaos Coordination + +Home Assistant custom integration for managing chores, custody schedules, and house coordination. + +## Overview + +NestQuest helps households coordinate daily life, chore tracking, custody schedules, and shared tasks directly within Home Assistant. It provides sensors, calendar events, and service calls designed for busy households and modern co-parenting setups. + +## Installation + +### HACS Installation (Recommended) + +1. Ensure [HACS (Home Assistant Community Store)](https://hacs.xyz/) is installed. +2. In Home Assistant, open **HACS** > **Integrations**. +3. Select the three-dots menu in the top right and click **Custom repositories**. +4. Enter the repository URL: `https://code.cubecraftlabs.com/Maniacs_Mansion/NestQuest` +5. Select category **Integration** and click **Add**. +6. Search for **NestQuest** and click **Download**. +7. Restart Home Assistant. + +### Manual Installation + +1. Download the latest release from the repository. +2. Copy the `custom_components/nestquest` directory into your Home Assistant installation's `config/custom_components/` folder: + ```bash + cp -R custom_components/nestquest /custom_components/ + ``` +3. Restart Home Assistant. + +## Configuration + +After installation and restart: +1. Navigate to **Settings** > **Devices & Services** in Home Assistant. +2. Click **Add Integration** and search for **NestQuest**. +3. Follow the on-screen configuration flow. + +## Developer Setup and Testing + +This project uses [`uv`](https://github.com/astral-sh/uv) for fast Python package and dependency management. + +### Prerequisites + +- Python 3.11 or newer +- [uv](https://docs.astral.sh/uv/) installed on your machine + +### Setup Environment + +To set up the development environment and install dependencies: + +```bash +uv sync +``` + +### Running Tests + +Run the test suite with `pytest`: + +```bash +uv run pytest +``` + +## License + +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. diff --git a/hacs.json b/hacs.json new file mode 100644 index 0000000..bd5be75 --- /dev/null +++ b/hacs.json @@ -0,0 +1,5 @@ +{ + "name": "NestQuest", + "homeassistant": "2024.1.0", + "render_readme": true +} diff --git a/tests/test_hacs.py b/tests/test_hacs.py new file mode 100644 index 0000000..41eeb74 --- /dev/null +++ b/tests/test_hacs.py @@ -0,0 +1,66 @@ +"""Tests verifying HACS repository metadata, documentation, and licensing.""" +from __future__ import annotations + +import json +from pathlib import Path +import pytest + +REPO_ROOT = Path(__file__).parent.parent +HACS_JSON_PATH = REPO_ROOT / "hacs.json" +LICENSE_PATH = REPO_ROOT / "LICENSE" +README_PATH = REPO_ROOT / "README.md" +MANIFEST_PATH = REPO_ROOT / "custom_components" / "nestquest" / "manifest.json" + + +@pytest.fixture +def hacs_config() -> dict: + """Load and parse hacs.json.""" + assert HACS_JSON_PATH.exists(), f"hacs.json does not exist at {HACS_JSON_PATH}" + with open(HACS_JSON_PATH, encoding="utf-8") as f: + data = json.load(f) + return data + + +def test_hacs_json_exists_and_is_valid(hacs_config: dict) -> None: + """Verify hacs.json exists and is valid JSON.""" + assert isinstance(hacs_config, dict) + assert hacs_config.get("name") == "NestQuest" + assert hacs_config.get("homeassistant") == "2024.1.0" + assert hacs_config.get("render_readme") is True + + +def test_license_exists_and_non_empty() -> None: + """Verify LICENSE file exists and is non-empty.""" + assert LICENSE_PATH.exists(), f"LICENSE file does not exist at {LICENSE_PATH}" + content = LICENSE_PATH.read_text(encoding="utf-8").strip() + assert len(content) > 0 + assert "MIT License" in content + assert "NestQuest Contributors / Maniacs Mansion" in content + + +def test_readme_exists_and_contains_required_sections() -> None: + """Verify README.md exists and documents HACS installation, manual installation, and test commands.""" + assert README_PATH.exists(), f"README.md does not exist at {README_PATH}" + content = README_PATH.read_text(encoding="utf-8") + assert len(content.strip()) > 0 + + # Title and overview + assert "NestQuest - House Chaos Coordination" in content + assert "Home Assistant custom integration" in content + + # Installation methods + assert "HACS" in content + assert "Manual Installation" in content or "manual installation" in content.lower() + assert "custom_components/nestquest" in content + + # Developer Setup and Testing commands + assert "uv sync" in content + assert "uv run pytest" in content + + +def test_hacs_directory_structure() -> None: + """Verify directory structure matches HACS integration expectations.""" + assert MANIFEST_PATH.exists(), f"Integration manifest does not exist at {MANIFEST_PATH}" + with open(MANIFEST_PATH, encoding="utf-8") as f: + manifest = json.load(f) + assert manifest.get("domain") == "nestquest"