Private
Public Access
1
0

tests and fixes before release

This commit is contained in:
2025-01-01 12:45:06 +01:00
parent e42d3b1957
commit ba9ad2a98e
6 changed files with 222 additions and 192 deletions

View File

@@ -187,7 +187,7 @@ def remove_nulls_pl(data):
data = data.lazy().with_columns( data = data.lazy().with_columns(
pl.when( pl.when(
pl.all().is_infinite() 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().forward_fill())
data = data.select(pl.all().backward_fill()) data = data.select(pl.all().backward_fill())

View File

@@ -735,6 +735,8 @@ class IntervalsIntegration(SyncIntegration):
result = self.update_workout(id) result = self.update_workout(id)
except Workout.DoesNotExist: except Workout.DoesNotExist:
result = self.get_workout(id, do_async=False) result = self.get_workout(id, do_async=False)
except ValueError:
result = self.get_workout(id, do_async=False)
except KeyError: except KeyError:
pass pass

View File

@@ -4492,7 +4492,10 @@ for name, d in rowingmetrics:
class Meta: class Meta:
db_table = 'strokedata' db_table = 'strokedata'
index_together = ['workoutid'] #index_together = ['workoutid']
indexes = [
models.Index(fields=['workoutid'])
]
app_label = 'rowers' app_label = 'rowers'
@@ -4517,7 +4520,10 @@ class cpdata(models.Model):
class Meta: class Meta:
db_table = 'cpdata' db_table = 'cpdata'
index_together = ['user'] #index_together = ['user']
indexes = [
models.Index(fields=['user'])
]
app_label = 'rowers' app_label = 'rowers'
@@ -4529,7 +4535,10 @@ class cpergdata(models.Model):
class Meta: class Meta:
db_table = 'cpergdata' db_table = 'cpergdata'
index_together = ['user'] #index_together = ['user']
indexes = [
models.Index(fields=['user'])
]
app_label = 'rowers' app_label = 'rowers'
@@ -4542,7 +4551,10 @@ class ergcpdata(models.Model):
class Meta: class Meta:
db_table = 'ergcpdata' db_table = 'ergcpdata'
index_together = ['user'] #index_together = ['user']
indexes = [
models.Index(fields=['user'])
]
app_label = 'rowers' app_label = 'rowers'
# A wrapper around the png files # A wrapper around the png files

View File

@@ -210,7 +210,7 @@ class WorkoutFactory(factory.DjangoModelFactory):
name = factory.LazyAttribute(lambda _: faker.word()) name = factory.LazyAttribute(lambda _: faker.word())
notes = faker.text() 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'] starttime = get_random_file(name=faker.word())['starttime']
workouttype='water' workouttype='water'
date=startdatetime.evaluate(2,None, False).date() date=startdatetime.evaluate(2,None, False).date()

Binary file not shown.

View File

@@ -48,23 +48,25 @@
{% block meta %} {% endblock %} {% block meta %} {% endblock %}
<div id="fb-root"></div> <div id="fb-root"></div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>(function(d, s, id) { <script>
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0]; var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return; if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id; js = d.createElement(s); js.id = id;
js.async=true; js.async=true;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.10&appId=694685920739849"; js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.10&appId=694685920739849";
fjs.parentNode.insertBefore(js, fjs); fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script> }(document, 'script', 'facebook-jssdk'));
</script>
<script> <script>
$(document).ready(function (){ $(document).ready(function (){
}) })
</script> </script>
<link rel="stylesheet" href="https://webapiv2.navionics.com/dist/webapi/webapi.min.css" > <link rel="stylesheet" href="https://webapiv2.navionics.com/dist/webapi/webapi.min.css" >
<script type="text/javascript" src="https://webapiv2.navionics.com/dist/webapi/webapi.min.no-dep.js"></script> <script type="text/javascript" src="https://webapiv2.navionics.com/dist/webapi/webapi.min.no-dep.js"></script>
<script src="https://kit.fontawesome.com/8ec1edfba3.js" crossorigin="anonymous"></script> <script src="https://kit.fontawesome.com/8ec1edfba3.js" crossorigin="anonymous"></script>
<script>window.twttr = (function(d, s, id) { <script>
window.twttr = (function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0], var js, fjs = d.getElementsByTagName(s)[0],
t = window.twttr || {}; t = window.twttr || {};
if (d.getElementById(id)) return t; if (d.getElementById(id)) return t;
@@ -80,7 +82,8 @@
}; };
return t; return t;
}(document, "script", "twitter-wjs"));</script> }(document, "script", "twitter-wjs"));
</script>
<script id="script-batch" type="text/javascript"> <script id="script-batch" type="text/javascript">
(function(d){ (function(d){
@@ -347,11 +350,24 @@
</div> </div>
<div class="site-announcement-box"> <div class="site-announcement-box">
<div class="site-announcement-white"> <div class="site-announcement-white">
<a href="/rowers/plans/">Need a training plan? Take a look at our NEW training plan section!</a> <a href="/rowers/plans/">Need a training plan? Take a look at our training plan section!</a>
</div> </div>
</div> </div>
<div id="id_blogs"> <div id="id_blogs">
</div> </div>
{% if user.is_authenticated and user.rower.rowerplan == 'basic' %}
<div class="site-announcement-box">
<div class="site-announcement-white">
<a href="/rowers/paidplans/">Support us and get more features!</a>
</div>
</div>
{% elif user.is_authenticated and user.rower.rowerplan == 'pro' %}
<div class="site-announcement-box">
<div class="site-announcement-white">
<i class="fa-solid fa-user-astronaut "></i> Thank you for supporting Rowsandall.com!
</div>
</div>
{% endif %}
{% endblock %} {% endblock %}
</ad> </ad>
@@ -413,10 +429,10 @@
</ul> </ul>
</li> </li>
<li> <li>
<h2>Paid Plans</h2> <h2>Support Us</h2>
<ul> <ul>
<li> <li>
<a href="/rowers/paidplans/">Paid Plans</a> <a href="/rowers/paidplans/">Support Us</a>
</li> </li>
</ul> </ul>
</li> </li>