ideafast / middleware-services

Python API containing endpoints for smartphone hub applications and transfer to data portal
0 stars 0 forks source link

Byteflies update, closes #27 #55

Closed davidverweij closed 3 years ago

davidverweij commented 3 years ago

These changes ensure that the ByteFlies branch follows a similar flow to the Dreem branch, including folder structure, batch-processing by patient+device_id as well as logging.

Partially responds to #28 (at least for testing)

Test

For testing the historical data pipeline, I suggest to add return after logging the data period here, and run:

davidverweij commented 3 years ago

@jawrainey responded to your comments - please have another look.

jawrainey commented 3 years ago

Great work @davidverweij. This works for me locally (also in Docker locally) to get all existing records for Kiel/Munster. Adding the option to get historical data works perfectly too. Super job on adding quite a range of complex testing.

I've two very minor comments, but otherwise it's functionally perfect:

  1. As __key_by_value is not used in byteflies.py we could remove it?
  2. Are the print statements here intended to exist or should these be log.debug instead?
davidverweij commented 3 years ago

@jawrainey Good catches. I've removed the __key_by_value. The print statements were a sloppy leftover of my testing. I've also re-added the time.sleep(4) as you have for DRM to mitigate the (current) concerns around overloading the inventory api.