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

Initial heartbeat app commit #143

Open
wants to merge 55 commits into
base: main
Choose a base branch
from
Open

Initial heartbeat app commit #143

wants to merge 55 commits into from

Conversation

eldcn
Copy link
Contributor

@eldcn eldcn commented Nov 29, 2024

Name of the PR

♻️ Current situation & Problem

Link any open issues or pull requests (PRs) related to this PR. Please ensure that all non-trivial PRs are first tracked and discussed in an existing GitHub issue or discussion.

⚙️ Release Notes

Add a bullet point list summary of the feature and possible migration guides if this is a breaking change so this section can be added to the release notes.
Include code snippets that provide examples of the feature implemented or links to the documentation if it appends or changes the public interface.

📚 Documentation

Please ensure that you properly document any additions in conformance to Spezi Documentation Guide.
You can use this section to describe your solution, but we encourage contributors to document your reasoning and changes using in-line documentation.

✅ Testing

Please ensure that the PR meets the testing requirements set by CodeCov and that new functionality is appropriately tested.
This section describes important information about the tests and why some elements might not be testable.

📝 Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

Copy link

codecov bot commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 7.98755% with 1774 lines in your changes missing coverage. Please review.

Project coverage is 36.06%. Comparing base (b52f781) to head (4799e9a).

Files with missing lines Patch % Lines
...anford/bdh/heartbeat/app/survey/SurveyViewModel.kt 0.00% 163 Missing ⚠️
...in/edu/stanford/bdh/heartbeat/app/main/MainPage.kt 3.91% 118 Missing and 5 partials ⚠️
...tbeat/app/survey/ui/fields/ChoicesFormFieldItem.kt 0.00% 102 Missing ⚠️
...rd/bdh/heartbeat/app/survey/SurveyUiStateMapper.kt 0.00% 89 Missing ⚠️
...u/stanford/bdh/heartbeat/app/main/MainViewModel.kt 16.51% 84 Missing and 2 partials ⚠️
...eartbeat/app/survey/ui/fields/TextFormFieldItem.kt 0.00% 83 Missing ⚠️
.../stanford/bdh/heartbeat/app/home/AccountUiState.kt 0.00% 82 Missing ⚠️
...anford/bdh/heartbeat/app/account/AccountManager.kt 23.92% 68 Missing and 2 partials ⚠️
...bdh/heartbeat/app/survey/ui/SurveyQuestionState.kt 0.00% 62 Missing ⚠️
...u/stanford/bdh/heartbeat/app/home/HomeViewModel.kt 0.00% 58 Missing ⚠️
... and 50 more
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #143      +/-   ##
============================================
- Coverage     40.76%   36.06%   -4.70%     
- Complexity      867      881      +14     
============================================
  Files           299      356      +57     
  Lines         11553    13466    +1913     
  Branches       1752     2113     +361     
============================================
+ Hits           4709     4855     +146     
- Misses         6373     8113    +1740     
- Partials        471      498      +27     
Flag Coverage Δ
uitests 25.82% <7.89%> (-10.16%) ⬇️
unittests 31.99% <1.93%> (-0.25%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...zi/core/design/component/ComposeContentActivity.kt 0.00% <ø> (ø)
...ed/outlinedtextfield/ValidatedOutlinedTextField.kt 0.00% <ø> (ø)
...tlin/edu/stanford/spezi/core/utils/TimeProvider.kt 100.00% <100.00%> (ø)
...ford/bdh/heartbeat/app/choir/api/ChoirApiModule.kt 100.00% <100.00%> (ø)
...lin/edu/stanford/bdh/heartbeat/app/di/AppModule.kt 100.00% <100.00%> (ø)
...edu/stanford/bdh/heartbeat/app/fake/FakeConfigs.kt 100.00% <100.00%> (ø)
...nford/bdh/engagehf/health/components/TimePicker.kt 0.00% <0.00%> (ø)
...rd/spezi/core/design/component/DatePickerDialog.kt 0.00% <0.00%> (ø)
...u/stanford/bdh/heartbeat/app/fake/FakeComponent.kt 0.00% <0.00%> (ø)
...dh/heartbeat/app/survey/ui/fields/FormFieldItem.kt 0.00% <0.00%> (ø)
... and 56 more

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b52f781...4799e9a. Read the comment docs.

Copy link
Member

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

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

Thank you @eldcn & @pauljohanneskraft!

Would it be possible to also integrate this in the fast lane setup; e.g., split up the tow lines, allow each line to define a configuration, and then run these lines for the two different apps at the same time for now? We might need to duplicate some elements in the GitHub action but it might be worth it to have a proper CI setup in place 👍

eldcn and others added 27 commits February 16, 2025 16:46
add missing required fields
send question metada info - retry count, render time and think time in millis
render optional title 2
addapt fake data json
improve logging
# *Heartbeat app remaning tasks and fixes*

## ♻️ Current situation & Problem
- Adds account screen
- Handle /onboarding vs /start depending on whether user started the
survey once
- Introduce screen composable concept that enables building compose
components in View models

*Note*: Heartbeat functionalities are complete:
- Signup, Login, Account screen, welcoming screen including resending
email verification and status reload
- Support for handling, submitting and rendering these question types:
`number, checkboxes, radios, heading, text, dropdown, datePicker,
textArea`
- Using choir-demo api, onboarding retrieval, start and continue calls
work as expected, except of consent question where API responds with 500
Internal server error.
- All flows can be simulated with a static fake component which needs
only flag adaptions, see
`edu.stanford.bdh.heartbeat.app.fake.FakeConfigs`


## ⚙️ Release Notes 
*Add a bullet point list summary of the feature and possible migration
guides if this is a breaking change so this section can be added to the
release notes.*
*Include code snippets that provide examples of the feature implemented
or links to the documentation if it appends or changes the public
interface.*


## 📚 Documentation
*Please ensure that you properly document any additions in conformance
to [Spezi Documentation
Guide](https://github.com/StanfordSpezi/.github/blob/main/DOCUMENTATIONGUIDE.md).*
*You can use this section to describe your solution, but we encourage
contributors to document your reasoning and changes using in-line
documentation.*


## ✅ Testing
*Please ensure that the PR meets the testing requirements set by CodeCov
and that new functionality is appropriately tested.*
*This section describes important information about the tests and why
some elements might not be testable.*


## 📝 Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md):
- [ ] I agree to follow the [Code of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md).
@PSchmiedmayer
Copy link
Member

@pauljohanneskraft @eldcn Wondering if we can merge this PR in main as well; let me know what you think.

@eldcn eldcn mentioned this pull request Mar 9, 2025
1 task
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.

3 participants