3.6.0 for py39
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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']
|
||||
|
||||
@@ -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:
|
||||
|
||||
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
Binary file not shown.
Reference in New Issue
Block a user