فهرست منبع

Remove incorrect error check for meal

This commit removes an incorrect error check from the `meal` Swift
implementation. The error checks for empty treatments and prevents the
algorithm from running for new users. It also removes this check from
the testing JS, which duplicated the error check.

Also, this commit cleans up an old autosens unit test that is no
longer correct after updating the rounding algorithm.
Sam King 4 ماه پیش
والد
کامیت
8d4028847a

+ 0 - 40
Trio.xcodeproj/project.pbxproj

@@ -271,7 +271,6 @@
 		3B4BA78F2D8DC0EC0069D5B8 /* TidepoolServiceKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B4BA7882D8DC0EC0069D5B8 /* TidepoolServiceKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		3B4BA7902D8DC0EC0069D5B8 /* TidepoolServiceKitUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B4BA7892D8DC0EC0069D5B8 /* TidepoolServiceKitUI.framework */; };
 		3B4BA7912D8DC0EC0069D5B8 /* TidepoolServiceKitUI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B4BA7892D8DC0EC0069D5B8 /* TidepoolServiceKitUI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
-		3B4D17132E1D8A0D007FB180 /* AutosensJsonExtraTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B4D17122E1D89FE007FB180 /* AutosensJsonExtraTests.swift */; };
 		3B506FD92E635304000740B9 /* IOBService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B506FD82E635304000740B9 /* IOBService.swift */; };
 		3B56079E2ECD62A800C723C1 /* DeletedGlucoseStored+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B56079D2ECD62A800C723C1 /* DeletedGlucoseStored+CoreDataClass.swift */; };
 		3B5607A02ECD62AC00C723C1 /* DeletedGlucoseStored+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B56079F2ECD62AC00C723C1 /* DeletedGlucoseStored+CoreDataProperties.swift */; };
@@ -295,15 +294,8 @@
 		3B5CD2CE2D4AECD500CE213C /* ProfileBasalTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B5CD2C12D4AECD500CE213C /* ProfileBasalTests.swift */; };
 		3B5F45B62D6A239500F70982 /* DoubleApproximateMatching.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B5F45B52D6A239000F70982 /* DoubleApproximateMatching.swift */; };
 		3B8221B22E5882E300585156 /* DetermineBasalEarlyExitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8221B12E5882D900585156 /* DetermineBasalEarlyExitTests.swift */; };
-		3B8B5D332DF5238000365ED3 /* as-profile.json in Resources */ = {isa = PBXBuildFile; fileRef = 3B8B5D302DF5238000365ED3 /* as-profile.json */; };
-		3B8B5D342DF5238000365ED3 /* as-glucose.json in Resources */ = {isa = PBXBuildFile; fileRef = 3B8B5D2F2DF5238000365ED3 /* as-glucose.json */; };
-		3B8B5D352DF5238000365ED3 /* as-pump.json in Resources */ = {isa = PBXBuildFile; fileRef = 3B8B5D312DF5238000365ED3 /* as-pump.json */; };
-		3B8B5D362DF5238000365ED3 /* as-carbs.json in Resources */ = {isa = PBXBuildFile; fileRef = 3B8B5D2E2DF5238000365ED3 /* as-carbs.json */; };
-		3B8B5D372DF5238000365ED3 /* as-basal.json in Resources */ = {isa = PBXBuildFile; fileRef = 3B8B5D2D2DF5238000365ED3 /* as-basal.json */; };
-		3B8B5D382DF5238000365ED3 /* as-temp-targets.json in Resources */ = {isa = PBXBuildFile; fileRef = 3B8B5D322DF5238000365ED3 /* as-temp-targets.json */; };
 		3B8B5D3C2DF523C000365ED3 /* AutosensJsonTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8B5D3B2DF523B800365ED3 /* AutosensJsonTests.swift */; };
 		3B8B5D3E2DF5240C00365ED3 /* TimeZoneForTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8B5D3D2DF5240600365ED3 /* TimeZoneForTests.swift */; };
