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

Biostrap/EVO Full Suite #135

Merged
merged 29 commits into from
Jan 15, 2024
Merged

Biostrap/EVO Full Suite #135

merged 29 commits into from
Jan 15, 2024

Conversation

cheejung
Copy link
Contributor

Description

I have made a preliminary PR of the entire Wearipedia extraction and testing API.

Related Issue

- datetime.strptime(date_1, "%Y-%m-%d")
).days == 1, f"Dates are not consecutive: {date_1}, {date_2}"

assert dates[0] == start_synthetic.strftime(
Copy link
Collaborator

Choose a reason for hiding this comment

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

For the following test cases, make the assertion messages more descriptive (i.e. First date is not equal to start date)

tests/devices/biostrap/test_evo.py Outdated Show resolved Hide resolved
wearipedia/devices/biostrap/Biostrap_EVO.ipynb Outdated Show resolved Hide resolved
wearipedia/devices/biostrap/evo.py Show resolved Hide resolved
wearipedia/devices/biostrap/evo_gen.py Show resolved Hide resolved
wearipedia/devices/biostrap/evo_fetch.py Show resolved Hide resolved
wearipedia/devices/biostrap/evo_gen.py Outdated Show resolved Hide resolved
wearipedia/devices/biostrap/evo_gen.py Outdated Show resolved Hide resolved
webbrowser.open(authorization_url)

# Get the authorization response URL from the command line: is there a better way to do this?
authorization_response = input("Enter the full callback URL: ")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are you able to do request.get(auth_url)? That should return the redirect url equivalent to putting the authorization url into the search bar. let me know if this can work, otherwise let's call and talk about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried the method you mentioned, but it doesn't seem to work at the moment.

Merging latest changes from upstream/main to keep my branch up to date with the original repository.
…ported by Biostrap (formatted by pre-commit hooks)
tests/devices/biostrap/test_evo.py Outdated Show resolved Hide resolved
wearipedia/devices/biostrap/evo_fetch.py Outdated Show resolved Hide resolved
wearipedia/devices/biostrap/evo_gen.py Show resolved Hide resolved
wearipedia/devices/biostrap/evo_gen.py Show resolved Hide resolved
wearipedia/devices/biostrap/evo_gen.py Show resolved Hide resolved
TZ_OFFSET = -420

# Helper functions for biometric data generation
def synthetic_biometrics(start_date_obj, end_date_obj):
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like here your high frequency data is uniformly random. I think a good improvement here would be to use a more complex generator to make it look more realistic. Some example generators exist in Garmin Fenix 7s, Polar Verity Sense

Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like the data is still pretty noisy, could you try another generator?

Copy link
Collaborator

@TrafficCop TrafficCop left a comment

Choose a reason for hiding this comment

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

Just need you to change the generator and also make sure the tests run. Otherwise, looking good!

wearipedia/devices/biostrap/evo_gen.py Show resolved Hide resolved
TZ_OFFSET = -420

# Helper functions for biometric data generation
def synthetic_biometrics(start_date_obj, end_date_obj):
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like the data is still pretty noisy, could you try another generator?

}

def synthetic_sleep_session(bpm_dict):
print(f"This is the {bpm_dict}")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure if this print statement is necessary

@TrafficCop TrafficCop merged commit c51a49c into Stanford-Health:main Jan 15, 2024
TrafficCop added a commit that referenced this pull request Jan 15, 2024
This reverts commit c51a49c, reversing
changes made to 8a6a186.
TrafficCop added a commit that referenced this pull request Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants