getting all tests to pass, improved developers page
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<ul class="main-content">
|
||||
<li class="grid_4">
|
||||
|
||||
<p>On this page, a work in progress, I will collect useful information
|
||||
<p>On this page, I will collect useful information
|
||||
for developers of rowing data apps and hardware.</p>
|
||||
|
||||
<p>I presume you have an app (smartphone app, dedicated hardware, web site)
|
||||
@@ -61,11 +61,11 @@
|
||||
</ul></p>
|
||||
<h2>Using the REST API</h2>
|
||||
|
||||
<p>We are building a REST API which will allow you to post and
|
||||
<p>We have a REST API which will allow you to post and
|
||||
receive stroke
|
||||
data from the site directly.</p>
|
||||
|
||||
<p>The REST API is a work in progress. We are open to improvement
|
||||
<p>We are open to improvement
|
||||
suggestions (provided they don't break existing apps). Please send
|
||||
email to <a href="mailto:info@rowsandall.com">info@rowsandall.com</a>
|
||||
with questions and/or suggestions. We
|
||||
@@ -84,7 +84,6 @@
|
||||
|
||||
<li>Disadvantages
|
||||
<p><ul class="contentli">
|
||||
<li>The API is not stable and not fully tested yet.</li>
|
||||
<li>You need to register your app with us. We can revoke your
|
||||
permissions if you misuse them.</li>
|
||||
<li>The user user must grant permissions to your app.</li>
|
||||
@@ -114,7 +113,7 @@
|
||||
|
||||
|
||||
<p>We have disabled the self service app link for security reasons.
|
||||
We will replace it with a secure self service app link soon. If you
|
||||
If you
|
||||
need to register an app, please send email to info@rowsandall.com</p>
|
||||
|
||||
<h3>Authentication</h3>
|
||||
@@ -728,11 +727,11 @@
|
||||
<li><b>peakdriveforce</b>: Peak handle force (lbs)</li>
|
||||
<li><b>lapidx</b>: Lap identifier</li>
|
||||
<li><b>hr</b>: Heart rate (beats per minute)</li>
|
||||
<li><b>wash</b>: Wash as defined per Empower oarlock (degrees)</li>
|
||||
<li><b>catch</b>: Catch angle per Empower oarlock (degrees)</li>
|
||||
<li><b>finish</b>: Finish angle per Empower oarlock (degrees)</li>
|
||||
<li><b>peakforceangle</b>: Peak Force Angle per Empower oarlock (degrees)</li>
|
||||
<li><b>slip</b>: Slip as defined per Empower oarlock (degrees)</li>
|
||||
<li><b>wash</b>: Wash as defined for your smart power measuring oarlock (degrees)</li>
|
||||
<li><b>catch</b>: Catch angle for your smart power measuring oarlock (degrees)</li>
|
||||
<li><b>finish</b>: Finish angle for your smart power measuring oarlock (degrees)</li>
|
||||
<li><b>peakforceangle</b>: Peak Force Angle for your smart power measuring oarlock (degrees)</li>
|
||||
<li><b>slip</b>: Slip as defined for your smart power measuring oarlock (degrees)</li>
|
||||
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
@@ -471,6 +471,14 @@ class OwnApi(TestCase):
|
||||
gdproptin=True, ftpset=True,surveydone=True,
|
||||
gdproptindate=timezone.now(),
|
||||
rowerplan='pro',subscription_id=1)
|
||||
self.c = Client()
|
||||
self.user_workouts = WorkoutFactory.create_batch(5, user=self.r)
|
||||
self.factory = RequestFactory()
|
||||
self.password = faker.word()
|
||||
self.u.set_password(self.password)
|
||||
self.u.save()
|
||||
|
||||
self.factory = APIRequestFactory()
|
||||
|
||||
|
||||
def test_strokedataform(self):
|
||||
|
||||
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
Binary file not shown.
@@ -363,7 +363,10 @@ def trendflexdata(workouts, options, userid=0):
|
||||
|
||||
savedata = options.get('savedata',False)
|
||||
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
try:
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
except AttributeError: # pragma: no cover
|
||||
workouts = [w for w in workouts if w.workoutsource != 'strava']
|
||||
|
||||
fieldlist, fielddict = dataprep.getstatsfields()
|
||||
fieldlist = [xparam, yparam, groupby,
|
||||
@@ -567,7 +570,10 @@ def flexalldata(workouts, options):
|
||||
trendline = options['trendline']
|
||||
promember = True
|
||||
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
try:
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
except AttributeError: # pragma: no cover
|
||||
workouts = [w for w in workouts if w.workoutsource != 'strava']
|
||||
|
||||
workstrokesonly = not includereststrokes
|
||||
|
||||
@@ -615,7 +621,10 @@ def histodata(workouts, options):
|
||||
workmax = options['workmax']
|
||||
userid = options['userid']
|
||||
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
try:
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
except AttributeError: # pragma: no cover
|
||||
workouts = [w for w in workouts if w.workoutsource != 'strava']
|
||||
|
||||
|
||||
if userid == 0: # pragma: no cover
|
||||
@@ -805,7 +814,10 @@ def cpdata(workouts, options):
|
||||
|
||||
|
||||
def statsdata(workouts, options):
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
try:
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
except AttributeError: # pragma: no cover
|
||||
workouts = [w for w in workouts if w.workoutsource != 'strava']
|
||||
|
||||
includereststrokes = options['includereststrokes']
|
||||
ids = options['ids']
|
||||
@@ -881,7 +893,11 @@ def statsdata(workouts, options):
|
||||
|
||||
|
||||
def comparisondata(workouts, options):
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
try:
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
except AttributeError: # pragma: no cover
|
||||
workouts = [w for w in workouts if w.workoutsource != 'strava']
|
||||
|
||||
includereststrokes = options['includereststrokes']
|
||||
xparam = options['xaxis']
|
||||
yparam1 = options['yaxis1']
|
||||
@@ -925,7 +941,10 @@ def comparisondata(workouts, options):
|
||||
|
||||
|
||||
def boxplotdata(workouts, options):
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
try:
|
||||
workouts = workouts.exclude(workoutsource='strava')
|
||||
except AttributeError:
|
||||
workouts = [w for w in workouts if w.workoutsource != 'strava']
|
||||
|
||||
includereststrokes = options['includereststrokes']
|
||||
spmmin = options['spmmin']
|
||||
|
||||
Reference in New Issue
Block a user