diff --git a/rowers/dataprep.py b/rowers/dataprep.py index c042b4af..d68d01d4 100644 --- a/rowers/dataprep.py +++ b/rowers/dataprep.py @@ -786,9 +786,9 @@ def split_workout(r, parent, splitsecond, splitmode): data1.fillna(method='bfill', inplace=True) # Some new stuff to try out - data1 = data1.groupby('time', axis=0).mean() - data1['time'] = data1.index - data1.reset_index(drop=True, inplace=True) + #data1 = data1.groupby('time', axis=0).mean() + #data1['time'] = data1.index + #data1.reset_index(drop=True, inplace=True) data2 = data2.sort_values(['time']) data2 = data2.interpolate(method='linear', axis=0, limit_direction='both', @@ -796,9 +796,9 @@ def split_workout(r, parent, splitsecond, splitmode): data2.fillna(method='bfill', inplace=True) # Some new stuff to try out - data2 = data2.groupby('time', axis=0).mean() - data2['time'] = data2.index - data2.reset_index(drop=True, inplace=True) + #data2 = data2.groupby('time', axis=0).mean() + #data2['time'] = data2.index + #data2.reset_index(drop=True, inplace=True) data1['pace'] = data1['pace'] / 1000. data2['pace'] = data2['pace'] / 1000. diff --git a/rowers/dataroutines.py b/rowers/dataroutines.py index 1d439969..74d82a9b 100644 --- a/rowers/dataroutines.py +++ b/rowers/dataroutines.py @@ -1480,7 +1480,7 @@ def datafusion(id1, id2, columns, offset): 'fpace', 'workoutid', 'id'], - 1, errors='ignore') + axis=1, errors='ignore') # Add coordinates to DataFrame latitude, longitude = get_latlon(id1) @@ -1503,7 +1503,7 @@ def datafusion(id1, id2, columns, offset): for c in df1.columns: if c not in keep1: - df1 = df1.drop(c, 1, errors='ignore') + df1 = df1.drop(c, axis=1, errors='ignore') df = pd.concat([df1, df2], ignore_index=True) df = df.sort_values(['time']) @@ -1512,9 +1512,9 @@ def datafusion(id1, id2, columns, offset): df.fillna(method='bfill', inplace=True) # Some new stuff to try out - df = df.groupby('time', axis=0).mean() - df['time'] = df.index - df.reset_index(drop=True, inplace=True) + #df = df.groupby('time',axis=0).mean() + #df['time'] = df.index + #df.reset_index(drop=True, inplace=True) df['time'] = df['time'] / 1000. df['pace'] = df['pace'] / 1000. diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index 91bb53b1..c8da52f2 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -4655,7 +4655,7 @@ def interactive_chart(id=0, promember=0, intervaldata={}): ]) hover.mode = 'mouse' - hover.names = ["spm", "pace"] + # hover.name = ["spm", "pace"] script, div = components(plot) diff --git a/rowers/scoring.py b/rowers/scoring.py index ab692240..678f3a62 100644 --- a/rowers/scoring.py +++ b/rowers/scoring.py @@ -137,6 +137,8 @@ def save_scoring(name, user, filename, id=0, notes=""): adaptiveclass = 'None' except KeyError: # pragma: no cover adaptiveclass = 'None' + except AttributeError: + adaptiveclass = 'None' try: skillclass = row['SkillClass'] diff --git a/rowers/tasks.py b/rowers/tasks.py index fa27043c..99ab4353 100644 --- a/rowers/tasks.py +++ b/rowers/tasks.py @@ -3691,12 +3691,13 @@ def handle_c2_async_workout(alldata, userid, c2token, c2id, delaysec, newc2id = workout.uploadedtoc2 parkedids = [] - with open('c2blocked.json', 'r') as c2blocked: + with open('c2blocked.json', 'a+') as c2blocked: try: jsondata = json.load(c2blocked) parkedids = jsondata['ids'] except JSONDecodeError: # pragma: no cover parkedids = [] + newparkedids = [id for id in parkedids if id != newc2id] with open('c2blocked.json', 'wt') as c2blocked: diff --git a/rowers/tests/testdata/testdata.tcx.gz b/rowers/tests/testdata/testdata.tcx.gz index 4d0a992c..d34d12c1 100644 Binary files a/rowers/tests/testdata/testdata.tcx.gz and b/rowers/tests/testdata/testdata.tcx.gz differ diff --git a/templates/newbase.html b/templates/newbase.html index 1771e66e..b2c32821 100644 --- a/templates/newbase.html +++ b/templates/newbase.html @@ -12,8 +12,6 @@