mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
refactor(rollups): move WMY and cumulative readers
- src/lib/measurements/rollup-read-wmy.ts → src/lib/rollups/measurement-read-wmy.ts - src/lib/measurements/rollup-read-cumulative.ts → src/lib/rollups/measurement-read-cumulative.ts - co-located tests follow the source files - cumulative module's sibling import of apple-health-mapping promoted to the @/lib alias since that mapping stays in src/lib/measurements/ Importers updated: 2 sites for WMY (health-score + summaries-slice), zero external sites for cumulative (only co-located test reads it). Pure relocation.
This commit is contained in:
1 parent
b7da526cbb
commit
8cfb1715b4
6 files changed
+5
-5
No files matched your search
@@ -45,7 +45,7 @@ import {
|
||||
probeRollupCoverage,
|
||||
type RollupCoverageMap,
|
||||
} from "@/lib/rollups/measurement-coverage";
|
||||
import { readBestGranularityRollups } from "@/lib/measurements/rollup-read-wmy";
|
||||
import { readBestGranularityRollups } from "@/lib/rollups/measurement-read-wmy";
|
||||
import { calculateCompliance } from "./compliance";
|
||||
import {
|
||||
computeHealthScore,
|
||||
|
||||
@@ -68,7 +68,7 @@ import {
|
||||
aggregateWmyBuckets,
|
||||
readBestGranularityRollups,
|
||||
type RollupBucketRow,
|
||||
} from "@/lib/measurements/rollup-read-wmy";
|
||||
} from "@/lib/rollups/measurement-read-wmy";
|
||||
|
||||
const DAY_MS = 24 * 60 * 60 * 1000;
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import {
|
||||
isCumulativeType,
|
||||
readCumulativeDaySums,
|
||||
resolveBucketSum,
|
||||
} from "../rollup-read-cumulative";
|
||||
} from "../measurement-read-cumulative";
|
||||
|
||||
beforeEach(() => {
|
||||
mocks.findMany.mockReset();
|
||||
+1
-1
@@ -41,7 +41,7 @@ import {
|
||||
readWeekRollups,
|
||||
readYearRollups,
|
||||
type RollupBucketRow,
|
||||
} from "../rollup-read-wmy";
|
||||
} from "../measurement-read-wmy";
|
||||
|
||||
const { findMany } = mocks;
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
*/
|
||||
import { prisma } from "@/lib/db";
|
||||
import type { MeasurementType } from "@/generated/prisma/client";
|
||||
import { CUMULATIVE_HK_TYPES } from "./apple-health-mapping";
|
||||
import { CUMULATIVE_HK_TYPES } from "@/lib/measurements/apple-health-mapping";
|
||||
|
||||
/**
|
||||
* Cumulative measurement types the rollup `sum_value` column serves.
|
||||
File renamed without changes.
Reference in new issue
Block a user