@@ -192,6 +192,18 @@ def create_flags(self):
192
192
self .virtual_card_issuance ()
193
193
print (" - F19 - API Support for Third-Party Applications" )
194
194
self .api_support_for_third_party_applications ()
195
+
196
+ # Temporary Feature Flags
197
+ print (" - T1 - Beta Dark Mode" )
198
+ self .beta_dark_mode ()
199
+ print (" - T2 - Experimental Payment Gateway" )
200
+ self .experimental_payment_gateway ()
201
+ print (" - T3 - Limited Time Offer Banner" )
202
+ self .limited_time_offer_banner ()
203
+ print (" - T4 - Early Access Feature Toggle" )
204
+ self .early_access_feature_toggle ()
205
+ print (" - T5 - Debugging Mode for Developers" )
206
+ self .debugging_mode_for_developers ()
195
207
196
208
print ("Done" )
197
209
self .flags_created = True
@@ -274,7 +286,7 @@ def run_ecommerce_collection_banner_funnel_experiment(self):
274
286
"production" ,
275
287
"Turn on flag for experiment" ,
276
288
)
277
- print (" - 09 - (Bayesian) Funnel Experiment: New Collection Promotion Banner" )
289
+ print (" - (Bayesian) Funnel Experiment: New Collection Promotion Banner" )
278
290
self .create_ecommerce_collection_banner_funnel_experiment ()
279
291
self .ldproject .start_exp_iteration ("new-collection-promotion-banner" , "production" )
280
292
print ("Done" )
@@ -306,7 +318,7 @@ def run_ecommerce_upsell_component_feature_experiment(self):
306
318
"production" ,
307
319
"Turn on flag for experiment" ,
308
320
)
309
- print (" - 10 - (Bayesian) Feature Experiment: Suggested Items Carousel" )
321
+ print (" - (Bayesian) Feature Experiment: Suggested Items Carousel" )
310
322
self .create_ecommerce_upsell_component_feature_experiment ()
311
323
self .ldproject .start_exp_iteration ("suggested-items-carousel" , "production" )
312
324
print ("Done" )
@@ -338,7 +350,7 @@ def run_ecommerce_shorten_collection_funnel_experiment(self):
338
350
"production" ,
339
351
"Turn on flag for experiment" ,
340
352
)
341
- print (" - 11 - (Frequentist) Funnel Experiment: New Shorten Collection Pages" )
353
+ print (" - (Frequentist) Funnel Experiment: New Shorten Collection Pages" )
342
354
self .create_ecommerce_shorten_collection_funnel_experiment ()
343
355
self .ldproject .start_exp_iteration ("new-shorten-collection-pages" , "production" )
344
356
print ("Done" )
@@ -370,7 +382,7 @@ def run_ecommerce_new_search_engine_feature_experiment(self):
370
382
"production" ,
371
383
"Turn on flag for experiment" ,
372
384
)
373
- print (" - 12 - (Frequentist) Feature Experiment: New Search Engine" )
385
+ print (" - (Frequentist) Feature Experiment: New Search Engine" )
374
386
self .create_ecommerce_new_search_engine_feature_experiment ()
375
387
self .ldproject .start_exp_iteration ("new-search-engine" , "production" )
376
388
print ("Done" )
@@ -501,6 +513,11 @@ def add_userid_to_flags(self):
501
513
res = self .ldproject .add_maintainer_to_flag ("merchantRewardsIntegration" )
502
514
res = self .ldproject .add_maintainer_to_flag ("virtualCardIssuance" )
503
515
res = self .ldproject .add_maintainer_to_flag ("apiSupportForThirdPartyApplications" )
516
+ res = self .ldproject .add_maintainer_to_flag ("betaDarkMode" )
517
+ res = self .ldproject .add_maintainer_to_flag ("experimentalPaymentGateway" )
518
+ res = self .ldproject .add_maintainer_to_flag ("limitedTimeOfferBanner" )
519
+ res = self .ldproject .add_maintainer_to_flag ("earlyAccessFeatureToggle" )
520
+ res = self .ldproject .add_maintainer_to_flag ("debuggingModeForDevelopers" )
504
521
505
522
# ############################################################################################################
506
523
@@ -1621,6 +1638,117 @@ def api_support_for_third_party_applications(self):
1621
1638
on_variation = 0 ,
1622
1639
off_variation = 1 ,
1623
1640
)
1641
+
1642
+ ############################################################################################################
1643
+ ############################################################################################################
1644
+
1645
+ ## Creating Temporary Feature Flags for the demo
1646
+ ## These flags are not used in the demo
1647
+
1648
+ def beta_dark_mode (self ):
1649
+ res = self .ldproject .create_flag (
1650
+ "betaDarkMode" ,
1651
+ "T1 - Beta: Dark Mode" ,
1652
+ "This feature flag will enable dark mode in ToggleBank" ,
1653
+ [
1654
+ {
1655
+ "value" : True ,
1656
+ "name" : "Enable Dark Mode"
1657
+ },
1658
+ {
1659
+ "value" : False ,
1660
+ "name" : "Disable Dark Mode"
1661
+ }
1662
+ ],
1663
+ tags = ["temporary" ],
1664
+ on_variation = 0 ,
1665
+ off_variation = 1 ,
1666
+ temporary = True
1667
+ )
1668
+
1669
+ def experimental_payment_gateway (self ):
1670
+ res = self .ldproject .create_flag (
1671
+ "experimentalPaymentGateway" ,
1672
+ "T2 - Experimental Payment Gateway" ,
1673
+ "This feature flag will enable experimental payment gateway in ToggleBank" ,
1674
+ [
1675
+ {
1676
+ "value" : True ,
1677
+ "name" : "Enable Experimental Payment Gateway"
1678
+ },
1679
+ {
1680
+ "value" : False ,
1681
+ "name" : "Disable Experimental Payment Gateway"
1682
+ }
1683
+ ],
1684
+ tags = ["temporary" ],
1685
+ on_variation = 0 ,
1686
+ off_variation = 1 ,
1687
+ temporary = True
1688
+ )
1689
+
1690
+ def limited_time_offer_banner (self ):
1691
+ res = self .ldproject .create_flag (
1692
+ "limitedTimeOfferBanner" ,
1693
+ "T3 - Limited Time Offer Banner" ,
1694
+ "This feature flag will enable limited time offer banner in ToggleBank" ,
1695
+ [
1696
+ {
1697
+ "value" : True ,
1698
+ "name" : "Enable Limited Time Offer Banner"
1699
+ },
1700
+ {
1701
+ "value" : False ,
1702
+ "name" : "Disable Limited Time Offer Banner"
1703
+ }
1704
+ ],
1705
+ tags = ["temporary" ],
1706
+ on_variation = 0 ,
1707
+ off_variation = 1 ,
1708
+ temporary = True
1709
+ )
1710
+
1711
+ def early_access_feature_toggle (self ):
1712
+ res = self .ldproject .create_flag (
1713
+ "earlyAccessFeatureToggle" ,
1714
+ "T4 - Early Access Feature Toggle" ,
1715
+ "This feature flag will enable early access feature toggle in ToggleBank" ,
1716
+ [
1717
+ {
1718
+ "value" : True ,
1719
+ "name" : "Enable Early Access Feature Toggle"
1720
+ },
1721
+ {
1722
+ "value" : False ,
1723
+ "name" : "Disable Early Access Feature Toggle"
1724
+ }
1725
+ ],
1726
+ tags = ["temporary" ],
1727
+ on_variation = 0 ,
1728
+ off_variation = 1 ,
1729
+ temporary = True
1730
+ )
1731
+
1732
+ def debugging_mode_for_developers (self ):
1733
+ res = self .ldproject .create_flag (
1734
+ "debuggingModeForDevelopers" ,
1735
+ "T5 - Debugging Mode for Developers" ,
1736
+ "This feature flag will enable debugging mode for developers in ToggleBank" ,
1737
+ [
1738
+ {
1739
+ "value" : True ,
1740
+ "name" : "Enable Debugging Mode for Developers"
1741
+ },
1742
+ {
1743
+ "value" : False ,
1744
+ "name" : "Disable Debugging Mode for Developers"
1745
+ }
1746
+ ],
1747
+ tags = ["temporary" ],
1748
+ on_variation = 0 ,
1749
+ off_variation = 1 ,
1750
+ temporary = True
1751
+ )
1624
1752
1625
1753
############################################################################################################
1626
1754
############################################################################################################
0 commit comments