GithubHelp home page GithubHelp logo

multipreffer's Introduction

Multipreffer

  • Allows defining a set of prefs per SHIELD branch, and sets them at install and cleans them up upon uninstall.
  • Pref values are set on the default branch. User values are preserved.

The prefs to be set should be defined in src/variations.json, following this scheme:

{
  "branch 1": { // Name of branch
    "weight": 1, // Weight determines relative chance of getting assigned to this branch
    "prefs": { // Prefs and values to set upon install
      "pref1": "string1",
      "pref2": true,
      "pref3": 99
    }
  },

  [...]
}

[WIP] Process to develop a multipreffer-based study

TODO: streamline, automate.

  1. Make a copy of the repo
  2. Update metadata in src/manifest.json and package.json
  3. Update abort and branch_name prefs
  4. Define branches and target prefs/values in src/variations.json
  5. npm install
  6. npm run build
  7. npm run test

If the tests pass, should be good to go! Build is in dist/ - upload to the study bug for signing.

multipreffer's People

Contributors

mythmon avatar nhnt11 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

multipreffer's Issues

Support a "post-experiment" set of prefs

Currently multipreffer caches the existing values of prefs before setting cohort values. But if a pref doesn't already exist, it's hard to know what to do at cleanup because default branch prefs can't be deleted. So it tries to set a false-y value depending on the type.

Maybe we can support a post-experiment cohort that lets the developer define what values to set at cleanup (these will last until a firefox restart)

add prefhelper

in recent studies we've used "prefhelper" WEE to leave a breadcrumb with the experiment name and branch, as well as for an "aborted" pref. Should we bring this into the default build of multipreffert? And if we do, can we make the pref names auto-generated based off of the name in the manifest?

Make a script to automate creation of multipreffer studies

Currently we need to create forks of the repo for every study. Instead, we should convert this repo into a "factory" rather than a template, and have a build script which accepts a config (addon name/descreption/id) and generates an add-on ready for signing.

This would eliminate the need for code review. Maybe we can extend variations.json to become the "config" file.

increase expiry to 365 days

We are using 365 days in all experiments based on this since the expiry within multipreffer does not actually work. This should be updated and noted here (until we manage to no longer depend on shield-utils).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.