Skip to content

Commit

Permalink
Fix missing links to SpeziValidation package (#57)
Browse files Browse the repository at this point in the history
# Fix missing links to SpeziValidation package

## ♻️ Current situation & Problem
There were missing links in the current documentation. This PR resolves
this issues.
Further, we resolve some weird DocC warning and add codecov token to
coverage uploads.


## ⚙️ Release Notes 
* Documentation fixes
* CodeCov token upload


## 📝 Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md).
  • Loading branch information
Supereg authored Apr 10, 2024
1 parent cb9441e commit 83f505c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ jobs:
uses: StanfordSpezi/.github/.github/workflows/create-and-upload-coverage-report.yml@v2
with:
coveragereports: SpeziAccount.xcresult TestApp.xcresult
secrets:
token: ${{ secrets.CODECOV_TOKEN }}
3 changes: 3 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ authors:
- family-names: "Schmiedmayer"
given-names: "Paul"
orcid: "https://orcid.org/0000-0002-8607-9148"
- family-names: "Bauer"
given-names: "Andreas"
orcid: "https://orcid.org/0000-0002-1680-237X"
- family-names: "Ravi"
given-names: "Vishnu"
orcid: "https://orcid.org/0000-0003-0359-1275"
Expand Down
9 changes: 6 additions & 3 deletions Sources/SpeziAccount/AccountValue/AccountValues.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ public protocol AccountValuesCollection: AcceptingAccountValueVisitor, Collectio
/// - ``AccountAnchor``
/// - ``AccountStorage``
public protocol AccountValues: AccountValuesCollection {
/// Builder pattern to build a container of this type.
typealias Builder = AccountValuesBuilder<Self>

/// The underlying storage repository.
var storage: AccountStorage { get }

Expand All @@ -53,6 +50,12 @@ public protocol AccountValues: AccountValuesCollection {
}


extension AccountValues {
/// Builder pattern to build a container of this type.
public typealias Builder = AccountValuesBuilder<Self>
}


extension AccountValues {
/// Default `Collection` implementation.
public var startIndex: Index {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,16 @@ extension BiographyKey {

##### Input Validation

Input validation relies on the `SpeziValidation` package.
```swift
// TODO: link to validation! whole section
```
Input validation relies on the [SpeziValidation](https://swiftpackageindex.com/StanfordSpezi/SpeziViews/documentation/spezivalidation) package.

`SpeziAccount` provides basic validation for most cases where necessary due to ``FieldValidationRules`` or ``AccountKeyRequirement`` configurations.
Still, you are required to evaluate to which extent validation has to be handled in your implementation.

* For all `String`-based types validation is automatically managed. Validation is either configured based on
the rules provided by the account service through ``FieldValidationRules`` or if the user specified a ``AccountKeyRequirement/required`` level.
If not using default components like `VerifiableTextField`, you need to visualize validation results yourself using the `ValidationEngine` in the
environment.
If not using default components like [`VerifiableTextField`](https://swiftpackageindex.com/stanfordspezi/speziviews/documentation/spezivalidation/verifiabletextfield)),
you need to visualize validation results yourself using the [`ValidationEngine`](https://swiftpackageindex.com/stanfordspezi/speziviews/documentation/spezivalidation/validationengine))
in the environment.
* For other types that use ``InitialValue/empty(_:)`` and are specified to be ``AccountKeyRequirement/required``,
validation is automatically set up to check if the user provided a value. For example given a `Date`-based account value, we would require that
the user modifies the Data at least once.
Expand Down

0 comments on commit 83f505c

Please sign in to comment.