Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPE (rate of perceived exertion) #479 #546

Merged
merged 10 commits into from
Dec 2, 2020
Merged

RPE (rate of perceived exertion) #479 #546

merged 10 commits into from
Dec 2, 2020

Conversation

SkyNetIndustry
Copy link

@SkyNetIndustry SkyNetIndustry commented Nov 1, 2020

  • Tests for the changes need to been added (for bug fixes / features)

DecimalField needs to be resolved. Creating a DecimalField in Settings is validated with Integer. The issue is currently solved using IntegerField.

Screenshot_1

@rolandgeider rolandgeider marked this pull request as draft November 1, 2020 11:40
@rolandgeider
Copy link
Member

I'll take a look when I'm back home later today

@@ -212,7 +212,7 @@ def get_reps_reprentation(setting, rep_unit):
"Until Failure" unit
"""
if setting.repetition_unit_id != 2:
reps = "{0} {1}".format(setting.reps, rep_unit).strip()
reps = "{0} {1} ({2})".format(setting.reps, rep_unit, setting.rpe).strip()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add a bit more of logic here when there's no value selected. So instead of "3 × 4 (None) (10 kg)", "3 × 4 (10 kg)" or 3 × 4 (10 kg 2RiR)"

@@ -285,7 +285,7 @@ def normalize_weight(setting):
reps = get_reps_reprentation(setting, rep_unit)
weight = normalize_weight(setting)
if weight:
reps += ' ({0} {1})'.format(weight, setting.weight_unit)
reps += ' x {0} {1}'.format(weight, setting.weight_unit)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

blank=True,
null=True,
choices=NUMBERS)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this to rir (Reps In Reserve) instead? You can leave the options 4 to 1 in 0,5 steps. You can leave the field as Integer and make the second value in the touple a string.

@rolandgeider
Copy link
Member

Ping :)

@rolandgeider rolandgeider added this to the 2.0 milestone Dec 2, 2020
@rolandgeider rolandgeider merged commit 94036ae into wger-project:master Dec 2, 2020
@rolandgeider
Copy link
Member

I have merged this manually and polished a couple of things, thanks for the work!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants