diff --git a/rowers/dataroutines.py b/rowers/dataroutines.py index abfe2fde..c8ae3796 100644 --- a/rowers/dataroutines.py +++ b/rowers/dataroutines.py @@ -187,7 +187,7 @@ def remove_nulls_pl(data): data = data.lazy().with_columns( pl.when( pl.all().is_infinite() - ).then(None).otherwise(pl.all()).keep_name() + ).then(None).otherwise(pl.all()).name.keep() # keep_name() ) data = data.select(pl.all().forward_fill()) data = data.select(pl.all().backward_fill()) diff --git a/rowers/integrations/intervals.py b/rowers/integrations/intervals.py index e3fe6996..2d4d7291 100644 --- a/rowers/integrations/intervals.py +++ b/rowers/integrations/intervals.py @@ -735,6 +735,8 @@ class IntervalsIntegration(SyncIntegration): result = self.update_workout(id) except Workout.DoesNotExist: result = self.get_workout(id, do_async=False) + except ValueError: + result = self.get_workout(id, do_async=False) except KeyError: pass diff --git a/rowers/models.py b/rowers/models.py index c81d24ec..dc7ca8a5 100644 --- a/rowers/models.py +++ b/rowers/models.py @@ -4492,7 +4492,10 @@ for name, d in rowingmetrics: class Meta: db_table = 'strokedata' - index_together = ['workoutid'] + #index_together = ['workoutid'] + indexes = [ + models.Index(fields=['workoutid']) + ] app_label = 'rowers' @@ -4517,7 +4520,10 @@ class cpdata(models.Model): class Meta: db_table = 'cpdata' - index_together = ['user'] + #index_together = ['user'] + indexes = [ + models.Index(fields=['user']) + ] app_label = 'rowers' @@ -4529,7 +4535,10 @@ class cpergdata(models.Model): class Meta: db_table = 'cpergdata' - index_together = ['user'] + #index_together = ['user'] + indexes = [ + models.Index(fields=['user']) + ] app_label = 'rowers' @@ -4542,7 +4551,10 @@ class ergcpdata(models.Model): class Meta: db_table = 'ergcpdata' - index_together = ['user'] + #index_together = ['user'] + indexes = [ + models.Index(fields=['user']) + ] app_label = 'rowers' # A wrapper around the png files diff --git a/rowers/tests/statements.py b/rowers/tests/statements.py index d2b1f440..4299964a 100644 --- a/rowers/tests/statements.py +++ b/rowers/tests/statements.py @@ -210,7 +210,7 @@ class WorkoutFactory(factory.DjangoModelFactory): name = factory.LazyAttribute(lambda _: faker.word()) notes = faker.text() - startdatetime = FuzzyDateTime(start_dt=one_month_ago, force_year=datetime.date.today().year) + startdatetime = FuzzyDateTime(start_dt=one_month_ago) #, force_year=datetime.date.today().year) starttime = get_random_file(name=faker.word())['starttime'] workouttype='water' date=startdatetime.evaluate(2,None, False).date() diff --git a/rowers/tests/testdata/testdata.tcx.gz b/rowers/tests/testdata/testdata.tcx.gz index 6bfd7d18..63ab84dc 100644 Binary files a/rowers/tests/testdata/testdata.tcx.gz and b/rowers/tests/testdata/testdata.tcx.gz differ diff --git a/templates/newbase.html b/templates/newbase.html index 1b4e3143..1421bbeb 100644 --- a/templates/newbase.html +++ b/templates/newbase.html @@ -11,7 +11,7 @@ {% block title %}Rowsandall Rowing Data Analytics{% endblock %} {% analytical_head_top %} - + @@ -47,62 +47,65 @@ {% block meta %} {% endblock %}
- - - + + + - + t._e = []; + t.ready = function(f) { + t._e.push(f); + }; + + return t; + }(document, "script", "twitter-wjs")); + {% analytical_head_bottom %} - +
- +
  • @@ -144,7 +147,7 @@
- +
  • @@ -164,8 +167,8 @@ {% else %} - {% endif %} - + {% endif %} +
  • {% if user.rower|usermessages %}
  • @@ -191,14 +194,14 @@
  • - {% endif %} + {% endif %}
- +   - +
  • @@ -231,7 +234,7 @@
