mourningsun75 / openmoves

An open source alternative to Movescount

Home Page:http://www.openmoves.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Coverage Status

OpenMoves

An open source alternative to Movescount.

Key features

  • Free and open-source software
  • OpenStreetMap integration
  • Plots with curve smoothing

Requirements

Setup

# 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]

Configuration

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

Running

# ./openmoves.py runserver
* Running on http://127.0.0.1:5000/

Open http://127.0.0.1:5000/ in your browser.

Testing

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:

http://127.0.0.1:5000/_tests

Hints or pull requests how to automate the qunit tests are welcome.

Deployment

We ship the openmoves.wsgi script to deploy OpenMoves in a Apache HTTP server with mod_wsgi.

PostgreSQL

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>

About

An open source alternative to Movescount

http://www.openmoves.net

License:MIT License


Languages

Language:Python 45.7%Language:JavaScript 31.3%Language:HTML 19.2%Language:CSS 3.6%Language:Mako 0.1%