Giter VIP home page Giter VIP logo

jacquard's Introduction

jacquard

https://circleci.com/gh/prophile/jacquard.svg?style=shield https://readthedocs.org/projects/jacquard-split/badge/?version=latest

Split-testing server.

Installation

Jacquard can be installed through pip:

pip install jacquard-split

Alternatively it can be built from GitHub.

Documentation

Full documentation is available in ReadTheDocs.

advice for hacking

Contributing

After cloning the repo you'll almost certainly want to install into a virtualenv in editable mode:

cd jacquard
pip install -e .

Since Jacquard requires a config file for all commands, you may also wish to export the JACQUARD_CONFIG environment variable, pointed at a suitable file.

cd jacquard
export JACQUARD_CONFIG=$PWD/config.cfg

If you're using virtualenvwrapper to manage your virtualenvs (and you probably want to be), and you've configured the virtualenv to cd to the project directory when it loads, then you can add the export line to your virtualenv's postactivate file to have it always available when you're working on Jacquard.

Running tests

Jacquard has good test coverage. A great way to check that you're up and running is to run the tests. Please ensure you also do this while developing new features as pull requests without tests (or with failing) are unlikely to be accepted.

Jacquard is tested with py.test, you can run the tests with:

python setup.py test

Linting

Jacquard uses flake8 for linting. You can install the requirements using:

pip install -r script/linting/requirements.txt

and run the linter with:

./script/linting/lint

Documenting

The docs are hosted on readthedocs and built using sphinx. The sphinx-argparse extension is also needed:

pip install sphinx sphinx-argparse
python setup.py build_sphinx

Pronounciating

Jacquard is usually pronounced in a typical English munging of the French: /'dʒæ kɑːd/ (Jack-ard). It can also be pronounced /'ʒa kaʁ/.

jacquard's People

Contributors

danpalmer avatar peteowlett avatar peterjclaw avatar prophile avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jacquard's Issues

Experiment data validation

Currently when experiments are loaded there is little to no validation on the JSON data entered. It should be gone through with a fine-toothed comb.

Better conflict validation when launching experiments

When launching experiments we should validate for any potential conflicts against current experiments.

Specifically:

  • Site area conflicts
  • Setting key conflicts

In the future it would also be good to check constraint conflicts for two experiments in the same site area, but that's not necessary for the first release.

Simplified plugin system

While being able to add plugins via the setuptools entry points mechanism is very general and good for plugins which can be installed by pip, it's not as good for simple customisation.

It would be good to have some kind of plugins section in the config file which specifies additional directories on the python path and entry points, something along the lines of:

[plugins]
pythonpath=/etc/jacquard/my_plugins

[plugins:storage_engines]
my_storage_engine=foo:StorageEngine

[plugins:directory_engines]
my_directory_engine=foo:DirectoryEngine

This probably involves a refactoring to abstract the current calls to pkg_resources.iter_entry_points.

Command names are becoming inconsistent

I added a couple of extra commands in #50, though I'm holding off suggesting that that be merged until we resolve the command naming issues it highlights. If we can't find a good solution soon-ish, it may be worth merging that ~now and fixing the names later, but I'm hoping that by discussing this now we can minimise the breakage needed.

Jacquard currently has the following commands:

  • list (lists experiments)
  • list-users
  • show $USER_ID (shows the given user's settings)

#50 adds:

  • list --detailed (which matches the current list behaviour, as #50 makes the default list output shorter)
  • show-experiment $EXPERIMENT_ID (shows the same details as list currently does, but for a single experiment only)

This leaves us with inconsistency around what list and show operate on and they both end up with companion list-users & show-experiment commands which have the same issue in reverse.

I think we should move towards consistency sooner (while Jacquard is 0.x) so we don't end up with a UI as bad as git has.

There are a couple of ways I think we could go:

  1. Replace the current commands with topic-based commands under new names:

    • experiments
    • experiment $ID
    • users
    • user $ID
      the advantages this has are:
    • (almost) completely new names minimise confusion
    • adding another class of thing can follow the same pattern without needing to become even more verbose
      A disadvantage is that this loses the imperative voice the commands currently all have. (I don't see this as a big deal since these commands are for display data only and make no changes to the system)
  2. Adapt the current commands into unambiguous names:

    • list-experiments
    • show-experiment $ID
    • list-users
    • show-user $ID
      These feel quite verbose, though are much clearer and retain the imperative tone.
      There's a minor concern about users taking longer to remember that show is now show-user (the closer things are, the longer I expect users will take to adapt), though if we're going to break it anyway for a better command in the longer term this is probably doesn't matter too much.

There's also a debate to be had about whether the other (non-conflicting) commands such as launch, override etc. should be disambiguated in a similar manner (to be launch-experiment etc.).

Command to list all experiments

Currently I find myself relying on storage-dump (a plumbing command) to find out what experiments exist.

There should be a porcelain CLI tool for this.

Experiment validation command

Would be useful to be able to run a commend which validates an experiment, possibly also asking it to highlight anything which would conflict with other known (and/or launched) experiments.

This could be useful in building tests for a repository of experiments.

Branch weighting

Ability to control what fraction of users goes into each branch.

Blocked on #19.

Branch-redistribution feature

Where an experiment has, say, three branches control, test 1 and test 2, and test 2 is evidently awful, it would be useful to redistribute all buckets assigned to test 2 evenly between control and test 1. This is statistically valid to do, but currently isn't possible with Jacquard.

Make `storage-flush` a little safer

storage-flush is currently a porcelain command which can immediately destroy the database. Especially after #66 this might be easy to do by accident. It's currently there so that you can empty the database and refill it with an import.

We should:

  1. Add a --flush argument to storage-import,
  2. Mark storage-flush as a plumbing command,
  3. Add a mandatory --force argument to storage-flush.

Worked example in docs

The docs are pretty vague about actually using the library: there should be a simple example of a program which actually uses the API.

Ability to clear overrides

It would be useful, both generally and specifically when concluding an experiment, to be able to clear overrides.

This breaks down into what may be separate cases:

  • clear all overrides for a given user
  • clear overrides for settings from a given experiment (for all users)

This would help ensure that users who have been overridden to some value can be restored to the "normal" experience easily.

Support etcd backend

Had a chat with you about this on Slack - it'd be great to get an etcd backend.

Show the settings an experiment will affect

This would be useful when editing the settings after loading an experiment in but before launching an experiment, particularly in environments where the loading of experiments is automated (for example by a Jenkins instance).

A way to stop and start experiments

It's common to stop an experiment due to bugs in the implementation and re-start it so as not to observe the behaviour of users encountering the bug. Usually we'd like to keep the grouping of users the same and not migrate users between conceptually what are the same experiments.

So as to preserve the requirement of keeping old experiments, one way to do this could be to designate an experiment as a successor to another, and to somehow preserve the bucketing of users between them.

Site area support

Flag experiments as being in different site areas. Two experiments in the same site area have to be checked for overlap.

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.