diff --git a/requirements.txt b/requirements.txt index 8f8eb580..d8a99a17 100644 --- a/requirements.txt +++ b/requirements.txt @@ -174,7 +174,7 @@ ratelim==0.1.6 redis==3.2.1 requests==2.21.0 requests-oauthlib==1.2.0 -rowingdata==2.6.7 +rowingdata==2.7.2 rowingphysics==0.5.0 rq==0.13.0 rules==2.1 diff --git a/rowers/dataprep.py b/rowers/dataprep.py index 26a5a561..af7df311 100644 --- a/rowers/dataprep.py +++ b/rowers/dataprep.py @@ -1390,7 +1390,7 @@ def parsenonpainsled(fileformat,f2,summary): try: row = parsers[fileformat](f2) hasrecognized = True - except (KeyError,IndexError): + except (KeyError,IndexError,ValueError): hasrecognized = False return None, hasrecognized, '', 'unknown' @@ -1589,6 +1589,8 @@ def new_workout_from_file(r, f2, impeller=impeller, ) + job = myqueue(queuehigh,handle_calctrimp,id,f2,r.ftp,r.sex,r.hrftp,r.max,r.rest) + return (id, message, f2) diff --git a/rowers/forms.py b/rowers/forms.py index 829bbd3a..baf5782d 100644 --- a/rowers/forms.py +++ b/rowers/forms.py @@ -731,15 +731,19 @@ class PowerIntervalUpdateForm(forms.Form): ('power','Power'), ('pace','Pace'), ('work','Work per Stroke'), + ('spm','Stroke Rate') ) pace = forms.DurationField(required=False,label='Pace (/500m)') power = forms.IntegerField(required=False,label='Power (W)') work = forms.IntegerField(required=False,label='Work per Stroke (J)') + spm = forms.IntegerField(required=False,label='Stroke Rate') selector = forms.ChoiceField(choices=selectorchoices, required=True, initial='power', label='Use') + activeminutesmin = forms.IntegerField(required=False,initial=0,widget=forms.HiddenInput()) + activeminutesmax = forms.IntegerField(required=False,initial=0,widget=forms.HiddenInput()) # Form used to update interval stats class IntervalUpdateForm(forms.Form): diff --git a/rowers/rower_rules.py b/rowers/rower_rules.py index 56cd15a2..f26287eb 100644 --- a/rowers/rower_rules.py +++ b/rowers/rower_rules.py @@ -259,9 +259,9 @@ def is_rower_team_member(user,rower): for team in teams: if team.private == 'open': - if team in rower.team.all(): + if team in user.rower.team.all(): return True - if team.manager == rower.user: + if team.manager == user: return True return False diff --git a/rowers/templates/summary_edit.html b/rowers/templates/summary_edit.html index 57c9804d..d4b8edc7 100644 --- a/rowers/templates/summary_edit.html +++ b/rowers/templates/summary_edit.html @@ -7,6 +7,27 @@ {% block scripts %} {% include "monitorjobs.html" %} + + + + {% endblock %} {% block main %} @@ -47,22 +68,28 @@ {{ form.as_table }} {% csrf_token %} - +
With this form, you can specify a power or pace level. Everything faster/harder than the specified pace/power will become a work interval. Everything slower will become a rest - interval. + interval. Use the slider to limit the active range. Everything outside the active range will + become rest (warming up and cooling down).
- +This is still experimental and there are known bugs. Use at your own risk. Nothing is stored permanently until you hit Save in the Updated Summary section. You can use the restore original button to restore the original values.