-		3B8B5D402DF52D0E00365ED3 /* deviationsUnsorted.json in Resources */ = {isa = PBXBuildFile; fileRef = 3B8B5D3F2DF52D0700365ED3 /* deviationsUnsorted.json */; };
 		3B997DCB2DC00849006B6BB2 /* JSONImporter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B997DCA2DC00849006B6BB2 /* JSONImporter.swift */; };
 		3B997DCF2DC00A3A006B6BB2 /* JSONImporterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B997DCE2DC00A3A006B6BB2 /* JSONImporterTests.swift */; };
 		3B997DD32DC02AEF006B6BB2 /* glucose.json in Resources */ = {isa = PBXBuildFile; fileRef = 3B997DD12DC02AEF006B6BB2 /* glucose.json */; };
@@ -1214,7 +1206,6 @@
 		3B4BA7692D8DBD690069D5B8 /* RileyLinkKitUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = RileyLinkKitUI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		3B4BA7882D8DC0EC0069D5B8 /* TidepoolServiceKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TidepoolServiceKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		3B4BA7892D8DC0EC0069D5B8 /* TidepoolServiceKitUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = TidepoolServiceKitUI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-		3B4D17122E1D89FE007FB180 /* AutosensJsonExtraTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutosensJsonExtraTests.swift; sourceTree = "<group>"; };
 		3B506FD82E635304000740B9 /* IOBService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IOBService.swift; sourceTree = "<group>"; };
 		3B56079D2ECD62A800C723C1 /* DeletedGlucoseStored+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "DeletedGlucoseStored+CoreDataClass.swift"; sourceTree = "<group>"; };
 		3B56079F2ECD62AC00C723C1 /* DeletedGlucoseStored+CoreDataProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "DeletedGlucoseStored+CoreDataProperties.swift"; sourceTree = "<group>"; };
@@ -1238,15 +1229,8 @@
 		3B5CD2C62D4AECD500CE213C /* ProfileTargetsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileTargetsTests.swift; sourceTree = "<group>"; };
 		3B5F45B52D6A239000F70982 /* DoubleApproximateMatching.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DoubleApproximateMatching.swift; sourceTree = "<group>"; };
 		3B8221B12E5882D900585156 /* DetermineBasalEarlyExitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetermineBasalEarlyExitTests.swift; sourceTree = "<group>"; };
-		3B8B5D2D2DF5238000365ED3 /* as-basal.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "as-basal.json"; sourceTree = "<group>"; };
-		3B8B5D2E2DF5238000365ED3 /* as-carbs.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "as-carbs.json"; sourceTree = "<group>"; };
-		3B8B5D2F2DF5238000365ED3 /* as-glucose.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "as-glucose.json"; sourceTree = "<group>"; };
-		3B8B5D302DF5238000365ED3 /* as-profile.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "as-profile.json"; sourceTree = "<group>"; };
-		3B8B5D312DF5238000365ED3 /* as-pump.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "as-pump.json"; sourceTree = "<group>"; };
-		3B8B5D322DF5238000365ED3 /* as-temp-targets.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "as-temp-targets.json"; sourceTree = "<group>"; };
 		3B8B5D3B2DF523B800365ED3 /* AutosensJsonTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutosensJsonTests.swift; sourceTree = "<group>"; };
 		3B8B5D3D2DF5240600365ED3 /* TimeZoneForTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeZoneForTests.swift; sourceTree = "<group>"; };
-		3B8B5D3F2DF52D0700365ED3 /* deviationsUnsorted.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = deviationsUnsorted.json; sourceTree = "<group>"; };
 		3B997DCA2DC00849006B6BB2 /* JSONImporter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONImporter.swift; sourceTree = "<group>"; };
 		3B997DCE2DC00A3A006B6BB2 /* JSONImporterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONImporterTests.swift; sourceTree = "<group>"; };
 		3B997DD12DC02AEF006B6BB2 /* glucose.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = glucose.json; sourceTree = "<group>"; };
@@ -2869,7 +2853,6 @@
 		3B1C5C3C2D68E269004E9273 /* json */ = {
 			isa = PBXGroup;
 			children = (
-				3B8B5D2C2DF5234C00365ED3 /* autosens */,
 				3BF92F392D86F1AA006B545A /* iob-error-log.json */,
 			);
 			path = json;
@@ -2975,7 +2958,6 @@
 				3B1C5C3C2D68E269004E9273 /* json */,
 				3BFA5BF72D989F380072B082 /* mocks */,
 				3B1C5C3F2D68E269004E9273 /* utils */,
-				3B4D17122E1D89FE007FB180 /* AutosensJsonExtraTests.swift */,
 				3B8B5D3B2DF523B800365ED3 /* AutosensJsonTests.swift */,
 				3BBC22622DF5B93900169236 /* AutosensTests.swift */,
 				3BA643E92ED9FAD8007BC31F /* DetermineBasalAggressiveDosingTests.swift */,
@@ -3013,20 +2995,6 @@
 			path = OpenAPSSwiftTests;
 			sourceTree = "<group>";
 		};
