reichlab / variant-nowcast-hub

A repository to store COVID-19 variant nowcasts collected as a modeling hub.
MIT License
16 stars 7 forks source link

Error with finding custom validation function when running validations outside of repository root #127

Open elray1 opened 2 days ago

elray1 commented 2 days ago

This error was reported by Spencer:

> validate_submission(hub_path = '../variant-nowcast-hub',
+                     file_path = 'UGA-multicast/2024-10-23-UGA-multicast.parquet') -> sub_validation
Error in `purrr::map()`:
ℹ In index: 1.
ℹ With name: clade_prop_sum_one.
Caused by error in `file()`:
! cannot open the connection
Run `rlang::last_trace()` to see where the error occurred.
Warning message:
In file(filename, "r", encoding = encoding) :
  cannot open file 'src/validations/R/clade_prop_sum_one.R': No such file or directory

He confirmed that validations run OK if he runs them from within the hub repo root, specifying hub_path = '.'. It seems like somewhere, we should be targeting the clade_prop_sum_one.R file relative to the hub_path, but we're just using that relative path directly.

zkamvar commented 1 day ago

Tracking this in https://github.com/hubverse-org/hubValidations/issues/141