Merge branch 'release/v18.1.0'
This commit is contained in:
@@ -147,15 +147,17 @@ class StravaIntegration(SyncIntegration):
|
||||
row.exporttotcx(tcxfilename, notes=newnotes)
|
||||
if dozip:
|
||||
gzfilename = tcxfilename+'.gz'
|
||||
with open(tcxfilename, 'rb') as inF:
|
||||
s = inF.read()
|
||||
with gzip.GzipFile(gzfilename, 'wb') as outF:
|
||||
outF.write(s)
|
||||
|
||||
try:
|
||||
os.remove(tcxfilename)
|
||||
except WindowError: # pragma: no cover
|
||||
pass
|
||||
with open(tcxfilename, 'rb') as inF:
|
||||
s = inF.read()
|
||||
with gzip.GzipFile(gzfilename, 'wb') as outF:
|
||||
outF.write(s)
|
||||
try:
|
||||
os.remove(tcxfilename)
|
||||
except WindowError: # pragma: no cover
|
||||
pass
|
||||
except FileNotFoundError:
|
||||
return ''
|
||||
|
||||
return gzfilename
|
||||
|
||||
|
||||
@@ -1506,6 +1506,10 @@ def weightfromrecord(row,metricchoice):
|
||||
if vv == 0:
|
||||
if metricchoice == 'rscore' and row['hrtss'] > 0: # pragma: no cover
|
||||
return row['hrtss']
|
||||
else:
|
||||
dd = 3600*row['duration'].hour+60*row['duration'].minute+row['duration'].second
|
||||
dd = dd/3600
|
||||
return rpetotss[row['rpe']]*dd
|
||||
if vv < 0:
|
||||
w = Workout.objects.get(id=row['id'])
|
||||
trimp, hrtss = dataprep.workout_trimp(w)
|
||||
@@ -4955,7 +4959,7 @@ def interactive_multiflex(datadf, xparam, yparam, groupby, extratitle='',
|
||||
text_color='black', text_font_size='10pt',
|
||||
)
|
||||
|
||||
slidertext = 'SPM: {:.0f}-{:.0f}, WpS: {:.0f}-{:.0f}'.format(
|
||||
slidertext = "SPM: {:.0f}-{:.0f}, WpS: {:.0f}-{:.0f}".format(
|
||||
spmmin, spmmax, workmin, workmax
|
||||
)
|
||||
sliderlabel = Label(x=50, y=20, x_units='screen', y_units='screen',
|
||||
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user