mschubert / clustermq

R package to send function calls as jobs on LSF, SGE, Slurm, PBS/Torque, or each via SSH
https://mschubert.github.io/clustermq/
Apache License 2.0
145 stars 26 forks source link

ENH: Add skip conditions to unit tests #316

Closed mfansler closed 8 months ago

mfansler commented 9 months ago

It would be preferable to have unit tests skip rather than fail when suggested dependencies are missing. This adds a condition for that, as well as exchanges use of dplyr::tibble with a base::data.frame equivalent.

mschubert commented 8 months ago

Thanks, the tibble::tibble cause a check warning now:

* checking for unstated dependencies in ‘tests’ ... WARNING
Warning: '::' or ':::' import not declared from: ‘tibble’
mfansler commented 8 months ago

Thanks, the tibble::tibble cause a check warning now:

* checking for unstated dependencies in ‘tests’ ... WARNING
Warning: '::' or ':::' import not declared from: ‘tibble’

This should be resolved.

mschubert commented 8 months ago

I think the work_chunk tests should not depend on tibble at all. A better approach would be:

df = structure(row.names=c(NA, -3), class="data.frame", .Data=list(
    a = 1:3,
    b = as.list(letters[1:3]),
    c = setNames(as.list(3:1), letters[1:3])
))

Can you change that?

Happy to include the foreach skip!