1e9db9b4b1 | ||
---|---|---|
app | ||
nginx | ||
scripts | ||
.env.circle | ||
.env.sample | ||
.gitignore | ||
LICENSE | ||
Makefile | ||
README.md | ||
circle.yml | ||
docker-compose.yml | ||
docker-compose.yml.circleci |
README.md
Experimenter
Experimenter is a Python/Django application for managing experiments in Mozilla projects, such as Activity Stream.
What is an experiment?
An experiment is a way to measure how a change to an application will affect its usage and behaviour. For example you could change the way your application processes data in a way that affects its performance characteristics, as well as how it presents that data to the user. To make that change into an experiment, you could create a flag which optionally enables the new code path, and then enable it for a subset of users and measure how it affects things like performance and engagement.
Installation
-
Install docker on your machine
-
Clone the repo
git clone <your fork>
-
Copy the sample env file
cp .env.sample .env
-
Create a new secret key and put it in .env
make secretkey
-
Run tests
make test
Done!
Usage
Experimenter uses docker for all development, testing, and deployment.
The following helpful commands have been provided via a Makefile:
build
Build the application container by executing the build script
compose_build
Build the supporting services (nginx, postgresql) defined in the compose file
up
Start a dev server listening on port 80 using the Django runserver
test
Run the Django test suite with code coverage
lint
Run flake8 against the code
check
Run both test and lint
migrate
Apply all django migrations
shell
Start an ipython shell inside the container (this lets you import and test code, interact with the db, etc)
bash
Start a bash shell inside the container (this lets you interact with the containerized filesystem)
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
License
Experimenter uses the Mozilla Public License