Skip to content

Swift package prep - #459

Merged
ps2 merged 28 commits into
devfrom
swift-package-prep
Mar 10, 2023
Merged

Swift package prep#459
ps2 merged 28 commits into
devfrom
swift-package-prep

Conversation

@ps2

@ps2ps2 commented Mar 8, 2023

Copy link
Copy Markdown
Collaborator

Reorganizing files and reworking some bundle access code to prepare for swift package build compatibility.

  • Package.swift file added. It builds, but not 100% working at runtime.
  • No source code files are shared; each target has its own set of extensions/etc.
  • UIKit and Foundation imported explicitly where needed.
  • Tests passing again; race conditions fixed, testing regressions fixed.
  • Example app building again.
  • Resources moved into subdirectories.

marionbarker pushed a commit to marionbarker/LoopKit that referenced this pull request Mar 9, 2023
@ps2
ps2 merged commit 4ca39ce into devMar 10, 2023
@ps2
ps2 deleted the swift-package-prep branch March 19, 2023 15:05
loopkitdev pushed a commit to loopkitdev/LoopKit that referenced this pull request Jun 10, 2026
Three tests carried expectations that no longer match the tidepool-synced
LoopAlgorithm / LoopQuantity behavior the workspace now pins. None are
regressions:
- GuardrailTests.testMinCorrectionRangeValue / testPreMealCorrectionRange:
expected 86.1 / 66.1, the deliberately-offset constants from LoopKit#527
("glucose values outside guardrails could be selected"). LoopKit#459
("Swift package prep") reverted the constants to clean 87 / 67 and
moved boundary selectability into GlucoseValuePicker; these two test
values were the only leftovers (testCorrectionRange already expects
87). Updated to 87 / 67.
- LoopMathTests.testDecayEffect: decayEffect is now a continuous function
of the (unaligned) sample timestamp, so the 10:13:20 sample interpolates
instead of snapping to the 5-minute grid. (testDecayEffectWithEvenGlucose,
aligned to :00, was already passing.) Updated to the continuous values
with accuracy comparison.
- InsulinMathTests.testAppendedUnionOfPumpEvents: called filterDateRange
on intentionally-unsorted pump events; filterDateRange now binary-searches
and asserts ascending order. Production already sorts before any
filterDateRange (DoseStore.getNormalizedPumpEventDoseEntries does
reconciled().sorted), so the test now sorts its input to exercise the
same precondition.
LoopKitTests: 459 tests, 0 failures.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@ps2