Imported from thelowlypeon/purefit (
AGENTS.md). Install upstream withnpx skills add thelowlypeon/purefit. Copyright stays with the author.
AGENTS.md
mainis protected: changes must be made through a pull request, not pushed directly.- Run tests locally (
swift test) before pushing. - Tests use Swift Testing (
import Testing,@Test,#expect), not XCTest.swift-tools-versionis 6.0. - If
swift testfails witherror: no such module 'Testing', the active toolchain is Command Line Tools only. RunDEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer swift testinstead. - Tests for a specific message go in
<Message>Tests.swift(e.g.LapMessageTests).PureFITFileTestsis for file-level behaviour. - Test fixtures live in
Tests/PureFITTests/Fixtures, named<writer>-<sport>-<what it covers>.fit. Tests reach them through theFixtureenum (try Fixture.garminCycling.pureFITFile()), neverBundle.module.urldirectly. Adding a fixture means a case there and a row in the Fixtures README. Benchmarks/is a separate SwiftPM package (so the library takes no dependency on the Garmin SDK). Run it from that directory, always-c release. Its first build compiles Garmin's C++/ObjC SDK and takes a few minutes.- Benchmark CI gates on PureFIT's own absolute times in
Benchmarks/budget.json— deliberately not measured against the Garmin SDK, so their releases can't move our pass mark. Only raise a budget for a deliberate trade-off, and say so in the PR.
