CS342 / 2024-Prisma

MIT License
2 stars 1 forks source link

Adding Sleep and Workout Data #32

Closed mjoerke closed 8 months ago

mjoerke commented 8 months ago

Adding Sleep and Workout Data

:recycle: Current situation & Problem

The current version of the app does not upload sleep data or workout data, both of which are important data sources to include for physical activity behavior change. This PR adds support to query HealthKit for HKCategoryType(.sleepAnalysis) and HKWorkoutType entries and upload them appropriately to our Firestore database.

:gear: Release Notes

:books: Documentation

N/A

:white_check_mark: Testing

N/A

:pencil: Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

codecov[bot] commented 8 months ago

Codecov Report

Attention: Patch coverage is 24.28571% with 53 lines in your changes are missing coverage. Please review.

Project coverage is 35.97%. Comparing base (b4e57f9) to head (b549eed).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/CS342/2024-Prisma/pull/32/graphs/tree.svg?width=650&height=150&src=pr&token=Kl2PgPHuci&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CS342)](https://app.codecov.io/gh/CS342/2024-Prisma/pull/32?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CS342) ```diff @@ Coverage Diff @@ ## main #32 +/- ## ========================================== - Coverage 37.46% 35.97% -1.48% ========================================== Files 40 40 Lines 1383 1418 +35 ========================================== - Hits 518 510 -8 - Misses 865 908 +43 ``` | [Files](https://app.codecov.io/gh/CS342/2024-Prisma/pull/32?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CS342) | Coverage Δ | | |---|---|---| | [Prisma/PrismaDelegate.swift](https://app.codecov.io/gh/CS342/2024-Prisma/pull/32?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CS342#diff-UHJpc21hL1ByaXNtYURlbGVnYXRlLnN3aWZ0) | `93.11% <100.00%> (+1.33%)` | :arrow_up: | | [Prisma/Standard/PrismaStandard+Extension.swift](https://app.codecov.io/gh/CS342/2024-Prisma/pull/32?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CS342#diff-UHJpc21hL1N0YW5kYXJkL1ByaXNtYVN0YW5kYXJkK0V4dGVuc2lvbi5zd2lmdA==) | `0.00% <0.00%> (ø)` | | | [Prisma/Standard/PrismaStandard+HealthKit.swift](https://app.codecov.io/gh/CS342/2024-Prisma/pull/32?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CS342#diff-UHJpc21hL1N0YW5kYXJkL1ByaXNtYVN0YW5kYXJkK0hlYWx0aEtpdC5zd2lmdA==) | `0.00% <0.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/CS342/2024-Prisma/pull/32/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CS342) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/CS342/2024-Prisma/pull/32?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CS342). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CS342) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/CS342/2024-Prisma/pull/32?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CS342). Last update [b4e57f9...b549eed](https://app.codecov.io/gh/CS342/2024-Prisma/pull/32?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CS342). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CS342).