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

Feature/project structure #11

Merged
merged 17 commits into from
Mar 14, 2018

Conversation

sladkovm
Copy link
Contributor

Did not do:

@sladkovm sladkovm added the enhancement New feature or request label Mar 13, 2018
Copy link
Contributor

@AartGoossens AartGoossens left a comment

Choose a reason for hiding this comment

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

Great job. You're fast!

return rv


def weighted_average_power(arg, mask=None, value=0.0, **kwargs):
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor (i.e. let's pick up later): could move to metrics.power

Copy link
Contributor Author

Choose a reason for hiding this comment

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

indeed, it currently calculates both WAP and xPower - the choice is controlled by keyword 'type' with a default set to WAP. Let's see how it is being used and decide on the best strategy for moving to power.py

Copy link
Contributor

Choose a reason for hiding this comment

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

Both wap and xpower are calculated from power right? Either way, can be fixed later.

array-like
"""

if not isinstance(power, pd.Series):
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's see if I can come up with a satisfactory solution in my "on the fly decorator type casting poc" so we can come to solution for this in #5.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agree

return rv


def stress_score(wap, threshold_power, duration):
Copy link
Contributor

@AartGoossens AartGoossens Mar 14, 2018

Choose a reason for hiding this comment

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

Nice, this was first "intensity factor" right? Good job on getting rid of TrainingPeaks ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was always a stress score, but it also used to mention TSS and I've removed that.

@@ -0,0 +1,74 @@
from sweat.algorithms.hrm import heartrate_models
Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed in #8 this code could also move to sweat.io.models. Since the wdf probably won't be used directly that might make sense. But can be done later when we have a clearer view of how sweat.io will work/look like.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agree

"""
_metadata = ['athlete']

@requires(columns=['power'])
Copy link
Contributor

Choose a reason for hiding this comment

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

I will take care of ritual burning this decorator ;)

@sladkovm sladkovm merged commit 2513172 into GoldenCheetah:master Mar 14, 2018
@sladkovm sladkovm deleted the feature/project-structure branch March 14, 2018 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants