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…
Screenshots
v0.1.1 2018-6-15
v0.0.1 2018-5-30
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
-
a few bugfixes
-
Render interactive OpenStreetMap track map with Leaflet JS
-
Better Events model
GPX error handling
more tests
Bugfix for Python 3.5 (Geotiler needs Python 3.6 or later)
-
display min/average/max heart rate
use autotask to generate the MAP in background
-
generate SVG ‘icon’ from GPX track
v0.0.1 - 30.05.2018
Just create a pre-alpha release to save the PyPi package name ;)
links
Homepage |
|
PyPi |
alternatives (OpenSource only)
credits
The whole thing is based on many excellent projects. Especially the following:
gpxpy GPX file parser
Leaflet JS A JS library for interactive maps used to render the track on OpenStreetMap
geotiler Generate streetmap images
geopy Get geo location names of the GPX track start/end point
matplotlib plotting 2D graphics
autotask schedule background jobs
svgwrite Generating SVG file
donation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for django_for_runners-0.1.1-py3.6.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5ff4a306eaafb8691b83a6367e434da1b9321029235543031471afce270c30e |
|
MD5 | 5e1139e2a2197279257a38c2040c8e63 |
|
BLAKE2b-256 | c441e6592bbc7d4a0d4b55ce0717a72b9c8869e311c5a937b2d461b88ff2e2e0 |
Hashes for django_for_runners-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb60aac1caca3eed5a88f109f72d305a93373d8d0f9574ad5ce783acfa0d090c |
|
MD5 | 8966238fccf2674222675e2869609cba |
|
BLAKE2b-256 | dec1884d72b4c7a7bd620c04ec8bf225c282c43cb15985a61d2c54c92dc5ba77 |