CDCgov / wastewater-informed-covid-forecasting

Wastewater-informed COVID-19 forecasting models submitted to the COVID-19 Forecast Hub
https://cdcgov.github.io/wastewater-informed-covid-forecasting/
Apache License 2.0
44 stars 8 forks source link

Fix pre-commit #141

Closed kaitejohnson closed 2 months ago

kaitejohnson commented 3 months ago

This PR closes #144

kaitejohnson commented 3 months ago

Stuck here:

Error in find_package_root(dir) : 
  Could not find R package in `.` or its parent directories.
kaitejohnson commented 2 months ago

This is basically flagging every package even if it is in the DESCRIPTION.

Seems like the root = thing just isn't working because it seems to be scanning the whole repo (e.g. its flagging things in scratch)

kaitejohnson commented 2 months ago

Not an ideal solution but wondering if for now we should just get rid of deps-in-desc because I think it is covered in R-cmd-check

zsusswein commented 2 months ago

Stuck here:

Error in find_package_root(dir) : 
  Could not find R package in `.` or its parent directories.

This is super weird because I literally copied and pasted your .pre-commit.config.yaml and .github/workflows/pre-commit.yaml and it's working great

kaitejohnson commented 2 months ago

Stuck here:

Error in find_package_root(dir) : 
  Could not find R package in `.` or its parent directories.

This is super weird because I literally copied and pasted your .pre-commit.config.yaml and .github/workflows/pre-commit.yaml and it's working great

I think the issue is that repo != package, but I am not sure why specifying the `root = isn't working, and have tried a few different things.

@dylanhmorris My suggested way forward here is to remove the hook for deps-in-desc from the .pre-commit-config.yaml, which of course means they won't run locally but since they are in check-ww and check-eval R CMD Check, they will be caught in CI. I will make a separate issue to figure out how to add them back into pre-commit.

dylanhmorris commented 2 months ago

@dylanhmorris My suggested way forward here is to remove the hook for deps-in-desc from the .pre-commit-config.yaml, which of course means they won't run locally but since they are in check-ww and check-eval R CMD Check, they will be caught in CI. I will make a separate issue to figure out how to add them back into pre-commit.

Seems sensible to me.