Merge branch 'release/v13.45'
This commit is contained in:
+12
-7
@@ -3,7 +3,6 @@ apipkg==1.5
|
|||||||
appdirs==1.4.3
|
appdirs==1.4.3
|
||||||
arcgis==1.6.0
|
arcgis==1.6.0
|
||||||
arrow==0.13.1
|
arrow==0.13.1
|
||||||
asgiref==3.2.7
|
|
||||||
asn1crypto==0.24.0
|
asn1crypto==0.24.0
|
||||||
atomicwrites==1.3.0
|
atomicwrites==1.3.0
|
||||||
attrs==19.1.0
|
attrs==19.1.0
|
||||||
@@ -29,7 +28,7 @@ cookies==2.2.1
|
|||||||
coreapi==2.3.3
|
coreapi==2.3.3
|
||||||
coreschema==0.0.4
|
coreschema==0.0.4
|
||||||
coverage==4.5.3
|
coverage==4.5.3
|
||||||
cryptography==2.6.1
|
cryptography==2.9.2
|
||||||
cycler==0.10.0
|
cycler==0.10.0
|
||||||
dask==2.6.0
|
dask==2.6.0
|
||||||
decorator==4.4.0
|
decorator==4.4.0
|
||||||
@@ -59,6 +58,7 @@ django-rq-dashboard==0.3.3
|
|||||||
django-ses==1.0.0
|
django-ses==1.0.0
|
||||||
django-shell-plus==1.1.7
|
django-shell-plus==1.1.7
|
||||||
django-social-share==1.3.2
|
django-social-share==1.3.2
|
||||||
|
django-sslserver==0.22
|
||||||
django-suit==0.2.26
|
django-suit==0.2.26
|
||||||
django-suit-rq==1.0.1
|
django-suit-rq==1.0.1
|
||||||
django-tz-detect==0.2.9
|
django-tz-detect==0.2.9
|
||||||
@@ -69,12 +69,14 @@ entrypoints==0.3
|
|||||||
execnet==1.5.0
|
execnet==1.5.0
|
||||||
factory-boy==2.11.1
|
factory-boy==2.11.1
|
||||||
Faker==1.0.4
|
Faker==1.0.4
|
||||||
fastparquet==0.3.2
|
fastparquet==0.4.0
|
||||||
fitparse==1.1.0
|
fitparse==1.1.0
|
||||||
Flask==1.0.2
|
Flask==1.0.2
|
||||||
fsspec==0.5.2
|
fsspec==0.5.2
|
||||||
future==0.17.1
|
future==0.17.1
|
||||||
|
garminconnect==0.1.14
|
||||||
geocoder==1.38.1
|
geocoder==1.38.1
|
||||||
|
geoip2==3.0.0
|
||||||
geos==0.2.1
|
geos==0.2.1
|
||||||
grpcio==1.26.0
|
grpcio==1.26.0
|
||||||
grpcio-tools==1.26.0
|
grpcio-tools==1.26.0
|
||||||
@@ -116,6 +118,7 @@ lxml==4.3.2
|
|||||||
Markdown==3.0.1
|
Markdown==3.0.1
|
||||||
MarkupSafe==1.1.1
|
MarkupSafe==1.1.1
|
||||||
matplotlib==3.0.3
|
matplotlib==3.0.3
|
||||||
|
maxminddb==1.5.4
|
||||||
minify==0.1.4
|
minify==0.1.4
|
||||||
MiniMockTest==0.5
|
MiniMockTest==0.5
|
||||||
mistune==0.8.4
|
mistune==0.8.4
|
||||||
@@ -152,10 +155,12 @@ protobuf==3.11.1
|
|||||||
psycopg2==2.8.1
|
psycopg2==2.8.1
|
||||||
ptyprocess==0.6.0
|
ptyprocess==0.6.0
|
||||||
py==1.8.0
|
py==1.8.0
|
||||||
pyarrow==0.15.0
|
pyarrow==0.17.1
|
||||||
pycairo==1.19.0
|
pycairo==1.19.0
|
||||||
pycparser==2.19
|
pycparser==2.19
|
||||||
|
pygeoip==0.3.2
|
||||||
Pygments==2.3.1
|
Pygments==2.3.1
|
||||||
|
pyOpenSSL==19.1.0
|
||||||
pyparsing==2.3.1
|
pyparsing==2.3.1
|
||||||
pyrsistent==0.14.11
|
pyrsistent==0.14.11
|
||||||
pyshp==2.1.0
|
pyshp==2.1.0
|
||||||
@@ -184,7 +189,7 @@ rowingphysics==0.5.0
|
|||||||
rq==0.13.0
|
rq==0.13.0
|
||||||
rules==2.1
|
rules==2.1
|
||||||
s3transfer==0.3.3
|
s3transfer==0.3.3
|
||||||
scipy==1.2.1
|
scipy==1.5.0
|
||||||
SecretStorage==3.1.1
|
SecretStorage==3.1.1
|
||||||
Send2Trash==1.5.0
|
Send2Trash==1.5.0
|
||||||
shell==1.0.1
|
shell==1.0.1
|
||||||
@@ -193,7 +198,7 @@ simplejson==3.16.0
|
|||||||
six==1.12.0
|
six==1.12.0
|
||||||
soupsieve==1.8
|
soupsieve==1.8
|
||||||
SQLAlchemy==1.3.1
|
SQLAlchemy==1.3.1
|
||||||
sqlparse==0.3.1
|
sqlparse==0.3.0
|
||||||
stravalib==0.10.2
|
stravalib==0.10.2
|
||||||
termcolor==1.1.0
|
termcolor==1.1.0
|
||||||
terminado==0.8.1
|
terminado==0.8.1
|
||||||
@@ -209,7 +214,7 @@ tqdm==4.31.1
|
|||||||
traitlets==4.3.2
|
traitlets==4.3.2
|
||||||
units==0.7
|
units==0.7
|
||||||
uritemplate==3.0.0
|
uritemplate==3.0.0
|
||||||
urllib3==1.24.1
|
urllib3==1.25.9
|
||||||
VerbalExpressions==0.0.2
|
VerbalExpressions==0.0.2
|
||||||
vine==1.3.0
|
vine==1.3.0
|
||||||
wcwidth==0.1.7
|
wcwidth==0.1.7
|
||||||
|
|||||||
+12
-6
@@ -750,6 +750,7 @@ def clean_df_stats(datadf, workstrokesonly=True, ignorehr=True,
|
|||||||
return datadf
|
return datadf
|
||||||
|
|
||||||
def getpartofday(row,r):
|
def getpartofday(row,r):
|
||||||
|
workoutstartdatetime = row.rowdatetime
|
||||||
try:
|
try:
|
||||||
latavg = row.df[' latitude'].mean()
|
latavg = row.df[' latitude'].mean()
|
||||||
lonavg = row.df[' longitude'].mean()
|
lonavg = row.df[' longitude'].mean()
|
||||||
@@ -772,6 +773,7 @@ def getpartofday(row,r):
|
|||||||
workoutstartdatetime = row.rowdatetime
|
workoutstartdatetime = row.rowdatetime
|
||||||
except KeyError:
|
except KeyError:
|
||||||
timezone_str = r.defaulttimezone
|
timezone_str = r.defaulttimezone
|
||||||
|
workoutstartdatetime = row.rowdatetime
|
||||||
|
|
||||||
h = workoutstartdatetime.astimezone(pytz.timezone(timezone_str)).hour
|
h = workoutstartdatetime.astimezone(pytz.timezone(timezone_str)).hour
|
||||||
|
|
||||||
@@ -1599,14 +1601,18 @@ def get_workouttype_from_fit(filename,workouttype='water'):
|
|||||||
import rowingdata.tcxtools as tcxtools
|
import rowingdata.tcxtools as tcxtools
|
||||||
|
|
||||||
def get_workouttype_from_tcx(filename,workouttype='water'):
|
def get_workouttype_from_tcx(filename,workouttype='water'):
|
||||||
d = tcxtools.tcx_getdict(filename)
|
|
||||||
tcxtype = 'rowing'
|
tcxtype = 'rowing'
|
||||||
try:
|
try:
|
||||||
tcxtype = d['Activities']['Activity']['@Sport'].lower()
|
d = tcxtools.tcx_getdict(filename)
|
||||||
if tcxtype == 'other':
|
try:
|
||||||
tcxtype = 'rowing'
|
tcxtype = d['Activities']['Activity']['@Sport'].lower()
|
||||||
except KeyError:
|
if tcxtype == 'other':
|
||||||
return workouttype
|
tcxtype = 'rowing'
|
||||||
|
except KeyError:
|
||||||
|
return workouttype
|
||||||
|
|
||||||
|
except TypeError:
|
||||||
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
workouttype = mytypes.garminmappinginv[tcxtype.upper()]
|
workouttype = mytypes.garminmappinginv[tcxtype.upper()]
|
||||||
|
|||||||
@@ -191,7 +191,8 @@ def interactive_hr_piechart(df,rower,title,totalseconds=0):
|
|||||||
|
|
||||||
|
|
||||||
qry = 'hr < {ut2}'.format(ut2=rower.ut2)
|
qry = 'hr < {ut2}'.format(ut2=rower.ut2)
|
||||||
frac_lut2 = totalseconds*df.query(qry)['deltat'].sum()/sumtimehr
|
qrydata = df.query(qry)
|
||||||
|
frac_lut2 = totalseconds*qrydata['deltat'].sum()/sumtimehr
|
||||||
|
|
||||||
|
|
||||||
qry = '{ut2} <= hr < {ut1}'.format(ut1=rower.ut1,ut2=rower.ut2)
|
qry = '{ut2} <= hr < {ut1}'.format(ut1=rower.ut1,ut2=rower.ut2)
|
||||||
|
|||||||
@@ -119,6 +119,29 @@ def strava_establish_push():
|
|||||||
|
|
||||||
return response.status_code
|
return response.status_code
|
||||||
|
|
||||||
|
def strava_list_push():
|
||||||
|
url = "https://www.strava.com/api/v3/push_subscriptions"
|
||||||
|
params = {
|
||||||
|
'client_id': STRAVA_CLIENT_ID,
|
||||||
|
'client_secret': STRAVA_CLIENT_SECRET,
|
||||||
|
|
||||||
|
}
|
||||||
|
response = requests.get(url,params=params)
|
||||||
|
|
||||||
|
if response.status_code == 200:
|
||||||
|
data = response.json()
|
||||||
|
return [w['id'] for w in data]
|
||||||
|
return []
|
||||||
|
|
||||||
|
def strava_push_delete(id):
|
||||||
|
url = "https://www.strava.com/api/v3/push_subscriptions/{id}".format(id=id)
|
||||||
|
params = {
|
||||||
|
'client_id': STRAVA_CLIENT_ID,
|
||||||
|
'client_secret': STRAVA_CLIENT_SECRET,
|
||||||
|
}
|
||||||
|
response = requests.delete(url,json=params)
|
||||||
|
return response.status_code
|
||||||
|
|
||||||
|
|
||||||
def set_strava_athlete_id(user):
|
def set_strava_athlete_id(user):
|
||||||
r = Rower.objects.get(user=user)
|
r = Rower.objects.get(user=user)
|
||||||
|
|||||||
Reference in New Issue
Block a user