Merge branch 'release/v10.24'
This commit is contained in:
@@ -111,6 +111,9 @@ def alert_get_stats(alert,nperiod=0):
|
||||
'nr_strokes_qualifying':0,
|
||||
'percentage':0,
|
||||
'nperiod':nperiod,
|
||||
'median': 0,
|
||||
'median_q': 0,
|
||||
'standard_dev': 0,
|
||||
}
|
||||
|
||||
# check if filters are in columns list
|
||||
@@ -143,6 +146,9 @@ def alert_get_stats(alert,nperiod=0):
|
||||
'nr_strokes_qualifying':0,
|
||||
'percentage':0,
|
||||
'nperiod':nperiod,
|
||||
'median': 0,
|
||||
'median_q': 0,
|
||||
'standard_dev': 0,
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1104,7 +1104,11 @@ def dataprep(rowdatadf,id=0,bands=True,barchart=True,otwpower=True,
|
||||
if barchart:
|
||||
# time increments for bar chart
|
||||
time_increments = rowdatadf.loc[:,' ElapsedTime (sec)'].diff()
|
||||
time_increments[0] = time_increments[1]
|
||||
try:
|
||||
time_increments.iloc[0] = time_increments.iloc[1]
|
||||
except (KeyError, IndexError):
|
||||
time_increments.iloc[1] = 1.
|
||||
|
||||
time_increments = 0.5*time_increments+0.5*np.abs(time_increments)
|
||||
x_right = (t2+time_increments.apply(lambda x:timedeltaconv(x)))
|
||||
|
||||
|
||||
+6
-6
@@ -77,7 +77,7 @@ stmapping = collections.OrderedDict({
|
||||
'water':'Rowing',
|
||||
'rower':'Rowing',
|
||||
'skierg':'Skiing:Nordic',
|
||||
'bike':'Cycling',
|
||||
'Bike':'Cycling',
|
||||
'bikeerg':'Cycling',
|
||||
'dynamic':'Rowing',
|
||||
'slides':'Rowing',
|
||||
@@ -110,7 +110,7 @@ rkmapping = collections.OrderedDict({
|
||||
'water':'Rowing',
|
||||
'rower':'Rowing',
|
||||
'skierg':'Cross-Country Skiing',
|
||||
'bike':'Cycling',
|
||||
'Bike':'Cycling',
|
||||
'bikeerg':'Cycling',
|
||||
'dynamic':'Rowing',
|
||||
'slides':'Rowing',
|
||||
@@ -141,7 +141,7 @@ polarmapping = collections.OrderedDict({
|
||||
'water':'Rowing',
|
||||
'rower':'Rowing',
|
||||
'skierg':'Skiing',
|
||||
'bike':'Cycling',
|
||||
'Bike':'Cycling',
|
||||
'bikeerg':'Cycling',
|
||||
'dynamic':'Rowing',
|
||||
'slides':'Rowing',
|
||||
@@ -172,8 +172,8 @@ tpmapping = collections.OrderedDict({
|
||||
'water':'rowing',
|
||||
'rower':'rowing',
|
||||
'skierg':'xc-ski',
|
||||
'bike':'bike',
|
||||
'bikeerg':'bike',
|
||||
'Bike':'bike',
|
||||
'Bikeerg':'bike',
|
||||
'dynamic':'rowing',
|
||||
'slides':'rowing',
|
||||
'paddle':'other',
|
||||
@@ -203,7 +203,7 @@ c2mapping = collections.OrderedDict({
|
||||
'water':'water',
|
||||
'rower':'rower',
|
||||
'skierg':'skierg',
|
||||
'bike':'bike',
|
||||
'Bike':'bike',
|
||||
'bikeerg':'bike',
|
||||
'dynamic':'dynamic',
|
||||
'slides':'slides',
|
||||
|
||||
+24
-5
@@ -791,14 +791,33 @@ def handle_send_email_alert(
|
||||
othertexts = None
|
||||
|
||||
report = {}
|
||||
report['Percentage'] = int(stats['percentage'])
|
||||
report['Number of workouts'] = int(stats['workouts'])
|
||||
report['Data set'] = "{a} strokes out of {b}".format(
|
||||
try:
|
||||
report['Percentage'] = int(stats['percentage'])
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
try:
|
||||
report['Number of workouts'] = int(stats['workouts'])
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
try:
|
||||
report['Data set'] = "{a} strokes out of {b}".format(
|
||||
a = stats['nr_strokes_qualifying'],
|
||||
b = stats['nr_strokes']
|
||||
)
|
||||
report['Median'] = sigdig(stats['median'])
|
||||
report['Median of qualifying strokes'] = sigdig(stats['median_q'])
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
try:
|
||||
report['Median'] = sigdig(stats['median'])
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
try:
|
||||
report['Median of qualifying strokes'] = sigdig(stats['median_q'])
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
subject = "Rowsandall.com: {alertname} ({startdate} to {enddate})".format(
|
||||
startdate = stats['startdate'],
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
<h2>{{ alert.name }}</h2>
|
||||
<p>{{ alert }}</p>
|
||||
<p>{{ alert.description }}</p>
|
||||
<p>This is a page under construction. Currently with minimal information</p>
|
||||
</li>
|
||||
<li class="rounder">
|
||||
<h2>Score</h2>
|
||||
|
||||
@@ -131,6 +131,18 @@
|
||||
Analyse power vs piece duration to make predictions, for erg pieces.
|
||||
</p>
|
||||
</li>
|
||||
<li class="rounder">
|
||||
<h2>Alerts</h2>
|
||||
<a href="/rowers/alerts/">
|
||||
<div class="vignet">
|
||||
<img src="/static/img/alert2.png" alt="Alerts">
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<p>
|
||||
Need to monitor a metric? Set up automatic alerting and see the reports for your workouts.
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
@@ -64,9 +64,14 @@
|
||||
</li>
|
||||
<li id="stats-histo">
|
||||
<a href="/rowers/user-analysis-select/histo/">
|
||||
<i class="fas fa-chart-bar"></i> Histogram
|
||||
<i class="fas fa-chart-bar fa-fw"></i> Histogram
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/rowers/alerts/">
|
||||
<i class="fas fa-bell fa-fw"></i> Alerts
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
BIN
Binary file not shown.
@@ -100,7 +100,10 @@ def workout_strava_upload_view(request,id=0):
|
||||
if w.workouttype in mytypes.rowtypes:
|
||||
activity_type = r.stravaexportas
|
||||
else:
|
||||
activity_type = mytypes.stravamapping[w.workouttype]
|
||||
try:
|
||||
activity_type = mytypes.stravamapping[w.workouttype]
|
||||
except KeyError:
|
||||
activity_type = 'Ride'
|
||||
|
||||
res,mes = stravastuff.handle_stravaexport(
|
||||
f,w.name,
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
Reference in New Issue
Block a user