CoronaTeam / CoronaGame

Software Development Project 2020
3 stars 0 forks source link

Feature/infection alert #119

Closed TheCrazyKing closed 4 years ago

TheCrazyKing commented 4 years ago

Hello I have made some changes to the contamination that I intend to expose to you here:

  1. GridFirestoreInteractor now extends ConcretefirestoreInteractor
  2. The DataSender is now a CachedDataSender, so that the analyst can have access to the latest positions without making a request on the internet Thus the analyst now needs a cachedSender too ^^ 2.1 Thus, there is not DataSender but only CachedDataSender (far easier to implement)
  3. When the analyst counts how many contagious and non-sick people he encountered yesterday, he updates their probability of infection in this way: me.getIllnessProbability () + badMeetings * TRANSMISSION_FACTOR. It may not be optimal but that's the idea 3.1 IMPORTANT : I though about the fact that when yesterday you were 90% sure of beeing sick, when you actually get sick it is not so surprising, so when we increase the counter descibed in part 5 we add 1-probabilityOfBeeingInfected. WHO AGREES ?
  4. For the moment I have all instantiated in static in the InfectionActivity, typically the GPSActivity does not instantiate the aggregator but takes the static one of the InfectionActivity -> this has been changed now
  5. Added a document in Firebase : publicUser/UserID/recentlySickMeetingCounter which is accessible by anyone to notify a person that he is now sick, along with the fact that yesterday he was not and they were once in the same place
  6. TODO: Look at the receiver, he should be responsible to return every location around the location that is given in argument when we do getUserNearby
codeclimate[bot] commented 4 years ago

Code Climate has analyzed commit f3850409 and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 2

The test coverage on the diff in this pull request is 84.5% (80% is the threshold).

This pull request will bring the total coverage in the repository to 81.6% (0.1% change).

View more on Code Climate.

matteopariset commented 4 years ago

All fine