{"id":19387444,"url":"https://github.com/quentinroy/lightmill","last_synced_at":"2025-08-16T22:34:16.524Z","repository":{"id":53670192,"uuid":"95103703","full_name":"QuentinRoy/LightMill","owner":"QuentinRoy","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-02T06:12:40.000Z","size":395,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-24T18:55:26.771Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/QuentinRoy.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-22T10:25:35.000Z","updated_at":"2020-09-02T13:47:23.000Z","dependencies_parsed_at":"2023-02-17T15:01:06.047Z","dependency_job_id":null,"html_url":"https://github.com/QuentinRoy/LightMill","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/QuentinRoy/LightMill","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuentinRoy%2FLightMill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuentinRoy%2FLightMill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuentinRoy%2FLightMill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuentinRoy%2FLightMill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QuentinRoy","download_url":"https://codeload.github.com/QuentinRoy/LightMill/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuentinRoy%2FLightMill/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270781200,"owners_count":24643805,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T10:09:15.459Z","updated_at":"2025-08-16T22:34:16.502Z","avatar_url":"https://github.com/QuentinRoy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LightMill\n\n_LightMill_ is a user experiment web server used to manage and log experiments running in browsers.\nIt uses [TouchStone](https://www.lri.fr/~appert/website/touchstone/touchstone.html)'s design files\nand provides a web interface to monitor an ongoing experiment. The touchstone design platform\ncan be downloaded from [here](https://github.com/jdfekete/touchstone-platforms/tree/master/design-platform).\n\n## Make it run!\n\n```shell\n./configure.sh\n./start.sh\n```\n\nYou need a python 3.7 interpreter and `virtualenv` installed. If\n`virtualenv` is unfound, you can install it with `easy_install virtualenv`.\n`virtualenv` ensures the project's dependencies are installed locally and\ndo not pollute your python global libraries.\n\nYou can then access the web interface from `localhost` on the\ncorresponding port.\n\nThe experiment described in `experiment.xml` at the root folder will be\nautomatically imported into the database at server startup (if not\nalready in). You can also specify another experiment design path with\nthe `--experiment-design` command line option.\n\n## Build Your experiment\n\n[`lightmill-runner`](https://github.com/QuentinRoy/lightmill-js/tree/master/packages/lightmill-runner) is a JavasCript library that is used to interface your experiment application with `LightMill`.\n\nAdditionally [`lightmill-app`](https://github.com/QuentinRoy/lightmill-js/tree/master/packages/lightmill-app) provides a set of standard views such as `blockInit` or `end` for you to use in your application.\n\n## Grab the results!\n\nThe trial results can be downloaded from the bottom of the experiment page from web API.\n\nCurrently, the only way to export the event logs is by using the\n`./export.sh` script (slow and hopefully deprecated soon).\n\n## Locked run\n\nTo avoid concurrent update, client needs to acquire a lock to register\ntrial results for a run.\nWhen a run is locked, it cannot be acquired again.\n\nYou can manually unlock a run by going on the run page from the web\ninterface and by clicking on the lock icon. This can be useful if a\nclient crashed and a new lock needs to be acquired to continue the\nexperiment. However, doing so will most likely result in an error for an\nongoing client.\n\nThe lock protection can be lifted using the `--unprotected-runs` command line argument.\nThis is useful during the development of experiment clients.\nHowever this option allows a client to \"steal\" the run of another and thus, it is unsafe when\nrunning the actual experiment and should never be used in production.\n\n## Other options?\n\n```shell\n./start.sh --help\n```\n\n## Run with docker\n\nA docker file is provided to create a docker image that can be used both to create\nthe server and grab the results.\n\n### Creating the image\n\n```sh\ndocker build -t lightmill .\n```\n\n### Starting the server\n\n```sh\ndocker run \\\n  --mount source=lightmill,target=/data \\\n  -dp 5000:80 \\\n  --name lightmill_server \\\n  lightmill start.py\n```\n\nNote: this is using the \"lightmill\" volume to store the data.\nIt is automatically managed by docker. It needs to be defined if you want to get the data back.\n\n### Grab the results\n\n```sh\ndocker run --mount source=lightmill,target=/data lightmill export.py\ndocker cp lightmill_server:/data/export ./export\n```\n\nNote: the lightmill_server container must exist for this to work.\n\n### Backup the database\n\n```sh\ndocker cp lightmill:/data/experiments.db .\n```\n\n### Clear the data\n\nOnce the experiment is finished, you may want to remove the volume allocated by\ndocker to free up some space.\n\n```sh\ndocker volume rm lightmill\n```\n\n## API\n\nTODO\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquentinroy%2Flightmill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquentinroy%2Flightmill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquentinroy%2Flightmill/lists"}