StanfordSpezi / SpeziAccount

The Spezi Account module to enable login and signup functionality
https://swiftpackageindex.com/StanfordSpezi/SpeziAccount/documentation/
MIT License
5 stars 5 forks source link

Move to SpeziValidation package #35

Closed Supereg closed 10 months ago

Supereg commented 10 months ago

Move to SpeziValidation package

:recycle: Current situation & Problem

Currently, SpeziAccount contains a lot of code that is not specific to account management. One part is input validation. https://github.com/StanfordSpezi/SpeziViews/pull/21 introduces the new SpeziValidation library, based on previous code in SpeziAccount. This PR makes the efforts to move to that new software package and greatly simplify the SpeziAccount code base.

:gear: Release Notes

:books: Documentation

Documentation was addressed where needed.

TBA: Some documentation still requires external links once the SpeziViews PR is merged.

:white_check_mark: Testing

Tests were adapted where needed. Nothing new was added.

: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 10 months ago

Codecov Report

Merging #35 (98dbd95) into main (9bd4e0a) will increase coverage by 0.42%. The diff coverage is 98.61%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/35/graphs/tree.svg?width=650&height=150&src=pr&token=AudNwGU7tR&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi)](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/35?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) ```diff @@ Coverage Diff @@ ## main #35 +/- ## ========================================== + Coverage 76.01% 76.42% +0.42% ========================================== Files 122 114 -8 Lines 4417 3952 -465 ========================================== - Hits 3357 3020 -337 + Misses 1060 932 -128 ``` | [Files](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/35?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) | Coverage Δ | | |---|---|---| | [Sources/SpeziAccount/AccountHeader.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/35?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUFjY291bnQvQWNjb3VudEhlYWRlci5zd2lmdA==) | `0.00% <ø> (ø)` | | | [...ce/Configuration/AccountServiceConfiguration.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/35?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUFjY291bnQvQWNjb3VudFNlcnZpY2UvQ29uZmlndXJhdGlvbi9BY2NvdW50U2VydmljZUNvbmZpZ3VyYXRpb24uc3dpZnQ=) | `100.00% <ø> (ø)` | | | [...ntService/Configuration/FieldValidationRules.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/35?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUFjY291bnQvQWNjb3VudFNlcnZpY2UvQ29uZmlndXJhdGlvbi9GaWVsZFZhbGlkYXRpb25SdWxlcy5zd2lmdA==) | `81.09% <100.00%> (+1.09%)` | :arrow_up: | | [...ccount/AccountService/Wrapper/StandardBacked.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/35?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUFjY291bnQvQWNjb3VudFNlcnZpY2UvV3JhcHBlci9TdGFuZGFyZEJhY2tlZC5zd2lmdA==) | `72.10% <ø> (ø)` | | | [Sources/SpeziAccount/AccountSetup.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/35?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUFjY291bnQvQWNjb3VudFNldHVwLnN3aWZ0) | `72.50% <100.00%> (ø)` | | | [Sources/SpeziAccount/AccountValue/AccountKey.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/35?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUFjY291bnQvQWNjb3VudFZhbHVlL0FjY291bnRLZXkuc3dpZnQ=) | `54.55% <ø> (-5.45%)` | :arrow_down: | | [...eziAccount/AccountValue/AccountValuesBuilder.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/35?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUFjY291bnQvQWNjb3VudFZhbHVlL0FjY291bnRWYWx1ZXNCdWlsZGVyLnN3aWZ0) | `85.33% <100.00%> (+1.99%)` | :arrow_up: | | [...ountValue/Configuration/ConfiguredAccountKey.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/35?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUFjY291bnQvQWNjb3VudFZhbHVlL0NvbmZpZ3VyYXRpb24vQ29uZmlndXJlZEFjY291bnRLZXkuc3dpZnQ=) | `63.16% <ø> (ø)` | | | [...eziAccount/AccountValue/Keys/EmailAddressKey.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/35?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUFjY291bnQvQWNjb3VudFZhbHVlL0tleXMvRW1haWxBZGRyZXNzS2V5LnN3aWZ0) | `0.00% <ø> (ø)` | | | [...s/SpeziAccount/AccountValue/Keys/PasswordKey.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/35?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUFjY291bnQvQWNjb3VudFZhbHVlL0tleXMvUGFzc3dvcmRLZXkuc3dpZnQ=) | `81.25% <100.00%> (-4.79%)` | :arrow_down: | | ... and [24 more](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/35?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/SpeziAccount/pull/35?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/SpeziAccount/pull/35?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). Last update [9bd4e0a...98dbd95](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/35?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).
Supereg commented 10 months ago

This PR still misses some external link to the latest SpeziViews documentation once https://github.com/StanfordSpezi/SpeziViews/pull/21 is merged and tagged. And of course updating the Package.swift file to the new release version. Other than that, the PR is ready to review.

PSchmiedmayer commented 10 months ago

Thank you @Supereg! 🚀