OHDSI / CohortDiagnostics

An R package for performing various cohort diagnostics.
https://ohdsi.github.io/CohortDiagnostics
41 stars 48 forks source link

Fix to remove existing files if batch operations are ran outside incremental mode #989

Closed azimov closed 1 year ago

azimov commented 1 year ago

See #988

@mdlavallee92 I think this may impact your PR but you also might see if I missed something with the fix proposed here.

Essentially this problem occurs when the batched operations are run when not using incremental mode. The fix in this PR is to delete the files before execution where incremental is false.

codecov[bot] commented 1 year ago

Codecov Report

Merging #989 (b8a303a) into develop (9b80b68) will increase coverage by 0.12%. The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop     #989      +/-   ##
===========================================
+ Coverage    87.28%   87.40%   +0.12%     
===========================================
  Files           19       19              
  Lines         3885     3899      +14     
===========================================
+ Hits          3391     3408      +17     
+ Misses         494      491       -3     
Impacted Files Coverage Δ
R/Private.R 85.46% <ø> (ø)
R/CohortCharacterizationDiagnostics.R 82.08% <100.00%> (+0.55%) :arrow_up:
R/CohortRelationship.R 79.01% <100.00%> (+0.35%) :arrow_up:
R/ExportCharacterization.R 97.26% <100.00%> (ø)
R/TimeSeries.R 97.50% <100.00%> (+0.02%) :arrow_up:
R/Incremental.R 93.08% <0.00%> (+1.59%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.