hubverse-org / hubEnsembles

Ensemble methods for combining hub model outputs.
https://hubverse-org.github.io/hubEnsembles/
Other
5 stars 1 forks source link

Fix `R CMD CHECK` notes #97

Closed annakrystalli closed 1 month ago

annakrystalli commented 4 months ago

Although our actions are passing, there are three notes wehn running R CMD CHECK that would need addressing prior to any CRAN submission:

── R CMD check results ─────────────────── hubEnsembles 0.0.0.9002 ────
Duration: 19.1s

❯ checking for portable file names ... NOTE
  Found the following non-portable file paths:
    hubEnsembles/inst/example-data/example-simple-forecast-hub/model-output/UMass-ar/2022-11-28-UMass-ar.csv
    hubEnsembles/inst/example-data/example-simple-forecast-hub/model-output/UMass-ar/2022-12-05-UMass-ar.csv
    hubEnsembles/inst/example-data/example-simple-forecast-hub/model-output/UMass-ar/2022-12-12-UMass-ar.csv
    hubEnsembles/inst/example-data/example-simple-forecast-hub/model-output/UMass-gbq/2022-11-28-UMass-gbq.csv
    hubEnsembles/inst/example-data/example-simple-forecast-hub/model-output/UMass-gbq/2022-12-05-UMass-gbq.csv
    hubEnsembles/inst/example-data/example-simple-forecast-hub/model-output/UMass-gbq/2022-12-12-UMass-gbq.csv
    hubEnsembles/inst/example-data/example-simple-forecast-hub/model-output/simple_hub-baseline/2022-11-28-simple_hub-baseline.csv
    hubEnsembles/inst/example-data/example-simple-forecast-hub/model-output/simple_hub-baseline/2022-12-05-simple_hub-baseline.csv
    hubEnsembles/inst/example-data/example-simple-forecast-hub/model-output/simple_hub-baseline/2022-12-12-simple_hub-baseline.csv

  Tarballs are only required to store paths of up to 100 bytes and cannot
  store those of more than 256 bytes, with restrictions including to 100
  bytes for the final component.
  See section ‘Package structure’ in the ‘Writing R Extensions’ manual.

❯ checking installed package size ... NOTE
    installed size is  6.5Mb
    sub-directories of 1Mb or more:
      doc            3.8Mb
      example-data   2.6Mb

 ❯ checking R code for possible problems ... NOTE
  linear_pool: no visible binding for global variable ‘output_type’
  linear_pool_quantile: no visible binding for global variable
    ‘output_type_id’
  linear_pool_quantile: no visible binding for global variable ‘value’
  linear_pool_quantile: no visible binding for global variable ‘pred_qs’
  validate_output_type_ids: no visible binding for global variable
    ‘output_type’
  validate_output_type_ids: no visible binding for global variable
    ‘model_id’
  validate_output_type_ids: no visible binding for global variable
    ‘output_type_id’
  Undefined global functions or variables:
    model_id output_type output_type_id pred_qs value
lshandross commented 4 months ago

Notes about portable file names and package size will be fixed once the vignette is updated with the relevant parts from the finalized version of the manuscript. The no-visible binding for global variable(s) note has been fixed.

elray1 commented 4 months ago

Noting that since those data frame columns are not actually global variables defined by the package, a cleaner solution to that issue than the one implemented in #97 is to import .data from rlang and then use .data$<column name> to refer to the column. There is some documentation of this here.

lshandross commented 1 month ago

Usage of in-package files with problematic names has been superseded by data from the hubExamples package. The original files have been deleted in the linked commit.