nutrition-mcp/src/lib.rs
Anthony Merlo ebb44fd712 test: add 25-test suite + fix sum_nutriments display keys
- 25 integration tests: DB init, default goals, FTS5 cache, upsert,
  portion scaling (100g/50g/200g/empty/non-numeric), sum_nutriments
  (single/multiple/empty/partial/no-data), meal detection, date format,
  log entry + summary round trip, custom food + sum, delete entry,
  goals get/update, weight log + history + upsert
- Fix: sum_nutriments now uses TRACKED_NUTRIENTS display names (first
  tuple element) instead of deriving from OFF field names — fixes
  proteins→protein, energy-kcal→energy_kcal mismatches
- Fix: weight_log.date is now UNIQUE for proper upsert behavior
- Fix: build_daily_summary remaining keys use display names
- Added lib.rs for integration test access
- Added regex dev-dependency

Closes nutrition-mcp-45t
2026-08-20 17:25:41 +01:00

7 lines
No EOL
168 B
Rust

// Library crate — exposes modules for integration tests.
// The binary (main.rs) re-uses these same modules.
pub mod api;
pub mod config;
pub mod db;
pub mod tools;