Private
Public Access
1
0
This commit is contained in:
2024-09-24 19:05:03 +02:00
parent ba856d3005
commit c0eea2124a
6 changed files with 7 additions and 3 deletions

View File

@@ -1207,6 +1207,9 @@ def save_workout_database(f2, r, dosmooth=True, workouttype='rower',
except KeyError:
pass
# remove zero power
row.df[' Power (watts)'].replace(to_replace=0,method='ffill', inplace=True)
if dosmooth:
# auto smoothing
pace = row.df[' Stroke500mPace (sec/500m)'].values

View File

@@ -442,7 +442,6 @@ def interactive_activitychart2(workouts, startdate, enddate, stack='type',
'colors': mytypes.color_map,
}
script, div = get_chart("/activity_bar", chart_data, debug=False)
return script, div

View File

@@ -4460,6 +4460,8 @@ class WorkoutForm(ModelForm):
'duration': forms.TimeInput(format='%H:%M:%S.%f'),
}
boatname = forms.CharField(widget=forms.Textarea, required=False)
def __init__(self, *args, **kwargs):
super(WorkoutForm, self).__init__(*args, **kwargs)
self.fields['private'] = forms.BooleanField(initial=False,

View File

@@ -373,7 +373,7 @@ color_map = {
'coastal': 'navy', # '#bcbd22',
'c-boat': 'lightsteelblue', # '#ffbb78',
'churchboat': 'midnightblue', # '#17becf',
'Ride': 'hotpink', # '#3182bd',
'Ride': 'deeppink', # '#3182bd',
'Bike': 'deeppink',
'bike': 'deeppink', # '#e6550d',
'Run': 'green', # '#ff9896',

View File

@@ -160,7 +160,7 @@ class ForceUnits(TestCase):
df = dataprep.read_data(['averageforce'],ids=[13])
df = dataprep.remove_nulls_pl(df)
average_N = int(df['averageforce'].mean())
self.assertEqual(average_N,122)
self.assertEqual(average_N,119)
@override_settings(TESTING=True)
class TestForceUnit(TestCase):

Binary file not shown.