Skip to main content

No project description provided

Project description

Store your GPX tracks of your running (or other sports activity) in django.

It’s currently experimental … Pre-Alpha state…

Build Status on travis-ci.org

travis-ci.org/jedie/django-for-runners

Coverage Status on codecov.io

codecov.io/gh/jedie/django-tools

Coverage Status on coveralls.io

coveralls.io/r/jedie/django-for-runners

Status on landscape.io

landscape.io/github/jedie/django-for-runners/master

Screenshots

v0.1.1 2018-6-15

for-runners v0.1.1 2018-6-15 GPX Track.png

v0.0.1 2018-5-30

for-runners v0.0.1 2018-5-30 change list.png

for-runners v0.0.1 2018-5-30 change GPX Track.png

try-out

e.g.:

# create a python virtualenv:
~$ python3 -Im venv DjangoForRunnersEnv

# activate the created virtualenv:
~$ cd DjangoForRunnersEnv/
~/DjangoForRunnersEnv$ source bin/activate

# Upgrate pip:
(DjangoForRunnersEnv) ~/DjangoForRunnersEnv$ pip3 install --upgrade pip

# install django-for-runners:
(DjangoForRunnersEnv) ~/DjangoForRunnersEnv$ pip3 install -e git+https://github.com/jedie/django-for-runners.git@master#egg=django_for_runners

# install dependencies:
(DjangoForRunnersEnv) ~/DjangoForRunnersEnv$ cd src/django-for-runners/
(DjangoForRunnersEnv) ~/DjangoForRunnersEnv/src/django-for-runners$ pip install -r requirements/tests.txt

start the development server, e.g.:

# activate the virtualenv:
~$ cd DjangoForRunnersEnv/
~/DjangoForRunnersEnv$ source bin/activate

# start server:
(DjangoForRunnersEnv) ~/DjangoForRunnersEnv$ cd src/django-for-runners/
(DjangoForRunnersEnv) ~/DjangoForRunnersEnv/src/django-for-runners$ ./run_test_project_dev_server.sh

import GPX files, e.g.:

# activate the virtualenv:
~$ cd DjangoForRunnersEnv/
~/DjangoForRunnersEnv$ source bin/activate

# import:
(DjangoForRunnersEnv) ~/DjangoForRunnersEnv$ cd src/django-for-runners/
(DjangoForRunnersEnv) ~/DjangoForRunnersEnv/src/django-for-runners$ ./manage.py import_gpx --username <username> ~/backups/gpx_files

run tests

# activate the virtualenv:
~$ cd DjangoForRunnersEnv/
~/DjangoForRunnersEnv$ source bin/activate

# import:
(DjangoForRunnersEnv) ~/DjangoForRunnersEnv$ cd src/django-for-runners/
(DjangoForRunnersEnv) ~/DjangoForRunnersEnv/src/django-for-runners$ ./setup.py test

Note:

To run all tests, you need:

  • Chromium Browser WebDriver e.g.: apt install chromium-chromedriver

  • Firefox Browser WebDriver aka geckodriver

install geckodriver e.g.:

~$ cd /tmp
/tmp$ wget https://github.com/mozilla/geckodriver/releases/download/v0.20.1/geckodriver-v0.20.1-linux64.tar.gz -O geckodriver.tar.gz
/tmp$ sudo sh -c 'tar -x geckodriver -zf geckodriver.tar.gz -O > /usr/bin/geckodriver'
/tmp$ sudo chmod +x /usr/bin/geckodriver
/tmp$ rm geckodriver.tar.gz
/tmp$ geckodriver --version
geckodriver 0.20.1
...

some notes

GPX storage

Currently we store the unchanged GPX data in a TextField.

Precision of coordinates

GPX files from Garmin (can) contain:

  • latitude with 29 decimal places

  • longitude with 28 decimal places

  • elevation with 19 decimal places

The route on OpenStreetMap does not look more detailed, with more than 5 decimal places.

See also: https://wiki.openstreetmap.org/wiki/Precision_of_coordinates

Django compatibility

django-for-runners

Django CMS

django version

python

v0.x.x

3.4.x TLS

1.11 TLS

3.5, 3.6

(See also combinations in .travis.yml and tox.ini)

Note: Maps can’t generated with Python 3.5 (Geotiler needs Python 3.6 or later)

TODO:

  • Add real tests

  • Support Django CMS v3.5 and run tests against these versions.

  • Support Django v2.0 and run tests against these versions.

history

credits

The whole thing is based on many excellent projects. Especially the following:

donation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-for-runners-0.1.1.tar.gz (194.5 kB view hashes)

Uploaded Source

Built Distributions

django_for_runners-0.1.1-py3.6.egg (188.8 kB view hashes)

Uploaded Source

django_for_runners-0.1.1-py2.py3-none-any.whl (190.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page