An open source alternative to Movescount.
- Free and open-source software
- OpenStreetMap integration
- Plots with curve smoothing
- Python 2.7, 3.3 or 3.4
- virtualenv
- pip (package manager)
# cp openmoves.cfg.default openmoves.cfg
# virtualenv virtualenv
# source virtualenv/bin/activate
# pip install -r requirements.txt
# ./openmoves.py add-user -u <your_username> [-p <your_password]
Options and parameters of openmoves.cfg
:
- BING_MAPS_API_KEY Bing maps API key. If not configured the Bing maps layers are disabled. Get your own key at https://www.bingmapsportal.com
- SQLALCHEMY_DATABASE_URI Database URL to be used
# ./openmoves.py runserver
* Running on http://127.0.0.1:5000/
Open http://127.0.0.1:5000/
in your browser.
We use py.test
to test server side code. Tests are executed with the following command given that your virtualenv is activated:
# py.test
If a test fails it might help to run in verbose mode and stop on the first failure:
# py.test -vsx
Note that the majority of unit tests write the latest HTML response to a local tempfile in /tmp/pytest-<your-username>/response.html
using py.test's tmpdir
mechansism.
JavaScript unit tests are written with QUnit and are not yet automated in the build and need to be run in a browser by browsing to:
Hints or pull requests how to automate the qunit tests are welcome.
We ship the openmoves.wsgi
script to deploy OpenMoves in a Apache HTTP server with mod_wsgi
.
While OpenMoves uses an on-disk SQLite database by default, we recommend to deploy OpenMoves on a proper database such as PostgreSQL.
First create a database and login role.
Then overwrite the openmoves default database url in the openmoves.cfg
file:
SQLALCHEMY_DATABASE_URI = 'postgresql://<user>:<password>@localhost:5432/<database>'
Then create/upgrade the database schema with:
# ./openmoves.py db upgrade
Create an initial user:
# ./openmoves.py add-user -u <your_username>