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(
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())

View File

@@ -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

View File

@@ -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

View File

@@ -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()

Binary file not shown.