Open mikix opened 7 months ago
Some discussion around this for posterity:
Matt and I just had a quick slack convo about this and I wanted to mention that we both are leaning away from exposing a way to create raw resource tables (like the Library testbed or the data-metrics harness do) and towards mocking/creating the core tables directly if we can.
Faster certainly, and also easier to mock edge cases directly.
Maybe its API looks similar to the testbed class (e.g. add_patient()
), but it would just operate on the core tables instead of raw tables.
It might be nice to encourage unit tests in studies and provide some tooling for it.
In the hypertension study (and still-WIP data-metrics study), I've got a little test harness method that runs a study on some ndjson and compares the resulting tables against some csvs.
Super basic, but pretty useful. We could copy that into the Library, as a starting block.