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
for-runners v0.2.0 2018-6-21 Change GPX Track.png
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
-
Display elevations, heart_rates and cadence_values if available
Add kilometer markers to OpenStreetMap
-
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)
https://github.com/pytrainer/pytrainer (Desktop Program)
https://github.com/GoldenCheetah/GoldenCheetah/ (Desktop Program)
Online tools:
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.2.0-py3.6.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c5323865a1fcd3ee5f96375090d91ebb14b6d2872ce86a63bce5cf4975b47a5 |
|
MD5 | ab15c26f1d15fc338273db3d398014e6 |
|
BLAKE2b-256 | e36ac6b269e1152a656a99e5d7faf66a4f0a9aac7a1682c3d8afaf61cf26a05f |
Hashes for django_for_runners-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79146d9e6ddb4e55e75d009c259f003e131a4decf864ed6d00dde1fb6850054a |
|
MD5 | 543d0b86c587525338352a87cc4c4370 |
|
BLAKE2b-256 | 54528bf48f407d2d4fa79d47aaf51be9a6cec677158a53e53ebff0460900a0b0 |