-		3B8B5D2C2DF5234C00365ED3 /* autosens */ = {
-			isa = PBXGroup;
-			children = (
-				3B8B5D3F2DF52D0700365ED3 /* deviationsUnsorted.json */,
-				3B8B5D2D2DF5238000365ED3 /* as-basal.json */,
-				3B8B5D2E2DF5238000365ED3 /* as-carbs.json */,
-				3B8B5D2F2DF5238000365ED3 /* as-glucose.json */,
-				3B8B5D302DF5238000365ED3 /* as-profile.json */,
-				3B8B5D312DF5238000365ED3 /* as-pump.json */,
-				3B8B5D322DF5238000365ED3 /* as-temp-targets.json */,
-			);
-			path = autosens;
-			sourceTree = "<group>";
-		};
 		3B997DD22DC02AEF006B6BB2 /* JSONImporterData */ = {
 			isa = PBXGroup;
 			children = (
@@ -4518,16 +4486,9 @@
 				3B997DD32DC02AEF006B6BB2 /* glucose.json in Resources */,
 				3BD433B02F01CDF500897F7D /* autosens-prepare-8.js in Resources */,
 				DDD78AD92DC421B500AC63F3 /* enacted.json in Resources */,
-				3B8B5D402DF52D0E00365ED3 /* deviationsUnsorted.json in Resources */,
 				DD3C47B32DC5608A003DD20D /* newerSuggested.json in Resources */,
 				3BCA5F7C2DC7B16400A7EAC7 /* pumphistory-with-external.json in Resources */,
 				3B16C39C2DF75BD500C5C801 /* autosens-prepare.js in Resources */,
-				3B8B5D332DF5238000365ED3 /* as-profile.json in Resources */,
-				3B8B5D342DF5238000365ED3 /* as-glucose.json in Resources */,
-				3B8B5D352DF5238000365ED3 /* as-pump.json in Resources */,
-				3B8B5D362DF5238000365ED3 /* as-carbs.json in Resources */,
-				3B8B5D372DF5238000365ED3 /* as-basal.json in Resources */,
-				3B8B5D382DF5238000365ED3 /* as-temp-targets.json in Resources */,
 				DDD78ADA2DC421B500AC63F3 /* suggested.json in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -5336,7 +5297,6 @@
 				BD8FC0602D6619DB00B95AED /* CarbsStorageTests.swift in Sources */,
 				DD30BA002E0745C400DA677C /* DetermineBasalDeltaCalculationTests.swift in Sources */,
 				BD8FC05E2D6618CE00B95AED /* BolusCalculatorTests.swift in Sources */,
-				3B4D17132E1D8A0D007FB180 /* AutosensJsonExtraTests.swift in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

+ 0 - 2
Trio/Sources/APS/OpenAPSSwift/Meal/MealTotal.swift

@@ -101,8 +101,6 @@ enum MealTotal {
         glucose: [BloodGlucose],
         time: Date
     ) throws -> ComputedCarbs? {
-        guard treatments.isNotEmpty else { return nil }
-
         // Re-assign to a var, so it can be sorted
         var _treatments = treatments
         var profile = profile

+ 0 - 54
TrioTests/OpenAPSSwiftTests/AutosensJsonExtraTests.swift

@@ -1,54 +0,0 @@
-import Foundation
-import Testing
-@testable import Trio
-
-@Suite("Autosens using real JSON from bundle", .serialized) struct AutosensJsonExtraTests {
-    let timeZoneForTests = TimeZoneForTests()
-
-    // static func from<T: Decodable>(string: String) throws -> T
-    func loadJson<T: Decodable>(_ name: String) throws -> T {
-        let testBundle = Bundle(for: BundleReference.self)
-        let path = testBundle.path(forResource: name, ofType: "json")!
-        let data = try Data(contentsOf: URL(fileURLWithPath: path))
-        return try JSONCoding.decoder.decode(T.self, from: data)
-    }
-
-    @Test("Test with resistance") func generateJavascriptInputs() throws {
-        let glucose: [BloodGlucose] = try loadJson("as-glucose")
-        let pump: [PumpHistoryEvent] = try loadJson("as-pump")
-        let basalProfile: [BasalProfileEntry] = try loadJson("as-basal")
-        let profile: Profile = try loadJson("as-profile")
-        let carbs: [CarbsEntry] = try loadJson("as-carbs")
-        let tempTargets: [TempTarget] = try loadJson("as-temp-targets")
-
-        let clock = Date("2025-06-08T00:14:35.481Z")!
-
-        timeZoneForTests.setTimezone(identifier: "America/Los_Angeles")
-
-        let autosensResult = try AutosensGenerator.generate(
-            glucose: glucose,
-            pumpHistory: pump,
-            basalProfile: basalProfile,
-            profile: profile,
-            carbs: carbs,
-            tempTargets: tempTargets,
-            maxDeviations: 96,
-            clock: clock,
-            includeDeviationsForTesting: true
-        )
-
-        let deviationsUnsorted: [Decimal] = try loadJson("deviationsUnsorted")
-
-        #expect(autosensResult.ratio == 1.2)
-        #expect(autosensResult.newisf == 46)
-        #expect(deviationsUnsorted.count == autosensResult.deviationsUnsorted?.count)
-
-        for (ref, calc) in zip(deviationsUnsorted, autosensResult.deviationsUnsorted!) {
-            // we can get differences due to rounding inconsistencies between
-            // javascript and swift with negative numbers
-            #expect(ref.isWithin(0.01, of: calc))
-        }
-
-        timeZoneForTests.resetTimezone()
-    }
-}

+ 13 - 2
TrioTests/OpenAPSSwiftTests/MealTotalTests.swift

@@ -101,7 +101,7 @@ import Testing
         )
     }
 
-    @Test("should return nil when no treatments provided") func emptyObjectWhenNoTreatments() async throws {
+    @Test("should return result with zero carbs when treatments is empty array") func emptyObjectWhenNoTreatments() async throws {
         let time = Date.from(isoString: "2016-06-19T13:00:00-04:00")
         let glucoseData = [
             BloodGlucose(
@@ -123,7 +123,18 @@ import Testing
             time: time
         )
 
-        #expect(result == nil)
+        // With empty treatments, JS returns a full result object
+        // with zero carbs/COB and sentinel deviation values
+        #expect(result != nil)
+        #expect(result?.carbs == 0)
+        #expect(result?.mealCOB == 0)
+        #expect(result?.currentDeviation == nil)
+        #expect(result?.maxDeviation == 0)
+        #expect(result?.minDeviation == 999)
+        #expect(result?.slopeFromMaxDeviation == 0)
+        #expect(result?.slopeFromMinDeviation == 999)
+        #expect(result?.allDeviations == [])
+        #expect(result?.lastCarbTime == 0)
     }
 
     @Test("should calculate carbs correctly for treatments within the meal window") func calcCarbsWithinMealWindow() async throws {

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
TrioTests/OpenAPSSwiftTests/javascript/bundle/meal.js


+ 0 - 32
TrioTests/OpenAPSSwiftTests/json/autosens/as-basal.json

@@ -1,32 +0,0 @@
-[
-  {
-    "start" : "00:00:00",
-    "rate" : 0.6,
-    "minutes" : 0
-  },
-  {
-    "start" : "04:00:00",
-    "rate" : 0.55,
-    "minutes" : 240
-  },
-  {
-    "start" : "08:00:00",
-    "rate" : 0.55,
-    "minutes" : 480
-  },
-  {
-    "start" : "12:00:00",
-    "rate" : 0.5,
-    "minutes" : 720
-  },
-  {
-    "start" : "16:00:00",
-    "rate" : 0.45,
-    "minutes" : 960
-  },
-  {
-    "start" : "20:00:00",
-    "rate" : 0.6,
-    "minutes" : 1200
-  }
-]

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 1
TrioTests/OpenAPSSwiftTests/json/autosens/as-carbs.json


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 1
TrioTests/OpenAPSSwiftTests/json/autosens/as-glucose.json


+ 0 - 157
TrioTests/OpenAPSSwiftTests/json/autosens/as-profile.json

@@ -1,157 +0,0 @@
-{
-    "max_iob": 8,
-    "max_daily_safety_multiplier": 3,
-    "current_basal_safety_multiplier": 4,
-    "autosens_max": 1.2,
-    "autosens_min": 0.7,
-    "rewind_resets_autosens": true,
-    "high_temptarget_raises_sensitivity": false,
-    "low_temptarget_lowers_sensitivity": false,
-    "sensitivity_raises_target": false,
-    "resistance_lowers_target": false,
-    "exercise_mode": false,
-    "half_basal_exercise_target": 160,
-    "maxCOB": 120,
-    "maxMealAbsorptionTime": 6,
-    "skip_neutral_temps": false,
-    "unsuspend_if_no_temp": false,
-    "min_5m_carbimpact": 8,
-    "autotune_isf_adjustmentFraction": 1,
-    "remainingCarbsFraction": 1,
-    "remainingCarbsCap": 90,
-    "enableUAM": true,
-    "A52_risk_enable": false,
-    "enableSMB_with_COB": false,
-    "enableSMB_with_temptarget": false,
-    "enableSMB_always": true,
-    "enableSMB_after_carbs": false,
-    "enableSMB_high_bg": false,
-    "enableSMB_high_bg_target": 110,
-    "allowSMB_with_high_temptarget": false,
-    "maxSMBBasalMinutes": 120,
-    "maxUAMSMBBasalMinutes": 120,
-    "SMBInterval": 3,
-    "bolus_increment": 0.05,
-    "maxDelta_bg_threshold": 0.2,
-    "curve": "ultra-rapid",
-    "useCustomPeakTime": true,
-    "insulinPeakTime": 45,
-    "carbsReqThreshold": 1,
-    "offline_hotspot": false,
-    "noisyCGMTargetMultiplier": 1.3,
-    "suspend_zeros_iob": true,
-    "enableEnliteBgproxy": false,
-    "calc_glucose_noise": false,
-    "target_bg": false,
-    "smb_delivery_ratio": 0.5,
-    "adjustmentFactor": 0.8,
-    "adjustmentFactorSigmoid": 0.5,
-    "useNewFormula": true,
-    "sigmoid": true,
-    "weightPercentage": 0.35,
-    "tddAdjBasal": false,
-    "threshold_setting": 80,
-    "dia": 10,
-    "model": "722",
-    "current_basal": 0.45,
-    "basalprofile": [
-        {
-            "start": "00:00:00",
-            "rate": 0.6,
-            "minutes": 0
-        },
-        {
-            "start": "04:00:00",
-            "rate": 0.55,
-            "minutes": 240
-        },
-        {
-            "start": "08:00:00",
-            "rate": 0.55,
-            "minutes": 480
-        },
-        {
-            "start": "12:00:00",
-            "rate": 0.5,
-            "minutes": 720
-        },
-        {
-            "start": "16:00:00",
-            "rate": 0.45,
-            "minutes": 960
-        },
-        {
-            "start": "20:00:00",
-            "rate": 0.6,
-            "minutes": 1200
-        }
-    ],
-    "max_daily_basal": 0.6,
-    "max_basal": 3,
-    "out_units": "mg/dL",
-    "min_bg": 90,
-    "max_bg": 90,
-    "bg_targets": {
-        "units": "mg/dL",
-        "user_preferred_units": "mg/dL",
-        "targets": [
-            {
-                "high": 90,
-                "offset": 0,
-                "low": 90,
-                "start": "00:00:00",
-                "max_bg": 90,
-                "min_bg": 90
-            }
-        ]
-    },
-    "sens": 55,
-    "isfProfile": {
-        "units": "mg/dL",
-        "user_preferred_units": "mg/dL",
-        "sensitivities": [
-            {
-                "offset": 0,
-                "sensitivity": 47,
-                "start": "00:00:00"
-            },
-            {
-                "offset": 240,
-                "sensitivity": 50,
-                "start": "04:00:00"
-            },
-            {
-                "offset": 480,
-                "sensitivity": 47,
-                "start": "08:00:00"
-            },
-            {
-                "offset": 720,
-                "sensitivity": 49,
-                "start": "12:00:00"
-            },
-            {
-                "offset": 960,
-                "sensitivity": 55,
-                "start": "16:00:00",
-                "endOffset": 1200
-            },
-            {
-                "offset": 1200,
-                "sensitivity": 51,
-                "start": "20:00:00"
-            }
-        ]
-    },
-    "carb_ratio": 11,
-    "carb_ratios": {
-        "units": "grams",
-        "schedule": [
-            {
-                "offset": 0,
-                "ratio": 11,
-                "start": "00:00:00"
-            }
-        ]
-    }
-}

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 1
TrioTests/OpenAPSSwiftTests/json/autosens/as-pump.json


+ 0 - 26
TrioTests/OpenAPSSwiftTests/json/autosens/as-temp-targets.json

@@ -1,26 +0,0 @@
-[
-  {
-    "_id" : "49993FD5-7A1E-4B65-8DAD-0BADF347BF90",
-    "name" : "Cancel",
-    "targetBottom" : 0,
-    "created_at" : "2025-06-04T01:10:47.464Z",
-    "halfBasalTarget" : 160,
-    "targetTop" : 0,
-    "reason" : "Cancel",
-    "duration" : 0,
-    "enteredBy" : "Trio"
-  },
-  {
-    "_id" : "5A700914-327C-4C4C-8114-5125A6E9CA75",
-    "name" : "High sensitivity 110",
-    "targetBottom" : 110,
-    "created_at" : "2025-06-03T23:09:13.069Z",
-    "halfBasalTarget" : 160,
-    "targetTop" : 110,
-    "reason" : "Temp Target",
-    "duration" : 120,
-    "isPreset" : true,
-    "enabled" : true,
-    "enteredBy" : "Trio"
-  }
-]

+ 0 - 1
TrioTests/OpenAPSSwiftTests/json/autosens/deviationsUnsorted.json

@@ -1 +0,0 @@
-[6.51,11.70,0,0,0,0,2.09,2.83,2.62,1.43,4.22,4.13,2.10,2.05,2.96,-3.11,2.75,3.61,-0.49,0.40,1.26,0.25,0,1.10,-0.05,-1.20,6.65,0.57,0.55,0.50,-2.60,-4.70,3.17,3.05,1.00,0.97,0.00,0.97,1.03,3.05,2.05,4.12,2.33,-6.57,5.47,3.45,-1.53,10.45,0,0.91,-0.20,-2.53,0.28,0.07,0,-0.14,3.64,-1.40,3.55,8.50,-0.43,9.48,0,-4.69,-3.91,-1.13,-2.38,3.38,4.13,6.94,5.86,10.76,0,-2.13,-2.45,2.23,-1.08,-2.09,0,2.61,-3.69,-3.97,-2.24,1.49,0.24,5.99,7.88,0.02,4.10,4.13,4.15,0.27,-1.71,0]