StanfordSpezi / SpeziQuestionnaire

Spezi Questionnaire Module
https://swiftpackageindex.com/StanfordSpezi/SpeziQuestionnaire/documentation/
MIT License
6 stars 0 forks source link

New Spezi Standard Implementation #7

Closed niallkehoe closed 1 year ago

niallkehoe commented 1 year ago

New Spezi Standard Implementation

:recycle: Current situation & Problem

Currently, the SpeziQuestionnaire module lacks support for the new Spezi Standard released in Spezi 0.7.0 This PR implements the improvements mentioned in [https://github.com/StanfordSpezi/Spezi/pull/73](Pull 73)

:bulb: Proposed solution

Update the codebase to the newest Spezi 0.7.0

:gear: Release Notes

This feature will allow for greater flexibility when using Spezi Questionnaire.

/// A Standard which all Spezi Questionnaires must follow
public protocol QuestionnaireConstraint: Standard {

    /// Adds a new `QuestionnaireResponse` to the ``QuestionnaireDataSource``
    /// - Parameter response: The `QuestionnaireResponse` that should be added.
    func add(_ response: QuestionnaireResponse) async
}

Related PRs

See [https://github.com/StanfordSpezi/Spezi/pull/73](Pull 73) in Spezi for details

Testing

Passes all tests

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 1 year ago

Codecov Report

Merging #7 (daf43ce) into main (7cbeb0a) will increase coverage by 47.07%. The diff coverage is 100.00%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/StanfordSpezi/SpeziQuestionnaire/pull/7/graphs/tree.svg?width=650&height=150&src=pr&token=SXbKBp8cEl&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi)](https://app.codecov.io/gh/StanfordSpezi/SpeziQuestionnaire/pull/7?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) ```diff @@ Coverage Diff @@ ## main #7 +/- ## =========================================== + Coverage 36.89% 83.96% +47.07% =========================================== Files 6 4 -2 Lines 122 81 -41 =========================================== + Hits 45 68 +23 + Misses 77 13 -64 ``` | [Files Changed](https://app.codecov.io/gh/StanfordSpezi/SpeziQuestionnaire/pull/7?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) | Coverage Δ | | |---|---|---| | [Sources/SpeziQuestionnaire/QuestionnaireView.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziQuestionnaire/pull/7?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aVF1ZXN0aW9ubmFpcmUvUXVlc3Rpb25uYWlyZVZpZXcuc3dpZnQ=) | `74.42% <ø> (+11.63%)` | :arrow_up: | | [...s/SpeziQuestionnaire/QuestionnaireDataSource.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziQuestionnaire/pull/7?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aVF1ZXN0aW9ubmFpcmUvUXVlc3Rpb25uYWlyZURhdGFTb3VyY2Uuc3dpZnQ=) | `100.00% <100.00%> (+100.00%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/StanfordSpezi/SpeziQuestionnaire/pull/7/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/StanfordSpezi/SpeziQuestionnaire/pull/7?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). > **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=StanfordSpezi) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/StanfordSpezi/SpeziQuestionnaire/pull/7?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). Last update [7cbeb0a...daf43ce](https://app.codecov.io/gh/StanfordSpezi/SpeziQuestionnaire/pull/7?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). 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=StanfordSpezi).
PSchmiedmayer commented 1 year ago

@PSchmiedmayer Take a look at the test coverage

vishnuravi commented 1 year ago

Thank you @niallkehoe!