Bootstrap AppleWatchAI: implement all empty source modules, tests, and fix config#1
Draft
Bootstrap AppleWatchAI: implement all empty source modules, tests, and fix config#1
Conversation
Co-authored-by: ansuff <63700848+ansuff@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Create actionable plan for project development
Bootstrap AppleWatchAI: implement all empty source modules, tests, and fix config
Mar 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The project had a complete scaffolding (Poetry, DuckDB, Pandera, Ruff, Dynaconf all wired up) but every file under
src/awai/was empty — zero implementation code, no tests, and several config issues that blocked even installing the package.Core implementation
utils/xml_parser.py— loadsexport.xmlviaxmltodict; extracts records, workouts, and activity summaries into DataFrames. Adds_ensure_listto handle xmltodict returning adict(not alist) when only one XML child element is present.utils/data_cleaner.py—camelCase → snake_casecolumn renaming, date parsing + duration calculation, metadata column dropping, value normalisation (non-numeric →1.0for presence indicators), HK-prefix stripping, per-type filtering, daily & monthly aggregation.models/schemas.py— PanderaRecordsSchemavalidating the cleaned DataFrame (types,YYYY-MM-DDdate format, non-negative values).tasks/load_data.py— idempotent XML → DuckDB loader; existence check scoped tomainschema to avoid false positives from other databases.tasks/prepare_data.py— full pipeline: DuckDB read → clean → filter by type → daily & monthly aggregation.entrypoint.py— Fire-based CLI exposing two subcommands:Tests (28 passing)
tests/test_xml_parser.py— XML load, single-element edge case, all three extract functions.tests/test_data_cleaner.py—camel_to_snakeparametrised cases,clean_recordscolumn shape/dtype/drop behaviour,filter_record_types, daily & monthly aggregation sums.Config fixes
pyproject.toml— yankedpoetry-core==1.8.2→>=1.9.0; added[tool.poetry.scripts]entry and[tool.pytest.ini_options]..pre-commit-config.yaml—filesglob was^src/.*\.pyi$(stub files only); corrected to\.pyi?$to cover.pyfiles.settings.toml— populated withdata_dir,xml_file_name,db_name,log_leveldefaults.init_setup.sh— removed unused npm/nodemon steps.README.md— rewritten with accurate project structure, setup, and CLI usage.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.