EHDEN / ETL-UK-Biobank

ETL UK-Biobank
https://ehden.github.io/ETL-UK-Biobank/
12 stars 4 forks source link

Add tests for if loops in transformations #313

Open egarcialara opened 3 years ago

egarcialara commented 3 years ago

Problem: There's been a recent error with the ETL run: a fix that we created (reading columns as eg integers for covid files) creates a problem when doing comparisons with previous tables (operator does not exist: character varying = integer)

This error was not caught up with our runs, because the function was inside an if loop that was never called with our synthetic data.

Solution: One solution could be making sure that all parts of the code in the transformations are being called during the tests.

_during the test-a-thon, we used this program covr::report(covr::package_coverage()) to see the test coverage, but it's valid for R packages. Not sure if there's a similar thing for python_

MaximMoinat commented 3 years ago

Specifically, add a test case for the part of the transformation updated by this comment: https://github.com/EHDEN/ETL-UK-Biobank/commit/8a6a623b781c80196db5bc96bb43e9584390cd0b