Closed davidverweij closed 3 years ago
@jawrainey responded to your comments - please have another look.
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:
__key_by_value
is not used in byteflies.py
we could remove it?log.debug
instead?@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.
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
poetry install
poetry shell
poetry run nox -rs
for all testspoetry run consumer
to run the inventory for the overall pipeline.envs
are correctly set - includingACCESS_AUTHENTICATED_ENDPOINTS=True
in.consumer.env
python data_transfer/main.py BTF Kiel 0 1
to run the BTF pipeline for today (0
) and yesterday (1
)For testing the historical data pipeline, I suggest to add
return
after logging the data period here, and run:python data_transfer/main.py BTF Kiel -1