Private
Public Access
1
0

3.6.0 for py39

This commit is contained in:
2023-06-04 16:53:55 +02:00
parent 206ee219f3
commit 1a082d8908
7 changed files with 16 additions and 15 deletions

View File

@@ -786,9 +786,9 @@ def split_workout(r, parent, splitsecond, splitmode):
data1.fillna(method='bfill', inplace=True) data1.fillna(method='bfill', inplace=True)
# Some new stuff to try out # Some new stuff to try out
data1 = data1.groupby('time', axis=0).mean() #data1 = data1.groupby('time', axis=0).mean()
data1['time'] = data1.index #data1['time'] = data1.index
data1.reset_index(drop=True, inplace=True) #data1.reset_index(drop=True, inplace=True)
data2 = data2.sort_values(['time']) data2 = data2.sort_values(['time'])
data2 = data2.interpolate(method='linear', axis=0, limit_direction='both', 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) data2.fillna(method='bfill', inplace=True)
# Some new stuff to try out # Some new stuff to try out
data2 = data2.groupby('time', axis=0).mean() #data2 = data2.groupby('time', axis=0).mean()
data2['time'] = data2.index #data2['time'] = data2.index
data2.reset_index(drop=True, inplace=True) #data2.reset_index(drop=True, inplace=True)
data1['pace'] = data1['pace'] / 1000. data1['pace'] = data1['pace'] / 1000.
data2['pace'] = data2['pace'] / 1000. data2['pace'] = data2['pace'] / 1000.

View File

@@ -1480,7 +1480,7 @@ def datafusion(id1, id2, columns, offset):
'fpace', 'fpace',
'workoutid', 'workoutid',
'id'], 'id'],
1, errors='ignore') axis=1, errors='ignore')
# Add coordinates to DataFrame # Add coordinates to DataFrame
latitude, longitude = get_latlon(id1) latitude, longitude = get_latlon(id1)
@@ -1503,7 +1503,7 @@ def datafusion(id1, id2, columns, offset):
for c in df1.columns: for c in df1.columns:
if c not in keep1: 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 = pd.concat([df1, df2], ignore_index=True)
df = df.sort_values(['time']) df = df.sort_values(['time'])
@@ -1512,9 +1512,9 @@ def datafusion(id1, id2, columns, offset):
df.fillna(method='bfill', inplace=True) df.fillna(method='bfill', inplace=True)
# Some new stuff to try out # Some new stuff to try out
df = df.groupby('time', axis=0).mean() #df = df.groupby('time',axis=0).mean()
df['time'] = df.index #df['time'] = df.index
df.reset_index(drop=True, inplace=True) #df.reset_index(drop=True, inplace=True)
df['time'] = df['time'] / 1000. df['time'] = df['time'] / 1000.
df['pace'] = df['pace'] / 1000. df['pace'] = df['pace'] / 1000.

View File

@@ -4655,7 +4655,7 @@ def interactive_chart(id=0, promember=0, intervaldata={}):
]) ])
hover.mode = 'mouse' hover.mode = 'mouse'
hover.names = ["spm", "pace"] # hover.name = ["spm", "pace"]
script, div = components(plot) script, div = components(plot)

View File

@@ -137,6 +137,8 @@ def save_scoring(name, user, filename, id=0, notes=""):
adaptiveclass = 'None' adaptiveclass = 'None'
except KeyError: # pragma: no cover except KeyError: # pragma: no cover
adaptiveclass = 'None' adaptiveclass = 'None'
except AttributeError:
adaptiveclass = 'None'
try: try:
skillclass = row['SkillClass'] skillclass = row['SkillClass']

View File

@@ -3691,12 +3691,13 @@ def handle_c2_async_workout(alldata, userid, c2token, c2id, delaysec,
newc2id = workout.uploadedtoc2 newc2id = workout.uploadedtoc2
parkedids = [] parkedids = []
with open('c2blocked.json', 'r') as c2blocked: with open('c2blocked.json', 'a+') as c2blocked:
try: try:
jsondata = json.load(c2blocked) jsondata = json.load(c2blocked)
parkedids = jsondata['ids'] parkedids = jsondata['ids']
except JSONDecodeError: # pragma: no cover except JSONDecodeError: # pragma: no cover
parkedids = [] parkedids = []
newparkedids = [id for id in parkedids if id != newc2id] newparkedids = [id for id in parkedids if id != newc2id]
with open('c2blocked.json', 'wt') as c2blocked: with open('c2blocked.json', 'wt') as c2blocked:

Binary file not shown.

View File

@@ -12,8 +12,6 @@
<title>{% block title %}Rowsandall Rowing Data Analytics{% endblock %}</title> <title>{% block title %}Rowsandall Rowing Data Analytics{% endblock %}</title>
{% analytical_head_top %} {% analytical_head_top %}
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-1.0.4.min.css" type="text/css" />
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-widgets-1.0.4.min.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="/static/admin/css/forms.css"/> <link rel="stylesheet" type="text/css" href="/static/admin/css/forms.css"/>
<link rel="stylesheet" type="text/css" href="/static/admin/css/widgets.css"/> <link rel="stylesheet" type="text/css" href="/static/admin/css/widgets.css"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" > <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" >