- +
    {% if WARNING_MESSAGE != '' %} @@ -242,17 +245,17 @@ {% endif %} {% if user.rower.planexpires and user.rower|notfree and user.rower.paymenttype == 'single'%} - {% if user.rower.planexpires|is_future_date %} - {% if user.rower.planexpires|date_dif|ddays < 4 %} -
  • -

    - You have {{ user.rower.planexpires|date_dif|ddays }} days left of your one year subscription. Please renew on or before {{ user.rower.planexpires }} or your plan will be reset to Basic. Click here to renew your membership.

    -
  • - {% endif %} - {% endif %} - {% endif %} - {% if user.rower.protrialexpires and user.rower.protrialexpires|is_future_date %} - {% if user.rower.plantrialexpires and user.rower.plantrialexpires|is_future_date and user.rower.rowerplan != 'plan' %} + {% if user.rower.planexpires|is_future_date %} + {% if user.rower.planexpires|date_dif|ddays < 4 %} +
  • +

    + You have {{ user.rower.planexpires|date_dif|ddays }} days left of your one year subscription. Please renew on or before {{ user.rower.planexpires }} or your plan will be reset to Basic. Click here to renew your membership.

    +
  • + {% endif %} + {% endif %} + {% endif %} + {% if user.rower.protrialexpires and user.rower.protrialexpires|is_future_date %} + {% if user.rower.plantrialexpires and user.rower.plantrialexpires|is_future_date and user.rower.rowerplan != 'plan' %}
  • {{ user.rower.protrialexpires|date_dif|ddays }} days left of your Self-Coach trial - Would you like to upgrade now? @@ -268,7 +271,7 @@ {% endif %} {% endif %} {% endif %} - {% if user.rower.coachtrialexpires and user.rower.coachtrialexpires|is_future_date and user.rower.rowerplan != 'coach' %} + {% if user.rower.coachtrialexpires and user.rower.coachtrialexpires|is_future_date and user.rower.rowerplan != 'coach' %}

  • {{ user.rower.coachtrialexpires|date_dif|ddays }} days left of your Coach trial - Would you like to upgrade now? @@ -285,7 +288,7 @@ {% if messages %} {% for message in messages %}

  • - {% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %} + {% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %}

    {% else %}

    @@ -311,16 +314,16 @@

  • {% endif %}
- + {% block main %} {% endblock %}
- +
{% block sidebar %} {% endblock %}
- + {% if request|announcements %}

News

@@ -331,7 +334,7 @@ {{ a.announcement|urlshorten:20 }}
- + {% endfor %} {% endif %} {% if user.is_authenticated and user|nogoals %} @@ -340,97 +343,110 @@

{% endif %} {% block ad %} -
-
- Please take 2 minutes to fill out the survey! -
-
-
-
- Need a training plan? Take a look at our NEW training plan section! -
-
+
+
+ Please take 2 minutes to fill out the survey! +
+
+
+
+ Need a training plan? Take a look at our training plan section! +
+
+ {% if user.is_authenticated and user.rower.rowerplan == 'basic' %} +
+
+ Support us and get more features! +
+
+ {% elif user.is_authenticated and user.rower.rowerplan == 'pro' %} +
+
+ Thank you for supporting Rowsandall.com! +
+
+ {% endif %} {% endblock %} - +

Follow us on - - -   - - -   - - -   - - -   + + +   + + +   + + +   + + +  

-

    -
  • -

    Help

    -
      -
    • - Help -
    • -
    • - - Rowing Analytics Blog - -
    • -
    • - - Rowing Data Discussion Group -
    • -
    • - Rowing Physics -
    • -
    -
  • -
  • -

    About

    -
      -
    • - Contact -
    • -
    • - Rowsandall s.r.o. -
    • -
    • - Brochure -
    • -
    • - Partnering? -
    • -
    • - Developers Info -
    • -
    -
  • -
  • -

    Paid Plans

    -
      -
    • - Paid Plans -
    • -
    -
  • -
  • -

    Legal

    -
      -
    • - Terms and Conditions -
    • -
    • - Privacy Policy -
    • -
    -
+
    +
  • +

    Help

    +
      +
    • + Help +
    • +
    • + + Rowing Analytics Blog + +
    • +
    • + + Rowing Data Discussion Group +
    • +
    • + Rowing Physics +
    • +
    +
  • +
  • +

    About

    +
      +
    • + Contact +
    • +
    • + Rowsandall s.r.o. +
    • +
    • + Brochure +
    • +
    • + Partnering? +
    • +
    • + Developers Info +
    • +
    +
  • +
  • +

    Support Us

    +
      +
    • + Support Us +
    • +
    +
  • +
  • +

    Legal

    +
      +
    • + Terms and Conditions +
    • +
    • + Privacy Policy +
    • +
    +

{% analytical_body_bottom %} @@ -438,52 +454,52 @@ - {% block scripts %} {% endblock %} +{% block scripts %} {% endblock %} - - - - - - - - - - - - - - + + + + + + + + + + + + + + + }); +