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

Use TaskDataHandler in DataCollectionViewModel #3005

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

shobhitagarwal1612
Copy link
Member

@shobhitagarwal1612 shobhitagarwal1612 commented Jan 15, 2025

Towards #2993

In #2995, we introduced TaskDataHandler for managing data state. This PR aims at using it in DataCollectionViewModel.

This shouldn't change the behavior and is no-op.

Split from #2986

@anandwana001 @scolsen PTAL?

@auto-assign auto-assign bot requested a review from anandwana001 January 15, 2025 12:41
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 63.43%. Comparing base (4dfd038) to head (108928f).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...round/ui/datacollection/DataCollectionViewModel.kt 85.71% 1 Missing ⚠️
...ndroid/ground/ui/datacollection/TaskDataHandler.kt 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3005      +/-   ##
============================================
- Coverage     63.50%   63.43%   -0.08%     
+ Complexity     1251     1249       -2     
============================================
  Files           268      268              
  Lines          6521     6511      -10     
  Branches        914      912       -2     
============================================
- Hits           4141     4130      -11     
  Misses         1792     1792              
- Partials        588      589       +1     
Files with missing lines Coverage Δ
...round/ui/datacollection/DataCollectionViewModel.kt 79.55% <85.71%> (-0.97%) ⬇️
...ndroid/ground/ui/datacollection/TaskDataHandler.kt 93.33% <66.66%> (-6.67%) ⬇️

@@ -141,7 +139,7 @@ internal constructor(
private val taskViewModels: MutableStateFlow<MutableMap<String, AbstractTaskViewModel>> =
MutableStateFlow(mutableMapOf())

private val data: MutableMap<Task, TaskData?> = LinkedHashMap()
private val taskDataHandler = TaskDataHandler()
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it a good place for object creation?

Copy link
Member Author

Choose a reason for hiding this comment

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

We later need this as a dependency for TaskSequenceHandler which will also be initialized at class level.

@shobhitagarwal1612 shobhitagarwal1612 merged commit 12ceaef into master Jan 15, 2025
5 checks passed
@shobhitagarwal1612 shobhitagarwal1612 deleted the integrate-taskdatahandler branch January 15, 2025 12:59
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