-
Notifications
You must be signed in to change notification settings - Fork 33
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
implement experiment manager #1066
Conversation
Hey @SabrinaTardio, Before I start actually reviewing it, one thing that stands out to me is unnecessarily coupling with UserDefaults - hence we need to mock them in unit tests. Can we instead just protocolize Storing, and so the implementation of storing uses UserDefaults for real life cases and in tests we use in-memory storage. Please see the implementation of UserBehaviorMonitor + UserBehaviorMonitorTests in BSK or BrokenSitePromptLimiter + BrokenSitePromptLimiterTests. |
I thought about it but seemed a bit of an overkill since we can still test but happy to add a Storing class… I was in two minds anyway |
Sources/BrowserServicesKit/PrivacyConfig/ExperimentCohortsManager.swift
Outdated
Show resolved
Hide resolved
Sources/BrowserServicesKit/PrivacyConfig/ExperimentCohortsManager.swift
Outdated
Show resolved
Hide resolved
Sources/BrowserServicesKit/PrivacyConfig/ExperimentCohortsManager.swift
Outdated
Show resolved
Hide resolved
Sources/BrowserServicesKit/PrivacyConfig/ExperimentCohortsManager.swift
Outdated
Show resolved
Hide resolved
Sources/BrowserServicesKit/PrivacyConfig/ExperimentsDataStore.swift
Outdated
Show resolved
Hide resolved
Sources/BrowserServicesKit/PrivacyConfig/PrivacyConfigurationData.swift
Outdated
Show resolved
Hide resolved
Sources/BrowserServicesKit/PrivacyConfig/PrivacyConfigurationData.swift
Outdated
Show resolved
Hide resolved
Tests/BrowserServicesKitTests/PrivacyConfig/ExperimentCohortsManagerTests.swift
Outdated
Show resolved
Hide resolved
Tests/BrowserServicesKitTests/PrivacyConfig/ExperimentCohortsManagerTests.swift
Outdated
Show resolved
Hide resolved
Sources/BrowserServicesKit/PrivacyConfig/PrivacyConfigurationData.swift
Outdated
Show resolved
Hide resolved
Sources/BrowserServicesKit/PrivacyConfig/ExperimentsDataStore.swift
Outdated
Show resolved
Hide resolved
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.
LGTM
* main: implement experiment manager (#1066)
Please review the release process for BrowserServicesKit here.
Required:
Task/Issue URL: https://app.asana.com/0/1204186595873227/1208687542689224/f
iOS PR: duckduckgo/macos-browser#3531
macOS PR: duckduckgo/macos-browser#3531
What kind of version bump will this require?: Minor
Optional:
Tech Design URL: https://app.asana.com/0/481882893211075/1208680035673275/f
CC:
Description: Implements the ExperimentCohortManager according to the TechDesign
Steps to test this PR:
OS Testing:
Internal references:
Software Engineering Expectations
Technical Design Template