fix
This commit is contained in:
@@ -1276,7 +1276,10 @@ def interactive_forcecurve(theworkouts, workstrokesonly=True, plottype='scatter'
|
||||
|
||||
plot.xaxis.axis_label = "Angle"
|
||||
plot.yaxis.axis_label = "Force (N)"
|
||||
plot.title.text = theworkouts[0].name
|
||||
try:
|
||||
plot.title.text = theworkouts[0].name
|
||||
except ValueError:
|
||||
plot.title.text = ""
|
||||
plot.title.text_font_size = "1.0em"
|
||||
|
||||
yrange1 = Range1d(start=0, end=900)
|
||||
@@ -4060,7 +4063,10 @@ def interactive_windchart(id=0, promember=0):
|
||||
plot.line('dist', 'vwind', source=source, legend_label="Wind Speed (m/s)")
|
||||
plot.line('dist', 'tw', source=source,
|
||||
legend_label="Tail (+)/Head (-) Wind (m/s)", color='black')
|
||||
plot.title.text = row.name
|
||||
try:
|
||||
plot.title.text = row.name
|
||||
except ValueError:
|
||||
plot.title.text = ""
|
||||
# plot.title.text_font_size="1.0em"
|
||||
plot.title.text_font = "1.0em"
|
||||
plot.xaxis.axis_label = "Distance (m)"
|
||||
@@ -4127,7 +4133,10 @@ def interactive_streamchart(id=0, promember=0):
|
||||
toolbar_sticky=False,
|
||||
)
|
||||
plot.line(dist, vstream, legend_label="River Stream Velocity (m/s)")
|
||||
plot.title.text = row.name
|
||||
try:
|
||||
plot.title.text = row.name
|
||||
except ValueError:
|
||||
plot.title.text = ""
|
||||
plot.title.text_font_size = "1.0em"
|
||||
plot.xaxis.axis_label = "Distance (m)"
|
||||
plot.yaxis.axis_label = "River Current (m/s)"
|
||||
@@ -4253,7 +4262,6 @@ def forcecurve_multi_interactive_chart(selected):
|
||||
return (script, div)
|
||||
|
||||
def instroke_multi_interactive_chart(selected, *args, **kwargs):
|
||||
|
||||
df_plot = pd.DataFrame()
|
||||
ids = [analysis.id for analysis in selected]
|
||||
metrics = list(set([analysis.metric for analysis in selected]))
|
||||
@@ -4358,7 +4366,6 @@ def instroke_interactive_chart(df,metric, workout, spm_min, spm_max,
|
||||
individual_curves,
|
||||
name='',notes=''):
|
||||
|
||||
|
||||
df_pos = (df+abs(df))/2.
|
||||
df_min = -(-df+abs(-df))/2.
|
||||
|
||||
@@ -4372,6 +4379,7 @@ def instroke_interactive_chart(df,metric, workout, spm_min, spm_max,
|
||||
q25min = df_min.quantile(q=0.25).replace(0,np.nan)
|
||||
|
||||
|
||||
mean_vals = mean_vals.interpolate()
|
||||
|
||||
xvals = np.arange(len(mean_vals))
|
||||
|
||||
@@ -4581,7 +4589,10 @@ def interactive_chart(id=0, promember=0, intervaldata={}):
|
||||
)
|
||||
|
||||
plot.line('time', 'pace', source=source, legend_label="Pace", name="pace")
|
||||
plot.title.text = row.name
|
||||
try:
|
||||
plot.title.text = row.name
|
||||
except ValueError:
|
||||
plot.title.text = ""
|
||||
plot.title.text_font_size = "1.0em"
|
||||
#plot.sizing_mode = 'stretch_both'
|
||||
plot.xaxis.axis_label = "Time"
|
||||
@@ -6040,7 +6051,10 @@ def interactive_flex_chart2(id, r, promember=0,
|
||||
plot.scatter('x1', 'y1', source=source2, legend_label=yaxlabel, fill_alpha=0.4,
|
||||
line_color=None)
|
||||
|
||||
plot.title.text = row.name
|
||||
try:
|
||||
plot.title.text = row.name
|
||||
except ValueError:
|
||||
plot.title.text = ""
|
||||
plot.title.text_font_size = "1.0em"
|
||||
|
||||
#plot.sizing_mode = 'stretch_both'
|
||||
@@ -6841,7 +6855,10 @@ def interactive_otw_advanced_pace_chart(id=0, promember=0):
|
||||
y_range_name="watermark",
|
||||
)
|
||||
|
||||
plot.title.text = row.name
|
||||
try:
|
||||
plot.title.text = row.name
|
||||
except ValueError:
|
||||
plot.title.text = ""
|
||||
#plot.title.text_font_size = value("1.2em")
|
||||
plot.xaxis.axis_label = "Time"
|
||||
plot.yaxis.axis_label = "Pace (/500m)"
|
||||
|
||||
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
Binary file not shown.
@@ -81,6 +81,8 @@ def rower_integration_authorize(request, source='c2'):
|
||||
return rower_garmin_authorize(request)
|
||||
if source == 'rojabo':
|
||||
return rower_rojabo_authorize(request)
|
||||
if source == 'polar':
|
||||
return rower_polar_authorize(request)
|
||||
url = integration.make_authorization_url()
|
||||
return HttpResponseRedirect(url)
|
||||
|
||||
@@ -96,7 +98,7 @@ def rower_garmin_authorize(request): # pragma: no cover
|
||||
|
||||
# Polar Authorization
|
||||
@login_required()
|
||||
def rower_polar_authorize(request): # pragma: no cover
|
||||
def rower_polar_authorize(request, source='polar'): # pragma: no cover
|
||||
integration = importsources['polar'](request.user)
|
||||
url = integration.make_authorization_url()
|
||||
return HttpResponseRedirect(url)
|
||||
@@ -372,7 +374,11 @@ def workout_import_view(request, source='c2'):
|
||||
_ = integration.open()
|
||||
except NoTokenError: # pragma: no cover
|
||||
try:
|
||||
url = reverse(importauthorizeviews[source],kwargs={'source':source})
|
||||
theview = importauthorizeviews[source]
|
||||
if theview == 'rower_integration_authorize':
|
||||
url = reverse(theview,kwargs={'source':source})
|
||||
else:
|
||||
url = reverse(theview)
|
||||
return HttpResponseRedirect(url)
|
||||
except KeyError:
|
||||
messages.error(request,'Sorry, an error occurred. Please reauthorize')
|
||||
|
||||
Reference in New Issue
Block a user