RMI-PACTA / workflow.portfolio.parsing

Other
0 stars 0 forks source link

Test/fix broken r checks #25

Closed AlexAxthelm closed 6 months ago

AlexAxthelm commented 6 months ago

Fixing a bunch of red bubbles that popped up now that we've made RMI-PACTA/actions's R suite more robust.

biggest changes here are in the testing suite, which maintains the original logic, but has had a major refactor in invocation. One notable addition there is the expect_multiple_conditions() (in a helper file), which allows for checking multiple warning, error, or messages pretty smoothly

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.31%. Comparing base (e6af733) to head (2a4bb7a).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #25 +/- ## ======================================= Coverage 95.31% 95.31% ======================================= Files 5 5 Lines 192 192 ======================================= Hits 183 183 Misses 9 9 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 6 months ago

Docker image from this PR (2a4bb7a319ad9af650dbfbd0e116b867dc43327a) created

docker pull ghcr.io/rmi-pacta/workflow.portfolio.parsing:pr25
AlexAxthelm commented 6 months ago

@cjyetman any idea why the tests for column types are failing on R < 4.0?

cjyetman commented 6 months ago

@cjyetman any idea why the tests for column types are failing on R < 4.0?

I have no idea what is even being tested here, but.... if I had to take a wild guess on why stuff like this is popping up

file_contents[["currency"]] has type 'integer', not 'character'.

I'd guess that maybe some data.frames are being created with stringsAsFactors = TRUE because the default changed to stringsAsFactors = FALSE in R v4.0?!?

AlexAxthelm commented 6 months ago

Thanks @cjyetman that cleared it up perfectly!