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

Design / Implement a way for testers to generate location data and test conflicts #398

Open
kenpugsley opened this issue Apr 8, 2020 · 13 comments
Labels
help wanted Extra attention is needed

Comments

@kenpugsley
Copy link
Collaborator

We need way for testers to be able to test the "you have been near someone who reported infected". Possibly a page on the repo with some javascript to generate the proper data.

@diarmidmackenzie
Copy link

I have built something that will work here for now.

A Python Flask App running here:
http://diarmidmackenzie.pythonanywhere.com/infection-data?longitude=1&latitude=2

(having spent hours cursing at Google App Engine this morning, I discovered Python Anywhere & it is a dream!)

Modify the longitude & latitude parameters in the URL to your location. This will creates one case, with 1 day of recent data, with a set of 288 random points within +/-0.0005 degrees of your location.

So if you want to test at the Empire State Building, use URL:
http://diarmidmackenzie.pythonanywhere.com/infection-data?longitude=240.7484445&latitude=-73.9878584

0.0005 degrees = approx 500m. So a 1 sqkm area. I think 288 data points ought to get a hit pretty reliably. Maybe I should tighten up some more so testers know exactly what to expect....? (I was trying to keep the data somewhat realistic rather than just spitting the user's entered lat & long back at them).

I will post a link to this on the Testers Slack channel too.

At some point I'll also push the source code into GitHub...

@diarmidmackenzie
Copy link

Intention is that you configure the above URL as your "Healthcare Authority".

Since the data is random, you will get a different set of data points each time you query the URL. Hopefully that won't cause any problems.

All this is only useful once we fix this: #430

(but may be a useful resource in testing that fix).

@kenpugsley
Copy link
Collaborator Author

This is fantastic! Great work!

@diarmidmackenzie
Copy link

Various updates pushed to allow control of how many cases (up to 10), how many days of data (up to 28) and the radius (i.e. range over which to distribute results).

Also some help, which is shown if you don't include long or lat, or make various other errors.

http://diarmidmackenzie.pythonanywhere.com/infection-data

@diarmidmackenzie
Copy link

@kenpugsley I can relax the 10 cases limit for any scale testing we might want to do. There is no specific known limit here - just being cautious for now.

@kenpugsley kenpugsley added the help wanted Extra attention is needed label Apr 13, 2020
@kenpugsley
Copy link
Collaborator Author

I think the 10 cases is great for now. Let's see how the usage goes and iterate from there.

@penrods
Copy link
Contributor

penrods commented Apr 13, 2020

FYI: As a simple "test" you can trigger fake overlaps by going to the About box and tapping on the people icon 4 times. It will turn red. Restart the app and you should see reported overlaps.

This will persist for up to 12 hours (if you have a Healthcare Authority), or you can 4-tap the icon again to toggle.

@kenpugsley
Copy link
Collaborator Author

@penrods - that PR isn't in the build yet. #437

@AdamLeonSmith
Copy link

I am touch with a startup that uses ML to generate synthetic data from seed data, and they have confirmed this should be realistic and represent the geo data from mobiles.

Is this needed? If so, is there a way to import files of location data in google history format, or only privkit format? The former would be a more end to end set of testing if possible, the latter would I assume only be useful for SafePlaces testing.

@diarmidmackenzie
Copy link

diarmidmackenzie commented Apr 18, 2020

Hi Adam! In theory there are 2 ways to import data into the system:

  • You can import google location data into the Safe Paths App.
  • You can import a data export from the Safe Paths App into Safe Places Server.

If we get the data in in google format, it'll be tedious to have to use the app to manually convert it. Possibly we could extract the relevant code from the App into a tool, but I don't know how modular that code is & therefore whether that's tenable.

CAVEAT: The App Import function was disabled in v0.9.4, as the UX is horrid. We are working on a better UX, but it's not quite there yet. #410

@AdamLeonSmith
Copy link

OK. So I think we should focus on PrivKit bulk data to prove Safe Places processing. Do we have any seed data that be used to generate synthetic data? I have my own data only.

@diarmidmackenzie
Copy link

I reinstall the app too often to have any data history. It'd just be me at home anyway.

You could:

  • install 0.9.2, download your location history from google, import then export
  • ask on #testing and on #app_dev on slack whether anyone has any data.

I'm not aware of anyone having archived any data, but some people have probably had the app stable installed & recording location for a while now.

@Patrick-Erichsen
Copy link
Contributor

@diarmidmackenzie think we can close this out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants