-
Notifications
You must be signed in to change notification settings - Fork 214
feat(predictions): No-Light/FaceMovementOnly challenge support #3622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
22e02fa
to
41505e0
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3622 +/- ##
==========================================
+ Coverage 67.69% 67.75% +0.05%
==========================================
Files 1128 1131 +3
Lines 52468 52603 +135
==========================================
+ Hits 35519 35639 +120
- Misses 16949 16964 +15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
41505e0
to
1a5386d
Compare
1a5386d
to
4815461
Compare
API Breakage Report✅ No Public API Breaking Change detected |
…ort (#3617) * feat(predictions): add public definitions for no light challenge support * Add missing files * fix swiftlint issue * feat(predictions): add implementation for no light support (#3618) * feat(predictions): add implementation for no light support * fix swiftlint issue * address review comments * address review comments * address review comments
* chore(predictions): add attempt count changes and unit tests * remove test url * Add coding keys for Challenge object
614be62
to
ae1d96a
Compare
|
||
@_spi(PredictionsFaceLiveness) | ||
public struct Challenge: Codable { | ||
public let version: String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be an enum instead? Easy to compare and switch over if need.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this suggestion based on how the following was built:
public static let supportedChallenges: [Challenge] = [
Challenge(version: "2.0.0", type: .faceMovementAndLightChallenge),
Challenge(version: "1.0.0", type: .faceMovementChallenge)
]
public let colorChallenge: ColorChallenge | ||
public let colorChallenge: ColorChallenge? | ||
public let ovalMatchChallenge: OvalMatchChallenge | ||
|
||
public init(colorChallenge: ColorChallenge, ovalMatchChallenge: OvalMatchChallenge) { | ||
public init( | ||
colorChallenge: ColorChallenge? = nil, | ||
ovalMatchChallenge: OvalMatchChallenge | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: My personal opinion would be to avoid optionals as much as we can and use enums/protocols instead. Keeps thing simple and no null guessing game that we need to play.
Issue #
None
Description
Changes for No-Light/FaceMovementOnly challenge support
General Checklist
Given When Then
inline code documentation and are named accordinglytestThing_condition_expectation()
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.