Increasing coverage
This commit is contained in:
@@ -4426,6 +4426,7 @@ def instroke_interactive_chart(df,metric, workout, spm_min, spm_max,
|
||||
df_plot
|
||||
)
|
||||
|
||||
|
||||
TIPS = OrderedDict([
|
||||
('x','@x'),
|
||||
('median','@median'),
|
||||
@@ -4515,7 +4516,6 @@ def instroke_interactive_chart(df,metric, workout, spm_min, spm_max,
|
||||
script = ""
|
||||
div = "Something went wrong with the chart"
|
||||
|
||||
|
||||
return (script, div)
|
||||
|
||||
|
||||
@@ -4531,6 +4531,7 @@ def interactive_chart(id=0, promember=0, intervaldata={}):
|
||||
columns = ['time', 'pace', 'hr', 'fpace', 'ftime', 'spm']
|
||||
datadf = dataprep.getsmallrowdata_db(columns, ids=[id])
|
||||
|
||||
|
||||
datadf.dropna(axis=0, how='any', inplace=True)
|
||||
|
||||
row = Workout.objects.get(id=id)
|
||||
@@ -4578,6 +4579,7 @@ def interactive_chart(id=0, promember=0, intervaldata={}):
|
||||
)
|
||||
|
||||
plot.line('time', 'pace', source=source, legend_label="Pace", name="pace")
|
||||
|
||||
try:
|
||||
plot.title.text = row.name
|
||||
except ValueError: # pragma: no cover
|
||||
@@ -4647,7 +4649,6 @@ def interactive_chart(id=0, promember=0, intervaldata={}):
|
||||
|
||||
hover.mode = 'mouse'
|
||||
# hover.name = ["spm", "pace"]
|
||||
|
||||
script, div = components(plot)
|
||||
|
||||
return [script, div]
|
||||
@@ -5915,7 +5916,7 @@ def interactive_flex_chart2(id, r, promember=0,
|
||||
popt, pcov = optimize.curve_fit(func, x1, y1)
|
||||
ytrend = func(x1, popt[0], popt[1])
|
||||
rowdata['ytrend'] = ytrend
|
||||
except TypeError:
|
||||
except TypeError: # pragma: no cover
|
||||
rowdata['ytrend'] = y1
|
||||
|
||||
# prepare data
|
||||
|
||||
Reference in New Issue
Block a user