Merge branch 'release/v20.0.0'
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -67,4 +67,6 @@ config.yaml
|
||||
/venv39/
|
||||
/py27/
|
||||
/py2/
|
||||
/py38/
|
||||
/py39/
|
||||
/django2/
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
from django.apps import AppConfig
|
||||
import os
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
class BoatmoversConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'boatmovers'
|
||||
path = os.path.join(settings.BASE_DIR, 'boatmovers')
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
# Generated by Django 3.2.12 on 2022-06-22 17:41
|
||||
|
||||
import boatmovers.models
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Athlete',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('first_name', models.CharField(max_length=200)),
|
||||
('last_name', models.CharField(max_length=200)),
|
||||
('club', models.CharField(max_length=200)),
|
||||
('trueskill_mu', models.FloatField(default=25.0)),
|
||||
('trueskill_sigma', models.FloatField(default=8.333)),
|
||||
('birth_year', models.IntegerField(default=1972)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Crew',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=200)),
|
||||
('athletes', models.ManyToManyField(to='boatmovers.Athlete')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Race',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('date', models.DateField(default=boatmovers.models.current_day)),
|
||||
('crew_size', models.IntegerField(default=1)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Result',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('order', models.PositiveIntegerField()),
|
||||
('crew', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='boatmovers.crew')),
|
||||
('race', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='boatmovers.race')),
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='race',
|
||||
name='resultlist',
|
||||
field=models.ManyToManyField(through='boatmovers.Result', to='boatmovers.Crew'),
|
||||
),
|
||||
]
|
||||
@@ -1,17 +0,0 @@
|
||||
# Generated by Django 3.2.12 on 2022-06-22 17:49
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('boatmovers', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterUniqueTogether(
|
||||
name='athlete',
|
||||
unique_together={('first_name', 'last_name', 'birth_year')},
|
||||
),
|
||||
]
|
||||
@@ -1,28 +0,0 @@
|
||||
# Generated by Django 3.2.12 on 2022-06-22 17:53
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('boatmovers', '0002_alter_athlete_unique_together'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='race',
|
||||
name='name',
|
||||
field=models.CharField(default='Race1', max_length=200),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='race',
|
||||
name='resulturl',
|
||||
field=models.URLField(null=True),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='race',
|
||||
unique_together={('date', 'name')},
|
||||
),
|
||||
]
|
||||
@@ -1,22 +0,0 @@
|
||||
# Generated by Django 3.2.12 on 2022-06-22 18:35
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('boatmovers', '0003_auto_20220622_1753'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='race',
|
||||
name='verified',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='result',
|
||||
unique_together={('crew', 'race', 'order')},
|
||||
),
|
||||
]
|
||||
@@ -1,19 +0,0 @@
|
||||
# Generated by Django 3.2.12 on 2022-06-22 18:48
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('boatmovers', '0004_auto_20220622_1835'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='athlete',
|
||||
name='gender',
|
||||
field=models.CharField(choices=[('m', 'M'), ('f', 'F')], default='m', max_length=200),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
||||
@@ -1,23 +0,0 @@
|
||||
# Generated by Django 3.2.12 on 2022-06-24 08:11
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('boatmovers', '0005_athlete_gender'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='athlete',
|
||||
name='trueskill_exposed',
|
||||
field=models.FloatField(default=0),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='athlete',
|
||||
name='trueskill_sigma',
|
||||
field=models.FloatField(default=8.333333333333334),
|
||||
),
|
||||
]
|
||||
@@ -1,24 +0,0 @@
|
||||
# Generated by Django 3.2.12 on 2022-06-24 08:20
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('boatmovers', '0006_auto_20220624_0811'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='result',
|
||||
name='crew',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='results', to='boatmovers.crew'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='result',
|
||||
name='race',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='results', to='boatmovers.race'),
|
||||
),
|
||||
]
|
||||
@@ -1,23 +0,0 @@
|
||||
# Generated by Django 3.2.12 on 2022-06-24 11:35
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('boatmovers', '0007_auto_20220624_0820'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='race',
|
||||
name='processed',
|
||||
field=models.BooleanField(default=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='race',
|
||||
name='crew_size',
|
||||
field=models.IntegerField(default=1, verbose_name='Nr of rowers per crew (1, 2, 4, 8)'),
|
||||
),
|
||||
]
|
||||
@@ -1,18 +0,0 @@
|
||||
# Generated by Django 3.2.12 on 2022-06-24 12:48
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('boatmovers', '0008_auto_20220624_1135'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='race',
|
||||
name='crew_size',
|
||||
field=models.IntegerField(choices=[(1, 1), (2, 2), (4, 4), (8, 8)], default=1, verbose_name='Nr of rowers per crew (1, 2, 4, 8)'),
|
||||
),
|
||||
]
|
||||
@@ -1,17 +0,0 @@
|
||||
# Generated by Django 3.2.12 on 2022-06-24 12:50
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('boatmovers', '0009_alter_race_crew_size'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='race',
|
||||
name='resultlist',
|
||||
),
|
||||
]
|
||||
@@ -1,18 +0,0 @@
|
||||
# Generated by Django 3.2.12 on 2022-06-24 12:53
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('boatmovers', '0010_remove_race_resultlist'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='race',
|
||||
name='processed',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
]
|
||||
@@ -1,33 +0,0 @@
|
||||
# Generated by Django 3.2.12 on 2022-06-25 13:28
|
||||
|
||||
import boatmovers.models
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('boatmovers', '0011_alter_race_processed'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='crew',
|
||||
name='athletes',
|
||||
field=models.ManyToManyField(related_name='crews', to='boatmovers.Athlete'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='race',
|
||||
name='date',
|
||||
field=models.DateField(default=boatmovers.models.current_day, verbose_name='Race Date'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='race',
|
||||
name='resulturl',
|
||||
field=models.URLField(null=True, verbose_name='URL Link to results'),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='result',
|
||||
unique_together={('crew', 'order')},
|
||||
),
|
||||
]
|
||||
@@ -1,18 +0,0 @@
|
||||
# Generated by Django 3.2.12 on 2022-06-25 13:31
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('boatmovers', '0012_auto_20220625_1328'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='crew',
|
||||
name='athletes',
|
||||
field=models.ManyToManyField(related_name='athlete_crews', to='boatmovers.Athlete'),
|
||||
),
|
||||
]
|
||||
@@ -1,18 +0,0 @@
|
||||
# Generated by Django 3.2.12 on 2022-06-29 15:45
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('boatmovers', '0013_alter_crew_athletes'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='athlete',
|
||||
name='dummy',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
]
|
||||
@@ -1,17 +0,0 @@
|
||||
# Generated by Django 3.2.12 on 2022-06-29 17:44
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('boatmovers', '0014_athlete_dummy'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterUniqueTogether(
|
||||
name='athlete',
|
||||
unique_together={('first_name', 'last_name', 'birth_year', 'gender')},
|
||||
),
|
||||
]
|
||||
@@ -1,18 +0,0 @@
|
||||
# Generated by Django 3.2.12 on 2022-06-29 18:23
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('boatmovers', '0015_alter_athlete_unique_together'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='race',
|
||||
name='gender',
|
||||
field=models.CharField(choices=[('m', 'M'), ('f', 'F')], default='m', max_length=200),
|
||||
),
|
||||
]
|
||||
@@ -1,19 +0,0 @@
|
||||
# Generated by Django 3.2.12 on 2022-07-08 12:37
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('boatmovers', '0016_race_gender'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='athlete',
|
||||
name='full_name',
|
||||
field=models.CharField(default=' ', max_length=200),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
||||
8
django_extensions/apps.py
Normal file
8
django_extensions/apps.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from django.apps import AppConfig
|
||||
import os
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
class DjangoExtensionsConfig(AppConfig):
|
||||
name = 'django_extensions'
|
||||
path = os.path.join(settings.BASE_DIR, 'django_extensions')
|
||||
413
requirements38.txt
Normal file
413
requirements38.txt
Normal file
@@ -0,0 +1,413 @@
|
||||
amqp==5.0.7
|
||||
anyio==3.4.0
|
||||
apipkg==1.5
|
||||
appdirs==1.4.3
|
||||
arcgis==1.6.0
|
||||
argon2-cffi==21.3.0
|
||||
argon2-cffi-bindings==21.2.0
|
||||
arrow==1.0.2
|
||||
asgiref==3.4.1
|
||||
asn1crypto==0.24.0
|
||||
<<<<<<< HEAD
|
||||
atomicwrites==1.3.0
|
||||
attrs==19.1.0
|
||||
=======
|
||||
astroid==2.11.7
|
||||
async-generator==1.10
|
||||
atomicwrites==1.3.0
|
||||
attrs==21.4.0
|
||||
autopep8==1.6.0
|
||||
>>>>>>> feature/py39
|
||||
Babel==2.9.1
|
||||
backcall==0.1.0
|
||||
backports.zoneinfo==0.2.1
|
||||
beautifulsoup4==4.7.1
|
||||
billiard==3.6.4.0
|
||||
bleach==4.1.0
|
||||
bokeh==2.2.3
|
||||
boto==2.49.0
|
||||
boto3==1.17.45
|
||||
botocore==1.20.45
|
||||
bottle==0.12.23
|
||||
braintree==4.18.1
|
||||
cairocffi==1.0.2
|
||||
celery==5.2.1
|
||||
certifi==2019.3.9
|
||||
cffi==1.14.0
|
||||
chardet==3.0.4
|
||||
<<<<<<< HEAD
|
||||
charset-normalizer==2.0.9
|
||||
=======
|
||||
charset-normalizer==2.1.0
|
||||
>>>>>>> feature/py39
|
||||
click==8.0.3
|
||||
click-didyoumean==0.3.0
|
||||
click-plugins==1.1.1
|
||||
click-repl==0.2.0
|
||||
cloudpickle==1.2.2
|
||||
colorama==0.4.1
|
||||
colorclass==2.2.0
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
contourpy==1.0.6
|
||||
>>>>>>> feature/py39
|
||||
cookies==2.2.1
|
||||
coreapi==2.3.3
|
||||
coreschema==0.0.4
|
||||
coverage==5.5
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
cramjam==2.5.0
|
||||
>>>>>>> feature/py39
|
||||
cryptography==3.4.7
|
||||
cycler==0.10.0
|
||||
Cython==0.29.21
|
||||
dask==2021.12.0
|
||||
decorator==4.4.0
|
||||
defusedxml==0.5.0
|
||||
Deprecated==1.2.13
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
dill==0.3.5.1
|
||||
>>>>>>> feature/py39
|
||||
Django==3.2.12
|
||||
django-analytical==2.5.0
|
||||
django-async-messages==0.3.1
|
||||
django-braces==1.13.0
|
||||
django-classy-tags==0.8.0
|
||||
django-cookie-law==2.0.1
|
||||
django-cors-headers==3.10.1
|
||||
django-countries==7.2.1
|
||||
<<<<<<< HEAD
|
||||
django-datetime-widget==0.9.3
|
||||
django-datetime-widget2==0.9.5
|
||||
django-debug-toolbar==2.0
|
||||
django-extensions==2.1.6
|
||||
=======
|
||||
django-crispy-forms==1.14.0
|
||||
django-datetime-widget2==0.9.5
|
||||
django-debug-toolbar==2.0
|
||||
django-extensions==2.1.6
|
||||
django-filter==22.1
|
||||
>>>>>>> feature/py39
|
||||
django-htmlmin==0.11.0
|
||||
django-leaflet==0.28.2
|
||||
django-oauth-toolkit==1.2.0
|
||||
django-oauth2-provider==0.2.6.1
|
||||
django-picklefield==2.1.1
|
||||
django-redis==4.10.0
|
||||
django-rest-framework==0.1.0
|
||||
django-rest-swagger==2.2.0
|
||||
django-rq==2.5.1
|
||||
django-rq-dashboard==0.3.3
|
||||
django-ses==2.0.0
|
||||
django-shell-plus==1.1.7
|
||||
django-social-share==1.3.2
|
||||
django-taggit==1.3.0
|
||||
django-tz-detect==0.2.9
|
||||
djangorestframework==3.13.0
|
||||
docopt==0.6.2
|
||||
docutils==0.14
|
||||
dparse==0.5.1
|
||||
entrypoints==0.3
|
||||
execnet==1.5.0
|
||||
factory-boy==2.11.1
|
||||
Faker==1.0.4
|
||||
fastjsonschema==2.16.1
|
||||
<<<<<<< HEAD
|
||||
fastparquet==0.5.0
|
||||
fitparse==1.2.0
|
||||
=======
|
||||
fastparquet==0.8.3
|
||||
fitparse==1.2.0
|
||||
flake8==4.0.1
|
||||
>>>>>>> feature/py39
|
||||
Flask==1.0.2
|
||||
fonttools==4.28.2
|
||||
fsspec==2021.11.1
|
||||
future==0.17.1
|
||||
geocoder==1.38.1
|
||||
geoip2==3.0.0
|
||||
geos==0.2.1
|
||||
grpcio==1.26.0
|
||||
grpcio-tools==1.26.0
|
||||
gunicorn==20.0.4
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
h11==0.13.0
|
||||
>>>>>>> feature/py39
|
||||
holoviews==1.13.5
|
||||
html5lib==1.1
|
||||
htmlmin==0.1.12
|
||||
HTMLParser==0.0.2
|
||||
httplib2==0.20.2
|
||||
humanize==3.3.0
|
||||
hvplot==0.4.0
|
||||
icalendar==4.0.3
|
||||
idna==2.8
|
||||
image==1.5.27
|
||||
importlib-metadata==4.12.0
|
||||
importlib-resources==1.0.2
|
||||
ipykernel==5.1.0
|
||||
ipython==7.22.0
|
||||
ipython-genutils==0.2.0
|
||||
ipywidgets==7.4.2
|
||||
iso8601==0.1.12
|
||||
isodate==0.6.0
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
isort==5.10.1
|
||||
>>>>>>> feature/py39
|
||||
itsdangerous==1.1.0
|
||||
itypes==1.2.0
|
||||
jedi==0.18.0
|
||||
jeepney==0.6.0
|
||||
Jinja2==3.0.3
|
||||
jmespath==0.10.0
|
||||
json5==0.8.5
|
||||
jsonschema==3.0.1
|
||||
jupyter==1.0.0
|
||||
jupyter-client==6.1.7
|
||||
jupyter-console==6.2.0
|
||||
jupyter-core==4.7.0
|
||||
jupyter-server==1.13.1
|
||||
jupyterlab==3.2.5
|
||||
jupyterlab-pygments==0.2.2
|
||||
jupyterlab-server==2.9.0
|
||||
jwcrypto==1.0
|
||||
keyring==18.0.0
|
||||
kiwisolver==1.0.1
|
||||
kombu==5.2.2
|
||||
<<<<<<< HEAD
|
||||
llvmlite==0.36.0
|
||||
=======
|
||||
lazy-object-proxy==1.7.1
|
||||
llvmlite==0.39.1
|
||||
>>>>>>> feature/py39
|
||||
locket==0.2.1
|
||||
lxml==4.7.1
|
||||
Markdown==3.0.1
|
||||
MarkupSafe==2.0.1
|
||||
matplotlib==3.5.0
|
||||
maxminddb==1.5.4
|
||||
<<<<<<< HEAD
|
||||
minify
|
||||
MiniMockTest==0.5
|
||||
mistune==2.0.4
|
||||
mock==2.0.0
|
||||
more-itertools==6.0.0
|
||||
=======
|
||||
mccabe==0.6.1
|
||||
MiniMockTest==0.5
|
||||
mistune==2.0.4
|
||||
mock==2.0.0
|
||||
more-itertools==8.12.0
|
||||
>>>>>>> feature/py39
|
||||
mpld3==0.3
|
||||
mysqlclient==1.4.2.post1
|
||||
nbclassic==0.3.4
|
||||
nbclient==0.6.8
|
||||
nbconvert==7.0.0
|
||||
nbformat==5.5.0
|
||||
nest-asyncio==1.5.4
|
||||
newrelic==8.1.0.180
|
||||
nose==1.3.7
|
||||
nose-parameterized==0.6.0
|
||||
notebook==6.4.6
|
||||
<<<<<<< HEAD
|
||||
numba==0.53.1
|
||||
numpy==1.18.5
|
||||
=======
|
||||
numba==0.56.2
|
||||
>>>>>>> feature/py39
|
||||
oauth2==1.9.0.post1
|
||||
oauth2-provider==0.0
|
||||
oauthlib==3.0.1
|
||||
openapi-codec==1.3.2
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
outcome==1.2.0
|
||||
>>>>>>> feature/py39
|
||||
packaging==21.3
|
||||
pandas==1.2.4
|
||||
pandocfilters==1.4.2
|
||||
panel==0.10.1
|
||||
param==1.10.0
|
||||
parameterized==0.8.1
|
||||
parso==0.8.2
|
||||
partd==1.2.0
|
||||
pathspec==0.5.9
|
||||
pbr==5.1.3
|
||||
pendulum==2.1.2
|
||||
pexpect==4.6.0
|
||||
pickleshare==0.7.5
|
||||
Pillow==8.4.0
|
||||
pip-upgrader==1.4.6
|
||||
<<<<<<< HEAD
|
||||
pluggy==0.9.0
|
||||
prometheus-client==0.6.0
|
||||
prompt-toolkit==2.0.9
|
||||
protobuf==3.11.1
|
||||
=======
|
||||
platformdirs==2.5.2
|
||||
pluggy==0.9.0
|
||||
ply==3.11
|
||||
prometheus-client==0.6.0
|
||||
prompt-toolkit==2.0.9
|
||||
protobuf==3.19.4
|
||||
>>>>>>> feature/py39
|
||||
psycopg2==2.8.1
|
||||
ptyprocess==0.6.0
|
||||
py==1.11.0
|
||||
pyarrow==2.0.0
|
||||
pycairo==1.19.0
|
||||
<<<<<<< HEAD
|
||||
pycparser==2.19
|
||||
pyct==0.4.8
|
||||
Pygments==2.13.0
|
||||
PyJWT==2.1.0
|
||||
=======
|
||||
pycodestyle==2.8.0
|
||||
pycparser==2.19
|
||||
pyct==0.4.8
|
||||
pyflakes==2.4.0
|
||||
Pygments==2.13.0
|
||||
PyJWT==2.1.0
|
||||
pylint==2.14.4
|
||||
>>>>>>> feature/py39
|
||||
pyOpenSSL==20.0.1
|
||||
pyparsing==3.0.6
|
||||
pyrsistent==0.14.11
|
||||
pyshp==2.1.0
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
PySocks==1.7.1
|
||||
>>>>>>> feature/py39
|
||||
pytest==4.3.1
|
||||
pytest-django==3.4.8
|
||||
pytest-forked==1.0.2
|
||||
pytest-runner==4.4
|
||||
pytest-sugar==0.9.2
|
||||
pytest-xdist==1.27.0
|
||||
python-dateutil==2.8.0
|
||||
python-memcached==1.59
|
||||
python-twitter==3.5
|
||||
pytz==2020.1
|
||||
pytzdata==2020.1
|
||||
pyviz-comms==0.7.6
|
||||
pywin32-ctypes==0.2.0
|
||||
PyYAML==6.0
|
||||
<<<<<<< HEAD
|
||||
pyzmq
|
||||
=======
|
||||
pyzmq==18.0.1
|
||||
>>>>>>> feature/py39
|
||||
qtconsole==4.4.3
|
||||
ratelim==0.1.6
|
||||
rauth==0.7.3
|
||||
redis==3.5.3
|
||||
<<<<<<< HEAD
|
||||
requests==2.23.0
|
||||
=======
|
||||
requests==2.28.1
|
||||
>>>>>>> feature/py39
|
||||
requests-oauthlib==1.2.0
|
||||
rowingdata==3.5.29
|
||||
rowingphysics==0.5.0
|
||||
rq==1.10.1
|
||||
<<<<<<< HEAD
|
||||
rules==3.0
|
||||
=======
|
||||
ruamel.yaml==0.17.21
|
||||
ruamel.yaml.clib==0.2.6
|
||||
rules==3.3
|
||||
>>>>>>> feature/py39
|
||||
ruptures==1.1.3
|
||||
s3transfer==0.3.4
|
||||
safety==1.10.3
|
||||
scipy==1.5.4
|
||||
SecretStorage==3.3.1
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
selenium==4.3.0
|
||||
>>>>>>> feature/py39
|
||||
Send2Trash==1.8.0
|
||||
setuptools-scm==6.3.2
|
||||
shell==1.0.1
|
||||
shortuuid==0.5.0
|
||||
simplejson==3.17.2
|
||||
six==1.12.0
|
||||
sniffio==1.2.0
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
sortedcontainers==2.4.0
|
||||
>>>>>>> feature/py39
|
||||
soupsieve==1.8
|
||||
SQLAlchemy==1.3.1
|
||||
sqlparse==0.3.0
|
||||
stravalib==0.10.4
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
TatSu==5.6.1
|
||||
tblib==1.7.0
|
||||
>>>>>>> feature/py39
|
||||
termcolor==1.1.0
|
||||
terminado==0.12.1
|
||||
terminaltables==3.1.0
|
||||
testpath==0.4.2
|
||||
text-unidecode==1.2
|
||||
thrift==0.15.0
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
thriftpy2==0.4.14
|
||||
>>>>>>> feature/py39
|
||||
timezonefinder==5.2.0
|
||||
tinycss2==1.1.1
|
||||
tk==0.1.0
|
||||
toml==0.10.2
|
||||
tomli==1.2.2
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
tomlkit==0.11.1
|
||||
>>>>>>> feature/py39
|
||||
toolz==0.10.0
|
||||
tornado==6.1
|
||||
tqdm==4.31.1
|
||||
traitlets==5.4.0
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
trio==0.21.0
|
||||
trio-websocket==0.9.2
|
||||
>>>>>>> feature/py39
|
||||
trueskill==0.4.5
|
||||
typing_extensions==4.0.1
|
||||
units==0.7
|
||||
uritemplate==3.0.0
|
||||
<<<<<<< HEAD
|
||||
urllib3==1.25.9
|
||||
=======
|
||||
urllib3==1.26.10
|
||||
>>>>>>> feature/py39
|
||||
VerbalExpressions==0.0.2
|
||||
vine==5.0.0
|
||||
wcwidth==0.1.7
|
||||
webencodings==0.5.1
|
||||
websocket-client==1.2.3
|
||||
Werkzeug==0.15.1
|
||||
widgetsnbextension==3.4.2
|
||||
wrapt==1.13.3
|
||||
<<<<<<< HEAD
|
||||
xlrd==1.2.0
|
||||
xmltodict==0.12.0
|
||||
yamjam==0.1.7
|
||||
yamllint==1.15.0
|
||||
yuicompressor
|
||||
=======
|
||||
wsproto==1.1.0
|
||||
xlrd==1.2.0
|
||||
xmltodict==0.12.0
|
||||
xyzservices==2022.9.0
|
||||
yamjam==0.1.7
|
||||
yamllint==1.15.0
|
||||
>>>>>>> feature/py39
|
||||
zipp==3.8.1
|
||||
179
requirements39.txt
Normal file
179
requirements39.txt
Normal file
@@ -0,0 +1,179 @@
|
||||
aiohttp==3.8.4
|
||||
aiosignal==1.3.1
|
||||
amqp==5.1.1
|
||||
arrow==1.2.3
|
||||
asgiref==3.7.2
|
||||
asttokens==2.2.1
|
||||
async-timeout==4.0.2
|
||||
attrs==23.1.0
|
||||
backcall==0.2.0
|
||||
beautifulsoup4==4.12.2
|
||||
billiard==3.6.4.0
|
||||
bleach==6.0.0
|
||||
bokeh==3.1.1
|
||||
braintree==4.20.0
|
||||
celery==5.2.1
|
||||
certifi==2023.5.7
|
||||
cffi==1.15.1
|
||||
charset-normalizer==3.1.0
|
||||
click==8.1.3
|
||||
click-didyoumean==0.3.0
|
||||
click-plugins==1.1.1
|
||||
click-repl==0.2.0
|
||||
cloudpickle==2.2.1
|
||||
colorcet==3.0.1
|
||||
contourpy==1.0.7
|
||||
coreapi==2.3.3
|
||||
coreschema==0.0.4
|
||||
cramjam==2.6.2
|
||||
cycler==0.11.0
|
||||
Cython==0.29.35
|
||||
dask==2023.5.1
|
||||
decorator==5.1.1
|
||||
Django==3.2.12
|
||||
django-analytical==2.5.0
|
||||
django-async-messages==0.3.1
|
||||
django-classy-tags==4.0.0
|
||||
django-cookie-law==2.0.1
|
||||
django-cors-headers==3.10.1
|
||||
django-countries==7.5.1
|
||||
django-datetime-widget2==0.9.5
|
||||
django-debug-toolbar==2.0
|
||||
django-leaflet==0.28.2
|
||||
django-oauth-toolkit==1.2.0
|
||||
django-oauth2-provider==0.2.6.1
|
||||
django-rest-framework==0.1.0
|
||||
django-rest-swagger==2.2.0
|
||||
django-rq==2.5.1
|
||||
django-shell-plus==1.1.7
|
||||
django-social-share==1.3.2
|
||||
django-taggit==4.0.0
|
||||
django-tz-detect==0.2.9
|
||||
djangorestframework==3.14.0
|
||||
docopt==0.6.2
|
||||
exceptiongroup==1.1.1
|
||||
executing==1.2.0
|
||||
factory-boy==2.11.1
|
||||
Faker==18.10.0
|
||||
fastparquet==2023.4.0
|
||||
fitparse==1.2.0
|
||||
fonttools==4.39.4
|
||||
frozenlist==1.3.3
|
||||
fsspec==2023.5.0
|
||||
future==0.18.3
|
||||
geocoder==1.38.1
|
||||
geoip2==4.7.0
|
||||
greenlet==2.0.2
|
||||
grpcio==1.26.0
|
||||
h3==3.7.6
|
||||
holoviews==1.16.0
|
||||
httplib2==0.22.0
|
||||
humanize==4.6.0
|
||||
icalendar==5.0.7
|
||||
idna==3.4
|
||||
importlib-metadata==6.6.0
|
||||
importlib-resources==5.12.0
|
||||
iniconfig==2.0.0
|
||||
ipython==8.14.0
|
||||
iso8601==1.1.0
|
||||
isodate==0.6.1
|
||||
itypes==1.2.0
|
||||
jedi==0.18.2
|
||||
Jinja2==3.0.3
|
||||
kiwisolver==1.4.4
|
||||
kombu==5.2.4
|
||||
linkify-it-py==2.0.2
|
||||
locket==1.0.0
|
||||
lxml==4.9.2
|
||||
Markdown==3.4.3
|
||||
markdown-it-py==2.2.0
|
||||
MarkupSafe==2.1.2
|
||||
matplotlib==3.7.1
|
||||
matplotlib-inline==0.1.6
|
||||
maxminddb==2.3.0
|
||||
mdit-py-plugins==0.3.5
|
||||
mdurl==0.1.2
|
||||
mock==5.0.2
|
||||
mpld3==0.5.9
|
||||
multidict==6.0.4
|
||||
nose==1.3.7
|
||||
nose-parameterized==0.6.0
|
||||
numpy==1.24.3
|
||||
oauth2==1.9.0.post1
|
||||
oauth2-provider==0.0
|
||||
oauthlib==3.2.2
|
||||
openapi-codec==1.3.2
|
||||
packaging==23.1
|
||||
pandas==2.0.2
|
||||
panel==1.0.4
|
||||
param==1.13.0
|
||||
parso==0.8.3
|
||||
partd==1.4.0
|
||||
pathspec==0.11.1
|
||||
pendulum==2.1.2
|
||||
pexpect==4.8.0
|
||||
pickleshare==0.7.5
|
||||
Pillow==9.5.0
|
||||
Pint==0.22
|
||||
pluggy==1.0.0
|
||||
prompt-toolkit==3.0.38
|
||||
protobuf==3.19.4
|
||||
ptyprocess==0.7.0
|
||||
pure-eval==0.2.2
|
||||
pyarrow==12.0.0
|
||||
pycairo==1.23.0
|
||||
pycparser==2.21
|
||||
pyct==0.5.0
|
||||
pydantic==1.10.8
|
||||
Pygments==2.15.1
|
||||
pyparsing==3.0.9
|
||||
pytest==7.3.1
|
||||
pytest-runner==6.0.0
|
||||
python-dateutil==2.8.2
|
||||
python-twitter==3.5
|
||||
pytz==2023.3
|
||||
pytzdata==2020.1
|
||||
pyviz-comms==2.3.0
|
||||
PyYAML==6.0
|
||||
ratelim==0.1.6
|
||||
redis==4.5.5
|
||||
requests==2.31.0
|
||||
requests-oauthlib==1.2.0
|
||||
rowingdata==3.5.29
|
||||
rowingphysics==0.5.2
|
||||
rq==1.15.0
|
||||
rules==3.3
|
||||
ruptures==1.1.7
|
||||
scipy==1.10.1
|
||||
shortuuid==1.0.11
|
||||
simplejson==3.19.1
|
||||
six==1.16.0
|
||||
soupsieve==2.4.1
|
||||
SQLAlchemy==2.0.15
|
||||
sqlparse==0.4.4
|
||||
stack-data==0.6.2
|
||||
stravalib==1.3.0
|
||||
timezonefinder==6.2.0
|
||||
tk==0.1.0
|
||||
tomli==2.0.1
|
||||
toolz==0.12.0
|
||||
tornado==6.3.2
|
||||
tqdm==4.65.0
|
||||
traitlets==5.9.0
|
||||
trueskill==0.4.5
|
||||
typing_extensions==4.6.3
|
||||
tzdata==2023.3
|
||||
uc-micro-py==1.0.2
|
||||
uritemplate==4.1.1
|
||||
urllib3==2.0.2
|
||||
VerbalExpressions==0.0.2
|
||||
vine==5.0.0
|
||||
wcwidth==0.2.6
|
||||
webencodings==0.5.1
|
||||
Werkzeug==2.3.4
|
||||
xmltodict==0.13.0
|
||||
xyzservices==2023.5.0
|
||||
yamjam==0.1.7
|
||||
yamllint==1.32.0
|
||||
yarl==1.9.2
|
||||
zipp==3.15.0
|
||||
@@ -1,8 +1,11 @@
|
||||
|
||||
from django.apps import AppConfig
|
||||
import os
|
||||
from django.conf import settings
|
||||
|
||||
# Store metadata for the app
|
||||
|
||||
|
||||
class RowersConfig(AppConfig):
|
||||
name = 'rowers'
|
||||
path = os.path.join(settings.BASE_DIR, 'rowers')
|
||||
|
||||
@@ -786,9 +786,9 @@ def split_workout(r, parent, splitsecond, splitmode):
|
||||
data1.fillna(method='bfill', inplace=True)
|
||||
|
||||
# Some new stuff to try out
|
||||
data1 = data1.groupby('time', axis=0).mean()
|
||||
data1['time'] = data1.index
|
||||
data1.reset_index(drop=True, inplace=True)
|
||||
#data1 = data1.groupby('time', axis=0).mean()
|
||||
#data1['time'] = data1.index
|
||||
#data1.reset_index(drop=True, inplace=True)
|
||||
|
||||
data2 = data2.sort_values(['time'])
|
||||
data2 = data2.interpolate(method='linear', axis=0, limit_direction='both',
|
||||
@@ -796,9 +796,9 @@ def split_workout(r, parent, splitsecond, splitmode):
|
||||
data2.fillna(method='bfill', inplace=True)
|
||||
|
||||
# Some new stuff to try out
|
||||
data2 = data2.groupby('time', axis=0).mean()
|
||||
data2['time'] = data2.index
|
||||
data2.reset_index(drop=True, inplace=True)
|
||||
#data2 = data2.groupby('time', axis=0).mean()
|
||||
#data2['time'] = data2.index
|
||||
#data2.reset_index(drop=True, inplace=True)
|
||||
|
||||
data1['pace'] = data1['pace'] / 1000.
|
||||
data2['pace'] = data2['pace'] / 1000.
|
||||
@@ -1621,31 +1621,29 @@ def get_existing_job(w):
|
||||
def workout_trimp(w, reset=False):
|
||||
r = w.user
|
||||
|
||||
# below is temporary
|
||||
if w.trimp > -1 and not reset:
|
||||
return w.trimp, w.hrtss
|
||||
|
||||
# if w.trimp is None:
|
||||
# if get_existing_job(w):
|
||||
# return 0, 0
|
||||
# elif w.averagehr is None:
|
||||
# if get_existing_job(w):
|
||||
# return w.trimp, 0
|
||||
# elif w.trimp <= 0 and w.averagehr > 0:
|
||||
# ftp = float(r.ftp)
|
||||
# _ = myqueue(
|
||||
# queuehigh,
|
||||
# handle_calctrimp,
|
||||
# w.id,
|
||||
# w.csvfilename,
|
||||
# ftp,
|
||||
# r.sex,
|
||||
# r.hrftp,
|
||||
# r.max,
|
||||
# r.rest)
|
||||
# return w.trimp, w.hrtss
|
||||
# elif w.trimp > -1 and not reset:
|
||||
# return w.trimp, w.hrtss
|
||||
if w.trimp is None:
|
||||
if get_existing_job(w):
|
||||
return 0, 0
|
||||
elif w.averagehr is None:
|
||||
if get_existing_job(w):
|
||||
return w.trimp, 0
|
||||
elif w.trimp <= 0 and w.averagehr > 0:
|
||||
if get_existing_job(w):
|
||||
return 0, w.averagehr
|
||||
ftp = float(r.ftp)
|
||||
_ = myqueue(
|
||||
queuehigh,
|
||||
handle_calctrimp,
|
||||
w.id,
|
||||
w.csvfilename,
|
||||
ftp,
|
||||
r.sex,
|
||||
r.hrftp,
|
||||
r.max,
|
||||
r.rest)
|
||||
return w.trimp, w.hrtss
|
||||
elif w.trimp > -1 and not reset:
|
||||
return w.trimp, w.hrtss
|
||||
|
||||
if get_existing_job(w):
|
||||
return 0, 0
|
||||
|
||||
@@ -385,8 +385,10 @@ def filter_df(datadf, fieldname, value, largerthan=True):
|
||||
def df_resample(datadf):
|
||||
# time stamps must be in seconds
|
||||
timestamps = datadf['TimeStamp (sec)'].astype('int')
|
||||
|
||||
datadf['timestamps'] = timestamps
|
||||
newdf = datadf.groupby(['timestamps']).mean()
|
||||
# newdf = datadf.groupby(['timestamps']).mean()
|
||||
newdf = datadf[~datadf.duplicated(['timestamps'])]
|
||||
return newdf
|
||||
|
||||
|
||||
@@ -1369,6 +1371,7 @@ def read_cols_df_sql(ids, columns, convertnewtons=True):
|
||||
|
||||
extracols = []
|
||||
|
||||
|
||||
columns = list(columns) + ['distance', 'spm', 'workoutid']
|
||||
columns = [x for x in columns if x != 'None']
|
||||
columns = list(set(columns))
|
||||
@@ -1381,27 +1384,35 @@ def read_cols_df_sql(ids, columns, convertnewtons=True):
|
||||
elif len(ids) == 1: # pragma: no cover
|
||||
try:
|
||||
filename = 'media/strokedata_{id}.parquet.gz'.format(id=ids[0])
|
||||
df = pd.read_parquet(filename, columns=columns)
|
||||
pq_file = pq.ParquetDataset(filename)
|
||||
columns_in_file = [c for c in columns if c in pq_file.schema.names]
|
||||
df = pd.read_parquet(filename, columns=columns_in_file)
|
||||
except OSError:
|
||||
rowdata, row = getrowdata(id=ids[0])
|
||||
if rowdata and len(rowdata.df):
|
||||
_ = dataprep(rowdata.df,
|
||||
id=ids[0], bands=True, otwpower=True, barchart=True)
|
||||
df = pd.read_parquet(filename, columns=columns)
|
||||
pq_file = pq.ParquetDataset(filename)
|
||||
columns_in_file = [c for c in columns if c in pq_file.schema.names]
|
||||
df = pd.read_parquet(filename, columns=columns_in_file)
|
||||
else:
|
||||
data = []
|
||||
filenames = [
|
||||
'media/strokedata_{id}.parquet.gz'.format(id=id) for id in ids]
|
||||
for id, f in zip(ids, filenames):
|
||||
try:
|
||||
df = pd.read_parquet(f, columns=columns)
|
||||
pq_file = pq.ParquetDataset(f)
|
||||
columns_in_file = [c for c in columns if c in pq_file.schema.names]
|
||||
df = pd.read_parquet(f, columns=columns_in_file)
|
||||
data.append(df)
|
||||
except (OSError, IndexError, ArrowInvalid):
|
||||
rowdata, row = getrowdata(id=id)
|
||||
if rowdata and len(rowdata.df): # pragma: no cover
|
||||
_ = dataprep(rowdata.df, id=id,
|
||||
bands=True, otwpower=True, barchart=True)
|
||||
df = pd.read_parquet(f, columns=columns)
|
||||
pq_file = pq.ParquetDataset(f)
|
||||
columns_in_file = [c for c in columns if c in pq_file.schema.names]
|
||||
df = pd.read_parquet(f, columns=columns_in_file)
|
||||
data.append(df)
|
||||
|
||||
try:
|
||||
@@ -1471,7 +1482,7 @@ def datafusion(id1, id2, columns, offset):
|
||||
'fpace',
|
||||
'workoutid',
|
||||
'id'],
|
||||
1, errors='ignore')
|
||||
axis=1, errors='ignore')
|
||||
|
||||
# Add coordinates to DataFrame
|
||||
latitude, longitude = get_latlon(id1)
|
||||
@@ -1494,7 +1505,7 @@ def datafusion(id1, id2, columns, offset):
|
||||
|
||||
for c in df1.columns:
|
||||
if c not in keep1:
|
||||
df1 = df1.drop(c, 1, errors='ignore')
|
||||
df1 = df1.drop(c, axis=1, errors='ignore')
|
||||
|
||||
df = pd.concat([df1, df2], ignore_index=True)
|
||||
df = df.sort_values(['time'])
|
||||
@@ -1503,9 +1514,9 @@ def datafusion(id1, id2, columns, offset):
|
||||
df.fillna(method='bfill', inplace=True)
|
||||
|
||||
# Some new stuff to try out
|
||||
df = df.groupby('time', axis=0).mean()
|
||||
df['time'] = df.index
|
||||
df.reset_index(drop=True, inplace=True)
|
||||
#df = df.groupby('time',axis=0).mean()
|
||||
#df['time'] = df.index
|
||||
#df.reset_index(drop=True, inplace=True)
|
||||
|
||||
df['time'] = df['time'] / 1000.
|
||||
df['pace'] = df['pace'] / 1000.
|
||||
|
||||
@@ -329,7 +329,7 @@ def getmaxwattinterval(tt, ww, i):
|
||||
w_roll = ww.rolling(i+2).mean().dropna()
|
||||
if len(w_roll):
|
||||
# now goes with # data points - should be fixed seconds
|
||||
indexmax = w_roll.idxmax(axis=1)
|
||||
indexmax = w_roll.idxmax(axis=0)
|
||||
# indexmaxpos = indexmax.get_loc(indexmax)
|
||||
indexmaxpos = indexmax
|
||||
try:
|
||||
|
||||
@@ -70,7 +70,8 @@ from bokeh.palettes import Dark2_8 as palette
|
||||
from bokeh.palettes import Set1_4 as palette2
|
||||
from bokeh.models.glyphs import MultiLine
|
||||
import itertools
|
||||
from bokeh.plotting import figure, ColumnDataSource, Figure, curdoc
|
||||
from bokeh.plotting import figure, ColumnDataSource, curdoc
|
||||
|
||||
from bokeh.models import CustomJS, Slider, TextInput, BoxAnnotation, Band
|
||||
|
||||
import arrow
|
||||
@@ -250,7 +251,7 @@ def interactive_hr_piechart(df, rower, title, totalseconds=0):
|
||||
|
||||
TOOLS = 'save,hover'
|
||||
|
||||
z = figure(title="HR "+title, x_range=(-0.5, 1), plot_height=375,
|
||||
z = figure(title="HR "+title, x_range=(-0.5, 1), height=375,
|
||||
tools=TOOLS, toolbar_location=None, tooltips="@zone: @totaltime",
|
||||
)
|
||||
|
||||
@@ -314,7 +315,7 @@ def interactive_workouttype_piechart(workouts):
|
||||
except KeyError: # pragma: no cover
|
||||
pass
|
||||
|
||||
p = figure(plot_height=350, title="Types", toolbar_location=None,
|
||||
p = figure(height=350, title="Types", toolbar_location=None,
|
||||
tools="hover,save", tooltips="@type: @totaltime", x_range=(-0.5, 1.0))
|
||||
|
||||
p.wedge(x=0, y=1, radius=0.4,
|
||||
@@ -364,7 +365,7 @@ def interactive_boxchart(datadf, fieldname, extratitle='',
|
||||
|
||||
yrange1 = Range1d(start=yaxminima[fieldname], end=yaxmaxima[fieldname])
|
||||
plot.y_range = yrange1
|
||||
plot.sizing_mode = 'stretch_both'
|
||||
#plot.sizing_mode = 'stretch_both'
|
||||
|
||||
if extratitle:
|
||||
plot.title.text = extratitle
|
||||
@@ -386,8 +387,8 @@ def interactive_boxchart(datadf, fieldname, extratitle='',
|
||||
|
||||
plot.xaxis.major_label_orientation = pi/4
|
||||
|
||||
plot.plot_width = 920
|
||||
plot.plot_height = 600
|
||||
plot.width = 920
|
||||
plot.height = 600
|
||||
|
||||
slidertext = 'SPM: {:.0f}-{:.0f}, WpS: {:.0f}-{:.0f}'.format(
|
||||
spmmin, spmmax, workmin, workmax
|
||||
@@ -426,11 +427,11 @@ def interactive_planchart(data, startdate, enddate):
|
||||
|
||||
p = hv.render(bars)
|
||||
|
||||
p.plot_width = 550
|
||||
p.plot_height = 350
|
||||
p.width = 550
|
||||
p.height = 350
|
||||
p.y_range = yrange1
|
||||
p.toolbar_location = 'above'
|
||||
p.sizing_mode = 'stretch_both'
|
||||
#p.sizing_mode = 'stretch_both'
|
||||
|
||||
script, div = components(p)
|
||||
|
||||
@@ -592,11 +593,11 @@ def interactive_activitychart(workouts, startdate, enddate, stack='type', toolba
|
||||
d2=enddate.strftime("%Y-%m-%d"),
|
||||
)
|
||||
|
||||
p.plot_width = 550
|
||||
p.plot_height = 350
|
||||
p.width = 550
|
||||
p.height = 350
|
||||
p.toolbar_location = toolbar_location
|
||||
p.y_range.start = 0
|
||||
p.sizing_mode = 'stretch_both'
|
||||
#p.sizing_mode = 'stretch_both'
|
||||
taptool = p.select(type=TapTool)
|
||||
|
||||
callback = CustomJS(args={'links': df.link}, code="""
|
||||
@@ -793,10 +794,10 @@ def interactive_activitychart2(workouts, startdate, enddate, stack='type', toolb
|
||||
else: # pragma: no cover
|
||||
p.yaxis.axis_label = 'rScore'
|
||||
|
||||
p.plot_width = 550
|
||||
p.plot_height = 350
|
||||
p.width = 550
|
||||
p.height = 350
|
||||
p.toolbar_location = toolbar_location
|
||||
p.sizing_mode = 'stretch_both'
|
||||
#p.sizing_mode = 'stretch_both'
|
||||
p.y_range.start = 0
|
||||
taptool = p.select(type=TapTool)
|
||||
|
||||
@@ -1089,9 +1090,9 @@ def interactive_forcecurve(theworkouts, workstrokesonly=True, plottype='scatter'
|
||||
)
|
||||
)
|
||||
|
||||
plot = Figure(tools=TOOLS,
|
||||
toolbar_sticky=False, toolbar_location="above", plot_width=800, plot_height=600)
|
||||
plot.sizing_mode = 'stretch_both'
|
||||
plot = figure(tools=TOOLS,
|
||||
toolbar_sticky=False, toolbar_location="above", width=800, height=600)
|
||||
#plot.sizing_mode = 'stretch_both'
|
||||
|
||||
# add watermark
|
||||
watermarkurl = "/static/img/logo7.png"
|
||||
@@ -1491,7 +1492,7 @@ def interactive_forcecurve(theworkouts, workstrokesonly=True, plottype='scatter'
|
||||
|
||||
mylayout = layoutrow([thesliders, plot])
|
||||
|
||||
mylayout.sizing_mode = 'stretch_both'
|
||||
#mylayout.sizing_mode = 'stretch_both'
|
||||
|
||||
script, div = components(mylayout)
|
||||
js_resources = INLINE.render_js()
|
||||
@@ -1683,8 +1684,8 @@ def goldmedalscorechart(user, startdate=None, enddate=None):
|
||||
)
|
||||
)
|
||||
|
||||
plot = Figure(tools=TOOLS, x_axis_type='datetime',
|
||||
plot_width=900, plot_height=600,
|
||||
plot = figure(tools=TOOLS, x_axis_type='datetime',
|
||||
width=900, height=600,
|
||||
toolbar_location='above',
|
||||
toolbar_sticky=False)
|
||||
|
||||
@@ -1869,8 +1870,8 @@ def performance_chart(user, startdate=None, enddate=None, kfitness=42, kfatigue=
|
||||
)
|
||||
)
|
||||
|
||||
plot = Figure(tools=TOOLS, x_axis_type='datetime',
|
||||
plot_width=900, plot_height=300,
|
||||
plot = figure(tools=TOOLS, x_axis_type='datetime',
|
||||
width=900, height=300,
|
||||
toolbar_location="above",
|
||||
toolbar_sticky=False)
|
||||
|
||||
@@ -1996,8 +1997,8 @@ def performance_chart(user, startdate=None, enddate=None, kfitness=42, kfatigue=
|
||||
('Test', '@testduration'),
|
||||
])
|
||||
|
||||
plot2 = Figure(tools=TOOLS2, x_axis_type='datetime',
|
||||
plot_width=900, plot_height=150,
|
||||
plot2 = figure(tools=TOOLS2, x_axis_type='datetime',
|
||||
width=900, height=150,
|
||||
toolbar_location=None,
|
||||
toolbar_sticky=False)
|
||||
|
||||
@@ -2015,7 +2016,7 @@ def performance_chart(user, startdate=None, enddate=None, kfitness=42, kfatigue=
|
||||
plot2.add_tools(linked_crosshair)
|
||||
|
||||
mylayout = layoutcolumn([plot, plot2])
|
||||
mylayout.sizing_mode = 'stretch_both'
|
||||
#mylayout.sizing_mode = 'stretch_both'
|
||||
|
||||
try:
|
||||
script, div = components(mylayout)
|
||||
@@ -2074,7 +2075,7 @@ def interactive_histoall(theworkouts, histoparam, includereststrokes,
|
||||
histopwr = histopwr[histopwr > yaxminima[histoparam]]
|
||||
histopwr = histopwr[histopwr < yaxmaxima[histoparam]]
|
||||
|
||||
plot = Figure(tools=TOOLS, plot_width=900,
|
||||
plot = figure(tools=TOOLS, width=900,
|
||||
toolbar_sticky=False,
|
||||
toolbar_location="above"
|
||||
)
|
||||
@@ -2147,7 +2148,7 @@ def interactive_histoall(theworkouts, histoparam, includereststrokes,
|
||||
plot.add_layout(LinearAxis(y_range_name="fraction",
|
||||
axis_label="Cumulative % of strokes"), 'right')
|
||||
|
||||
plot.sizing_mode = 'stretch_both'
|
||||
#plot.sizing_mode = 'stretch_both'
|
||||
|
||||
annolabel = Label(x=50, y=450, x_units='screen', y_units='screen',
|
||||
text='',
|
||||
@@ -3415,9 +3416,9 @@ def interactive_agegroupcpchart(age, normalized=False):
|
||||
|
||||
TOOLS = 'save,pan,box_zoom,wheel_zoom,reset,tap,hover,crosshair'
|
||||
|
||||
plot = Figure(plot_width=900, x_axis_type=x_axis_type,
|
||||
plot = figure(width=900, x_axis_type=x_axis_type,
|
||||
tools=TOOLS)
|
||||
plot.sizing_mode = 'stretch_both'
|
||||
#plot.sizing_mode = 'stretch_both'
|
||||
|
||||
plot.line('duration', 'fitpowerfh', source=sourcefit,
|
||||
legend_label='Female HW', color='blue')
|
||||
@@ -3455,7 +3456,8 @@ def interactive_agegroupcpchart(age, normalized=False):
|
||||
return script, div
|
||||
|
||||
|
||||
def interactive_otwcpchart(powerdf, promember=0, rowername="", r=None, cpfit='data',
|
||||
def interactive_otwcpchart(powerdf, promember=0, rowername="", r=None,
|
||||
cpfit='data',
|
||||
title='', type='water',
|
||||
wcpower=[], wcdurations=[], cpoverlay=False):
|
||||
|
||||
@@ -3550,8 +3552,8 @@ def interactive_otwcpchart(powerdf, promember=0, rowername="", r=None, cpfit='da
|
||||
)
|
||||
|
||||
# making the plot
|
||||
plot = Figure(tools=TOOLS, x_axis_type=x_axis_type,
|
||||
plot_width=900,
|
||||
plot = figure(tools=TOOLS, x_axis_type=x_axis_type,
|
||||
width=900,
|
||||
toolbar_location="above",
|
||||
toolbar_sticky=False)
|
||||
|
||||
@@ -3588,8 +3590,9 @@ def interactive_otwcpchart(powerdf, promember=0, rowername="", r=None, cpfit='da
|
||||
title = "Critical Power for "+rowername
|
||||
plot.title.text = title
|
||||
|
||||
xaxis = plot.select(dict(type=Axis, layout="below"))[0]
|
||||
xaxis.formatter = PrintfTickFormatter()
|
||||
#xaxis = plot.select(dict(type=Axis, layout="below")) #[0]
|
||||
#print(xaxis)
|
||||
#xaxis.formatter = PrintfTickFormatter()
|
||||
|
||||
hover = plot.select(dict(type=HoverTool))
|
||||
|
||||
@@ -3694,8 +3697,8 @@ def interactive_agegroup_plot(df, distance=2000, duration=None,
|
||||
|
||||
TOOLS = 'save,pan,box_zoom,wheel_zoom,reset,tap,hover,crosshair'
|
||||
|
||||
plot = Figure(tools=TOOLS, plot_width=900)
|
||||
plot.sizing_mode = 'stretch_both'
|
||||
plot = figure(tools=TOOLS, width=900)
|
||||
#plot.sizing_mode = 'stretch_both'
|
||||
plot.circle('age', 'power', source=source, fill_color='red', size=15,
|
||||
legend_label='World Record')
|
||||
|
||||
@@ -3878,8 +3881,8 @@ def interactive_cpchart(rower, thedistances, thesecs, theavpower,
|
||||
)
|
||||
|
||||
# making the plot
|
||||
plot = Figure(tools=TOOLS, x_axis_type=x_axis_type,
|
||||
plot_width=900,
|
||||
plot = figure(tools=TOOLS, x_axis_type=x_axis_type,
|
||||
width=900,
|
||||
toolbar_location="above",
|
||||
toolbar_sticky=False)
|
||||
|
||||
@@ -4007,7 +4010,7 @@ def interactive_windchart(id=0, promember=0):
|
||||
f1 = row.csvfilename
|
||||
|
||||
# create interactive plot
|
||||
plot = Figure(plot_width=400, plot_height=300)
|
||||
plot = figure(width=400, height=300)
|
||||
|
||||
# get user
|
||||
# u = User.objects.get(id=row.user.id)
|
||||
@@ -4060,7 +4063,7 @@ def interactive_windchart(id=0, promember=0):
|
||||
TOOLS = 'pan,box_zoom,wheel_zoom,reset,tap,crosshair'
|
||||
|
||||
# making the plot
|
||||
plot = Figure(tools=TOOLS, plot_width=400, height=500,
|
||||
plot = figure(tools=TOOLS, width=400, height=500,
|
||||
# toolbar_location="below",
|
||||
toolbar_sticky=False,
|
||||
)
|
||||
@@ -4073,7 +4076,7 @@ def interactive_windchart(id=0, promember=0):
|
||||
plot.xaxis.axis_label = "Distance (m)"
|
||||
plot.yaxis.axis_label = "Wind Speed (m/s)"
|
||||
plot.y_range = Range1d(-7, 7)
|
||||
plot.sizing_mode = 'stretch_both'
|
||||
#plot.sizing_mode = 'stretch_both'
|
||||
|
||||
plot.extra_y_ranges = {"winddirection": Range1d(start=0, end=360)}
|
||||
plot.line('dist', 'winddirection', source=source,
|
||||
@@ -4095,7 +4098,7 @@ def interactive_streamchart(id=0, promember=0):
|
||||
f1 = row.csvfilename
|
||||
|
||||
# create interactive plot
|
||||
plot = Figure(plot_width=400,
|
||||
plot = figure(width=400,
|
||||
)
|
||||
# get user
|
||||
# u = User.objects.get(id=row.user.id)
|
||||
@@ -4129,7 +4132,7 @@ def interactive_streamchart(id=0, promember=0):
|
||||
TOOLS = 'pan,box_zoom,wheel_zoom,reset,tap,crosshair'
|
||||
|
||||
# making the plot
|
||||
plot = Figure(tools=TOOLS, plot_width=400, height=500,
|
||||
plot = figure(tools=TOOLS, width=400, height=500,
|
||||
# toolbar_location="below",
|
||||
toolbar_sticky=False,
|
||||
)
|
||||
@@ -4139,7 +4142,7 @@ def interactive_streamchart(id=0, promember=0):
|
||||
plot.xaxis.axis_label = "Distance (m)"
|
||||
plot.yaxis.axis_label = "River Current (m/s)"
|
||||
plot.y_range = Range1d(-2, 2)
|
||||
plot.sizing_mode = 'stretch_both'
|
||||
#plot.sizing_mode = 'stretch_both'
|
||||
|
||||
script, div = components(plot)
|
||||
|
||||
@@ -4199,11 +4202,11 @@ def forcecurve_multi_interactive_chart(selected):
|
||||
)
|
||||
|
||||
TOOLS = 'save,pan,box_zoom,wheel_zoom,reset,tap,crosshair'
|
||||
plot = Figure(plot_width=920,tools=TOOLS,
|
||||
plot = figure(width=920,tools=TOOLS,
|
||||
toolbar_location='above',
|
||||
toolbar_sticky=False)
|
||||
|
||||
plot.sizing_mode = 'stretch_both'
|
||||
#plot.sizing_mode = 'stretch_both'
|
||||
|
||||
# add watermark
|
||||
watermarkurl = "/static/img/logo7.png"
|
||||
@@ -4301,11 +4304,11 @@ def instroke_multi_interactive_chart(selected, *args, **kwargs):
|
||||
)
|
||||
|
||||
TOOLS = 'save,pan,box_zoom,wheel_zoom,reset,tap,crosshair'
|
||||
plot = Figure(plot_width=920,tools=TOOLS,
|
||||
plot = figure(width=920,tools=TOOLS,
|
||||
toolbar_location='above',
|
||||
toolbar_sticky=False)
|
||||
|
||||
plot.sizing_mode = 'stretch_both'
|
||||
#plot.sizing_mode = 'stretch_both'
|
||||
|
||||
# add watermark
|
||||
watermarkurl = "/static/img/logo7.png"
|
||||
@@ -4399,11 +4402,11 @@ def instroke_interactive_chart(df,metric, workout, spm_min, spm_max,
|
||||
pass
|
||||
|
||||
TOOLS = 'save,pan,box_zoom,wheel_zoom,reset,tap,crosshair'
|
||||
plot = Figure(plot_width=920,tools=TOOLS,
|
||||
plot = figure(width=920,tools=TOOLS,
|
||||
toolbar_location='above',
|
||||
toolbar_sticky=False)
|
||||
|
||||
plot.sizing_mode = 'stretch_both'
|
||||
#plot.sizing_mode = 'stretch_both'
|
||||
|
||||
plot.title.text = str(workout) + ' - ' + metric
|
||||
|
||||
@@ -4561,9 +4564,9 @@ def interactive_chart(id=0, promember=0, intervaldata={}):
|
||||
datadf
|
||||
)
|
||||
|
||||
plot = Figure(x_axis_type="datetime", y_axis_type="datetime",
|
||||
plot_width=400,
|
||||
plot_height=400,
|
||||
plot = figure(x_axis_type="datetime", y_axis_type="datetime",
|
||||
width=400,
|
||||
height=400,
|
||||
toolbar_sticky=False,
|
||||
tools=TOOLS)
|
||||
|
||||
@@ -4590,7 +4593,7 @@ def interactive_chart(id=0, promember=0, intervaldata={}):
|
||||
plot.line('time', 'pace', source=source, legend_label="Pace", name="pace")
|
||||
plot.title.text = row.name
|
||||
plot.title.text_font_size = "1.0em"
|
||||
plot.sizing_mode = 'stretch_both'
|
||||
#plot.sizing_mode = 'stretch_both'
|
||||
plot.xaxis.axis_label = "Time"
|
||||
plot.yaxis.axis_label = "Pace (/500m)"
|
||||
plot.xaxis[0].formatter = DatetimeTickFormatter(
|
||||
@@ -4653,7 +4656,7 @@ def interactive_chart(id=0, promember=0, intervaldata={}):
|
||||
])
|
||||
|
||||
hover.mode = 'mouse'
|
||||
hover.names = ["spm", "pace"]
|
||||
# hover.name = ["spm", "pace"]
|
||||
|
||||
script, div = components(plot)
|
||||
|
||||
@@ -4852,28 +4855,27 @@ def interactive_multiflex(datadf, xparam, yparam, groupby, extratitle='',
|
||||
TOOLS = 'save,pan,box_zoom,wheel_zoom,reset,tap'
|
||||
|
||||
if groupby != 'date':
|
||||
hover = HoverTool(names=['data'],
|
||||
tooltips=[
|
||||
(groupby, '@groupval{1.1}'),
|
||||
(xparamname, '@x{1.1}'),
|
||||
(yparamname, '@y')
|
||||
hover = HoverTool(tooltips=[
|
||||
(groupby, '@groupval{1.1}'),
|
||||
(xparamname, '@x{1.1}'),
|
||||
(yparamname, '@y')
|
||||
])
|
||||
else: # pragma: no cover
|
||||
hover = HoverTool(names=['data'],
|
||||
tooltips=[
|
||||
(groupby, '@groupval'),
|
||||
(xparamname, '@x{1.1}'),
|
||||
(yparamname, '@y'),
|
||||
hover = HoverTool(
|
||||
tooltips=[
|
||||
(groupby, '@groupval'),
|
||||
(xparamname, '@x{1.1}'),
|
||||
(yparamname, '@y'),
|
||||
])
|
||||
|
||||
hover.mode = 'mouse'
|
||||
TOOLS = [SaveTool(), PanTool(), BoxZoomTool(), WheelZoomTool(),
|
||||
ResetTool(), TapTool(), hover]
|
||||
|
||||
plot = Figure(x_axis_type=x_axis_type, y_axis_type=y_axis_type,
|
||||
plot = figure(x_axis_type=x_axis_type, y_axis_type=y_axis_type,
|
||||
tools=TOOLS,
|
||||
toolbar_location="above",
|
||||
toolbar_sticky=False, plot_width=920)
|
||||
toolbar_sticky=False, width=920)
|
||||
|
||||
# add watermark
|
||||
watermarkurl = "/static/img/logo7.png"
|
||||
@@ -4889,7 +4891,7 @@ def interactive_multiflex(datadf, xparam, yparam, groupby, extratitle='',
|
||||
|
||||
plot.title.text = title
|
||||
plot.title.text_font_size = "1.0em"
|
||||
plot.sizing_mode = 'stretch_both'
|
||||
#plot.sizing_mode = 'stretch_both'
|
||||
|
||||
plot.image_url([watermarkurl], watermarkx, watermarky,
|
||||
watermarkw, watermarkh,
|
||||
@@ -5107,7 +5109,7 @@ def interactive_cum_flex_chart2(theworkouts, promember=0,
|
||||
else: # pragma: no cover
|
||||
TOOLS = 'pan,box_zoom,wheel_zoom,reset,tap,crosshair'
|
||||
|
||||
plot = Figure(x_axis_type=x_axis_type, y_axis_type=y_axis_type,
|
||||
plot = figure(x_axis_type=x_axis_type, y_axis_type=y_axis_type,
|
||||
tools=TOOLS,
|
||||
toolbar_location="above",
|
||||
toolbar_sticky=False)
|
||||
@@ -5123,7 +5125,7 @@ def interactive_cum_flex_chart2(theworkouts, promember=0,
|
||||
watermarkanchor = 'bottom_right'
|
||||
plot.extra_y_ranges = {"watermark": watermarkrange}
|
||||
plot.extra_x_ranges = {"watermark": watermarkrange}
|
||||
plot.sizing_mode = 'stretch_both'
|
||||
#plot.sizing_mode = 'stretch_both'
|
||||
|
||||
if extratitle:
|
||||
plot.title.text = extratitle
|
||||
@@ -5377,7 +5379,7 @@ def interactive_cum_flex_chart2(theworkouts, promember=0,
|
||||
|
||||
mylayout = layoutrow([thesliders, plot])
|
||||
|
||||
mylayout.sizing_mode = 'stretch_both'
|
||||
#mylayout.sizing_mode = 'stretch_both'
|
||||
|
||||
script, div = components(mylayout)
|
||||
js_resources = INLINE.render_js()
|
||||
@@ -5523,23 +5525,23 @@ def interactive_flexchart_stacked(id, r, xparam='time',
|
||||
TOOLS = 'box_zoom,wheel_zoom,reset,tap,hover'
|
||||
TOOLS2 = 'box_zoom,hover'
|
||||
|
||||
plot1 = Figure(x_axis_type=x_axis_type, y_axis_type=y1_axis_type, plot_width=920, plot_height=150,
|
||||
plot1 = figure(x_axis_type=x_axis_type, y_axis_type=y1_axis_type, width=920, height=150,
|
||||
tools=TOOLS, toolbar_location='above')
|
||||
plot2 = Figure(x_axis_type=x_axis_type, y_axis_type=y2_axis_type, plot_width=920, plot_height=150,
|
||||
plot2 = figure(x_axis_type=x_axis_type, y_axis_type=y2_axis_type, width=920, height=150,
|
||||
tools=TOOLS2, toolbar_location=None)
|
||||
plot3 = Figure(x_axis_type=x_axis_type, y_axis_type=y3_axis_type, plot_width=920, plot_height=150,
|
||||
plot3 = figure(x_axis_type=x_axis_type, y_axis_type=y3_axis_type, width=920, height=150,
|
||||
tools=TOOLS2, toolbar_location=None)
|
||||
plot4 = Figure(x_axis_type=x_axis_type, y_axis_type=y4_axis_type, plot_width=920, plot_height=150,
|
||||
plot4 = figure(x_axis_type=x_axis_type, y_axis_type=y4_axis_type, width=920, height=150,
|
||||
tools=TOOLS2, toolbar_location=None)
|
||||
|
||||
plot1.xaxis.visible = False
|
||||
plot2.xaxis.visible = False
|
||||
plot3.xaxis.visible = False
|
||||
|
||||
plot1.sizing_mode = 'stretch_both'
|
||||
plot2.sizing_mode = 'stretch_both'
|
||||
plot3.sizing_mode = 'stretch_both'
|
||||
plot4.sizing_mode = 'stretch_both'
|
||||
#plot1.sizing_mode = 'stretch_both'
|
||||
#plot2.sizing_mode = 'stretch_both'
|
||||
#plot3.sizing_mode = 'stretch_both'
|
||||
#plot4.sizing_mode = 'stretch_both'
|
||||
|
||||
linked_crosshair = CrosshairTool(dimensions="height")
|
||||
plot1.add_tools(linked_crosshair)
|
||||
@@ -5734,7 +5736,7 @@ def interactive_flexchart_stacked(id, r, xparam='time',
|
||||
plot4,
|
||||
])
|
||||
|
||||
mylayout.sizing_mode = 'stretch_both'
|
||||
#mylayout.sizing_mode = 'stretch_both'
|
||||
|
||||
script, div = components(mylayout)
|
||||
js_resources = INLINE.render_js()
|
||||
@@ -5939,11 +5941,11 @@ def interactive_flex_chart2(id, r, promember=0,
|
||||
else:
|
||||
TOOLS = 'pan,box_zoom,wheel_zoom,reset,tap,hover,crosshair'
|
||||
|
||||
plot = Figure(x_axis_type=x_axis_type, y_axis_type=y_axis_type,
|
||||
plot = figure(x_axis_type=x_axis_type, y_axis_type=y_axis_type,
|
||||
tools=TOOLS, toolbar_location='above',
|
||||
toolbar_sticky=False, plot_width=800, plot_height=600,
|
||||
toolbar_sticky=False, width=800, height=600,
|
||||
)
|
||||
plot.sizing_mode = 'stretch_both'
|
||||
#plot.sizing_mode = 'stretch_both'
|
||||
|
||||
# add watermark
|
||||
watermarkurl = "/static/img/logo7.png"
|
||||
@@ -5956,7 +5958,7 @@ def interactive_flex_chart2(id, r, promember=0,
|
||||
watermarkanchor = 'bottom_right'
|
||||
plot.extra_y_ranges = {"watermark": watermarkrange}
|
||||
plot.extra_x_ranges = {"watermark": watermarkrange}
|
||||
plot.sizing_mode = 'stretch_both'
|
||||
#plot.sizing_mode = 'stretch_both'
|
||||
|
||||
plot.image_url([watermarkurl], watermarkx, watermarky,
|
||||
watermarkw, watermarkh,
|
||||
@@ -6051,7 +6053,7 @@ def interactive_flex_chart2(id, r, promember=0,
|
||||
plot.title.text = row.name
|
||||
plot.title.text_font_size = "1.0em"
|
||||
|
||||
plot.sizing_mode = 'stretch_both'
|
||||
#plot.sizing_mode = 'stretch_both'
|
||||
plot.xaxis.axis_label = xaxlabel
|
||||
|
||||
plot.yaxis.axis_label = yaxlabel
|
||||
@@ -6326,7 +6328,7 @@ def interactive_flex_chart2(id, r, promember=0,
|
||||
mylayout = layoutrow([thesliders, plot])
|
||||
|
||||
# layout.sizing_mode = 'stretch_both'
|
||||
mylayout.sizing_mode = 'stretch_both'
|
||||
#mylayout.sizing_mode = 'stretch_both'
|
||||
|
||||
script, div = components(mylayout)
|
||||
js_resources = INLINE.render_js()
|
||||
@@ -6381,7 +6383,7 @@ def thumbnails_set(r, id, favorites):
|
||||
rowdata['time'].max(), maxlength)
|
||||
groups = rowdata.groupby(np.digitize(rowdata['time'], bins))
|
||||
rowdata = groups.mean()
|
||||
except KeyError: # pragma: no cover
|
||||
except (KeyError, TypeError): # pragma: no cover
|
||||
pass
|
||||
|
||||
for f in favorites:
|
||||
@@ -6475,8 +6477,8 @@ def thumbnail_flex_chart(rowdata, id=0, promember=0,
|
||||
rowdata
|
||||
)
|
||||
|
||||
plot = Figure(x_axis_type=x_axis_type, y_axis_type=y_axis_type,
|
||||
plot_width=200, plot_height=150,
|
||||
plot = figure(x_axis_type=x_axis_type, y_axis_type=y_axis_type,
|
||||
width=200, height=150,
|
||||
)
|
||||
|
||||
|
||||
@@ -6639,10 +6641,10 @@ def interactive_multiple_compare_chart(ids, xparam, yparam, plottype='line',
|
||||
if xparam == 'time':
|
||||
x_axis_type = 'datetime'
|
||||
|
||||
plot = Figure(x_axis_type=x_axis_type, y_axis_type=y_axis_type,
|
||||
plot = figure(x_axis_type=x_axis_type, y_axis_type=y_axis_type,
|
||||
tools=TOOLS,
|
||||
toolbar_location="above",
|
||||
plot_width=920, plot_height=500,
|
||||
width=920, height=500,
|
||||
toolbar_sticky=False)
|
||||
|
||||
# add watermark
|
||||
@@ -6653,7 +6655,7 @@ def interactive_multiple_compare_chart(ids, xparam, yparam, plottype='line',
|
||||
watermarkh = 35
|
||||
plot.extra_y_ranges = {"watermark": watermarkrange}
|
||||
plot.extra_x_ranges = {"watermark": watermarkrange}
|
||||
plot.sizing_mode = 'stretch_both'
|
||||
#plot.sizing_mode = 'stretch_both'
|
||||
|
||||
plot.image_url([watermarkurl], 0.05, 0.9,
|
||||
watermarkw, watermarkh,
|
||||
@@ -6820,9 +6822,9 @@ def interactive_otw_advanced_pace_chart(id=0, promember=0):
|
||||
rowdata
|
||||
)
|
||||
|
||||
plot = Figure(x_axis_type="datetime", y_axis_type="datetime",
|
||||
plot = figure(x_axis_type="datetime", y_axis_type="datetime",
|
||||
tools=TOOLS,
|
||||
plot_width=920,
|
||||
width=920,
|
||||
toolbar_sticky=False)
|
||||
|
||||
# add watermark
|
||||
@@ -6850,7 +6852,7 @@ def interactive_otw_advanced_pace_chart(id=0, promember=0):
|
||||
)
|
||||
|
||||
plot.title.text = row.name
|
||||
plot.title.text_font_size = value("1.2em")
|
||||
#plot.title.text_font_size = value("1.2em")
|
||||
plot.xaxis.axis_label = "Time"
|
||||
plot.yaxis.axis_label = "Pace (/500m)"
|
||||
plot.xaxis[0].formatter = DatetimeTickFormatter(
|
||||
@@ -7221,11 +7223,11 @@ def interactive_zoneschart(rower, data, startdate, enddate, trainingzones='hr',
|
||||
if yaxis == 'percentage':
|
||||
p.yaxis.axis_label = 'Percentage'
|
||||
|
||||
p.plot_width = 550
|
||||
p.plot_height = 350
|
||||
p.width = 550
|
||||
p.height = 350
|
||||
p.toolbar_location = 'right'
|
||||
p.y_range.start = 0
|
||||
p.sizing_mode = 'stretch_both'
|
||||
#p.sizing_mode = 'stretch_both'
|
||||
|
||||
if yaxis == 'percentage':
|
||||
tidy_df = df2.groupby(['date']).sum()
|
||||
@@ -7235,8 +7237,10 @@ def interactive_zoneschart(rower, data, startdate, enddate, trainingzones='hr',
|
||||
p.extra_y_ranges["yax2"] = Range1d(start=0, end=y2rangemax)
|
||||
p.line('date', 'hours', source=source2,
|
||||
y_range_name="yax2", color="black", width=5)
|
||||
p.circle('date', 'hours', source=source2, y_range_name="yax2", color="black", size=10,
|
||||
legend_label='Hours')
|
||||
p.circle('date', 'hours', source=source2, y_range_name="yax2", color="black", size=10)
|
||||
|
||||
# p.circle('date', 'hours', source=source2, y_range_name="yax2", color="black", size=10,
|
||||
# legend_label='Hours')
|
||||
p.add_layout(LinearAxis(y_range_name="yax2",
|
||||
axis_label='Hours'), 'right')
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -137,6 +137,8 @@ def save_scoring(name, user, filename, id=0, notes=""):
|
||||
adaptiveclass = 'None'
|
||||
except KeyError: # pragma: no cover
|
||||
adaptiveclass = 'None'
|
||||
except AttributeError:
|
||||
adaptiveclass = 'None'
|
||||
|
||||
try:
|
||||
skillclass = row['SkillClass']
|
||||
|
||||
@@ -730,7 +730,8 @@ def handle_sporttracks_sync(workoutid, url, headers, data, debug=False, **kwargs
|
||||
|
||||
|
||||
@app.task
|
||||
def handle_strava_sync(stravatoken, workoutid, filename, name, activity_type, description, debug=False, **kwargs):
|
||||
def handle_strava_sync(stravatoken,
|
||||
workoutid, filename, name, activity_type, description, debug=False, **kwargs):
|
||||
client = stravalib.Client(access_token=stravatoken)
|
||||
failed = False
|
||||
try:
|
||||
@@ -738,7 +739,7 @@ def handle_strava_sync(stravatoken, workoutid, filename, name, activity_type, de
|
||||
try:
|
||||
act = client.upload_activity(f, 'tcx.gz', name=name)
|
||||
try:
|
||||
res = act.wait(poll_interval=1.0, timeout=10)
|
||||
res = act.wait(poll_interval=1.0, timeout=30)
|
||||
except stravalib.exc.ActivityUploadFailed: # pragma: no cover
|
||||
dologging('strava_fail.log', 'Strava upload failed for Workout {id} ActivityUploadFailed'.format(
|
||||
id=workoutid))
|
||||
@@ -3693,12 +3694,13 @@ def handle_c2_async_workout(alldata, userid, c2token, c2id, delaysec,
|
||||
newc2id = workout.uploadedtoc2
|
||||
|
||||
parkedids = []
|
||||
with open('c2blocked.json', 'r') as c2blocked:
|
||||
with open('c2blocked.json', 'a+') as c2blocked:
|
||||
try:
|
||||
jsondata = json.load(c2blocked)
|
||||
parkedids = jsondata['ids']
|
||||
except JSONDecodeError: # pragma: no cover
|
||||
parkedids = []
|
||||
|
||||
|
||||
newparkedids = [id for id in parkedids if id != newc2id]
|
||||
with open('c2blocked.json', 'wt') as c2blocked:
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
{% block main %}
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
{% block main %}
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
{% block main %}
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -59,12 +59,12 @@
|
||||
</script>
|
||||
|
||||
<div id="id_css_res">
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-widgets-2.2.3.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-widgets-3.1.1.min.css" type="text/css" />
|
||||
</div>
|
||||
<div id="id_js_res">
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-3.1.1.min.js"></script>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -60,12 +60,12 @@
|
||||
|
||||
|
||||
<div id="id_css_res">
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-widgets-2.2.3.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-widgets-3.1.1.min.css" type="text/css" />
|
||||
</div>
|
||||
<div id="id_js_res">
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-3.1.1.min.js"></script>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="grid_2">
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
{{ js_res | safe }}
|
||||
{{ css_res| safe }}
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.bokeh.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script src="https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
{{ js_res | safe }}
|
||||
{{ css_res| safe }}
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
{{ js_res | safe }}
|
||||
{{ css_res| safe }}
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
{{ js_res | safe }}
|
||||
{{ css_res| safe }}
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
{% block main %}
|
||||
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -60,12 +60,12 @@
|
||||
|
||||
|
||||
<div id="id_css_res">
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-widgets-2.2.3.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-widgets-3.1.1.min.css" type="text/css" />
|
||||
</div>
|
||||
<div id="id_js_res">
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-3.1.1.min.js"></script>
|
||||
</div>
|
||||
|
||||
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
{% block main %}
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
|
||||
{% block main %}
|
||||
<div id="id_css_res">
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-widgets-2.2.3.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-widgets-3.1.1.min.css" type="text/css" />
|
||||
</div>
|
||||
<div id="id_js_res">
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-3.1.1.min.js"></script>
|
||||
</div>
|
||||
|
||||
<script async="true" type="text/javascript">
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
{{ js_res | safe }}
|
||||
{{ css_res| safe }}
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -113,7 +113,7 @@ $( function() {
|
||||
|
||||
{% block main %}
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
|
||||
@@ -209,9 +209,9 @@
|
||||
<a href="{{ request.get_path }}?yaxis=rscore">rScore</a>,
|
||||
<a href="{{ request.get_path }}?yaxis=duration">Time</a>.
|
||||
</p>
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-widgets-2.2.3.min.css" type="text/css" />
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-widgets-3.1.1.min.css" type="text/css" />
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/text/javascript">
|
||||
Bokeh.set_log_level("info")
|
||||
</script>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
{% block main %}
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
{% block main %}
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
{% block main %}
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
{% block main %}
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
{% block main %}
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
<div id="advancedplots" class="grid_6 omega">
|
||||
<div class="grid_6 alpha">
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
{% block main %}
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
{% block main %}
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
{% block main %}
|
||||
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
{% block main %}
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<img src="/static/img/rivercurrent.jpg" width="400">
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
</p>
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
|
||||
{% block main %}
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
|
||||
{% block main %}
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -332,12 +332,18 @@
|
||||
</script>
|
||||
|
||||
<div id="id_css_res">
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-widgets-2.2.3.min.css" type="text/css" />
|
||||
</div>
|
||||
<div id="id_js_res">
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.bokeh.org/bokeh/release/bokeh-3.1.1.min.js"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.1.1.min.js"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.1.1.min.js"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.1.1.min.js"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-3.1.1.min.js"
|
||||
crossorigin="anonymous"></script>
|
||||
</div>
|
||||
|
||||
<script async="true" type="text/javascript">
|
||||
@@ -533,9 +539,10 @@
|
||||
var script = json.script;
|
||||
var div = json.div;
|
||||
$("#id_sitready").remove();
|
||||
$("#id_chart").append(div);
|
||||
console.log(div);
|
||||
$("#id_script").append("<script>"+script+"</s"+"cript>");
|
||||
$("#id_chart").append(div);
|
||||
|
||||
$("#id_script").append(script);
|
||||
/* $("#id_script").append("<script>"+script+"</s"+"cript>"); */
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="grid_2">
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
{% block meta %}
|
||||
{% leaflet_js %}
|
||||
{% leaflet_css %}
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
</li>
|
||||
|
||||
<li class="grid_2">
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -157,7 +157,7 @@ $('#id_workouttype').change();
|
||||
{% endif %}
|
||||
{% if mapdiv %}
|
||||
<li class="grid_2">
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="grid_2">
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-2.2.3.min.js"></script>
|
||||
<script src="https://cdn.pydata.org/bokeh/release/bokeh-3.1.1.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
Bokeh.set_log_level("info");
|
||||
</script>
|
||||
|
||||
@@ -15,7 +15,6 @@ except NameError:
|
||||
|
||||
import pytest
|
||||
|
||||
from pandas.core.common import SettingWithCopyWarning
|
||||
from rowers.courses import howfaris
|
||||
|
||||
import warnings
|
||||
|
||||
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
Binary file not shown.
@@ -414,11 +414,26 @@ def trendflexdata(workouts, options, userid=0):
|
||||
groups = datadf.groupby(pd.cut(datadf['days ago'], bins,
|
||||
labels=False))
|
||||
|
||||
xvalues = groups.mean()[xparam]
|
||||
yvalues = groups.mean()[yparam]
|
||||
xerror = groups.std()[xparam]
|
||||
yerror = groups.std()[yparam]
|
||||
groupsize = groups.count()[xparam]
|
||||
xvalues = []
|
||||
yvalues = []
|
||||
xerror = []
|
||||
yerror = []
|
||||
groupsize = []
|
||||
groupval = []
|
||||
for key, item in groups:
|
||||
xvalues.append(groups.get_group(key)[xparam].mean())
|
||||
yvalues.append(groups.get_group(key)[yparam].mean())
|
||||
xerror.append(groups.get_group(key)[xparam].std())
|
||||
yerror.append(groups.get_group(key)[yparam].std())
|
||||
groupsize.append(len(groups.get_group(key)[xparam]))
|
||||
groupval.append(groups.get_group(key)[groupby].mean())
|
||||
|
||||
|
||||
xvalues = pd.Series(xvalues)
|
||||
yvalues = pd.Series(yvalues)
|
||||
xerror = pd.Series(xerror)
|
||||
yerror = pd.Series(yerror)
|
||||
groupsize = pd.Series(groupsize)
|
||||
|
||||
mask = groupsize <= min([0.01*groupsize.sum(), 0.2*groupsize.mean()])
|
||||
xvalues.loc[mask] = np.nan
|
||||
@@ -458,7 +473,7 @@ def trendflexdata(workouts, options, userid=0):
|
||||
|
||||
if groupby != 'date':
|
||||
try:
|
||||
df['groupval'] = groups.mean()[groupby]
|
||||
df['groupval'] = pd.Series(groupval)
|
||||
df.loc[mask, 'groupval'] = np.nan
|
||||
|
||||
groupcols = df['groupval']
|
||||
@@ -520,8 +535,6 @@ def trendflexdata(workouts, options, userid=0):
|
||||
spmmin=spmmin, spmmax=spmmax,
|
||||
workmin=workmin, workmax=workmax)
|
||||
|
||||
scripta = script.split('\n')[2:-1]
|
||||
script = ''.join(scripta)
|
||||
|
||||
return(script, div)
|
||||
|
||||
@@ -568,9 +581,6 @@ def flexalldata(workouts, options):
|
||||
script = res[0]
|
||||
div = res[1]
|
||||
|
||||
scripta = script.split('\n')[2:-1]
|
||||
script = ''.join(scripta)
|
||||
|
||||
return(script, div)
|
||||
|
||||
|
||||
@@ -605,9 +615,6 @@ def histodata(workouts, options):
|
||||
extratitle=extratitle,
|
||||
workmin=workmin, workmax=workmax)
|
||||
|
||||
scripta = script.split('\n')[2:-1]
|
||||
script = ''.join(scripta)
|
||||
|
||||
return(script, div)
|
||||
|
||||
|
||||
@@ -703,8 +710,8 @@ def cpdata(workouts, options):
|
||||
p1 = [1, 1, 1, 1]
|
||||
ratio = 1
|
||||
|
||||
scripta = script.split('\n')[2:-1]
|
||||
script = ''.join(scripta)
|
||||
|
||||
|
||||
|
||||
minutes = options['piece']
|
||||
if minutes != 0:
|
||||
@@ -883,9 +890,6 @@ def comparisondata(workouts, options):
|
||||
script = res[0]
|
||||
div = res[1]
|
||||
|
||||
scripta = script.split('\n')[2:-1]
|
||||
script = ''.join(scripta)
|
||||
|
||||
return(script, div)
|
||||
|
||||
|
||||
@@ -949,8 +953,6 @@ def boxplotdata(workouts, options):
|
||||
spmmin=spmmin, spmmax=spmmax,
|
||||
workmin=workmin, workmax=workmax)
|
||||
|
||||
scripta = script.split('\n')[2:-1]
|
||||
script = ''.join(scripta)
|
||||
|
||||
return(script, div)
|
||||
|
||||
|
||||
@@ -3859,6 +3859,8 @@ def workout_stats_view(request, id=0, message="", successmessage=""):
|
||||
except KeyError: # pragma: no cover
|
||||
pass
|
||||
|
||||
datadf = datadf.select_dtypes([np.number])
|
||||
|
||||
# Create a dict with correlation values
|
||||
cor = datadf.corr(method='spearman')
|
||||
cor.fillna(value=0, inplace=True)
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
<title>{% block title %}Rowsandall Rowing Data Analytics{% endblock %}</title>
|
||||
{% analytical_head_top %}
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-1.0.4.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.0.4.min.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="/static/admin/css/forms.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="/static/admin/css/widgets.css"/>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" >
|
||||
@@ -60,7 +58,6 @@
|
||||
}(document, 'script', 'facebook-jssdk'));</script>
|
||||
<script>
|
||||
$(document).ready(function (){
|
||||
FB.XFBML.parse();
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user