JGonera has uploaded a new change for review. https://gerrit.wikimedia.org/r/75992
Change subject: Update readme ...................................................................... Update readme Describe how to install dependencies. Change-Id: I92b27a5de9daf6d5cb76ab5d2d99392c1adecf31 --- M README.md 1 file changed, 59 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-mobile-data refs/changes/92/75992/1 diff --git a/README.md b/README.md index 564e110..37b4f39 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,65 @@ -**Note**: Very rudimentary and slightly mobile specific. Eventually stuff will be refactored out of here to be a generic thing that everyone doing EL -> Limn can use +**Note**: Very rudimentary and slightly mobile specific. Eventually stuff will +be refactored out of here to be a generic thing that everyone doing EL -> Limn +can use + + +## Installing dependencies + +You will need [Limn](https://github.com/wikimedia/limn) itself. + +To run the `generate.py` script you should create a Python virtualenv, activate +it and install all the required dependencies: + + $ virtualenv env + $ source env/bin/activate + $ pip install -r requirements.txt + +After that, every time when you want to run `generate.py` you only need to +activate the virtualenv with all the dependencies already installed by running +`source env/bin/activate`. + +Later you need to link the data directory to the Limn instance. Assuming that +you have Limn cloned to `~/limn` and this project to `~/limn-mobile-data`, +you will need to run the following command (only once): + + $ cd ~/limn + $ coke --vardir ./var --data ../limn-mobile-data --to mobile link_data + +Then you should be able to start Limn by running `npm start` and see it in +action at `http://localhost:8081`. + + +## Testing using local data + +By default the instance you run will show graphs using production data. + +TODO: ssh tunnel, sed scripts + + +### Mac OS X + +You will need to install some header files for some of the Python dependencies +to compile. To do that it's best if you install MySQL and libyaml using +Homebrew: + + $ brew install mysql + $ brew install libyaml + +### Ubuntu + +On Ubuntu the following does the trick: + + $ sudo apt-get install libmysqlclient-dev libyaml-dev + + ## Adding your own Graphs (Specific to Mobile right now, limitation will be removed *soon*) -- Write an SQL Query that returns data in the appropriate format, and place it in `mobile/<name>.sql` +- Write an SQL Query that returns data in the appropriate format, and place it + in `mobile/<name>.sql` - Add `<name>` to appropriate position in `dashboards/reportcard.json` -- Run `generate.py mobile` to generate required metadata *and* data +- Run `generate.py mobile` to generate required metadata *and* data (run + `generate.py -h` for details) - Deploy to limn! (Ask analytics to get you access) + -- To view, visit https://gerrit.wikimedia.org/r/75992 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I92b27a5de9daf6d5cb76ab5d2d99392c1adecf31 Gerrit-PatchSet: 1 Gerrit-Project: analytics/limn-mobile-data Gerrit-Branch: master Gerrit-Owner: JGonera <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
