-
-
Notifications
You must be signed in to change notification settings - Fork 50
New hook to check contents of _pkgdown.yaml
contains all topics
#378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks @gravesti for raising this. I think indeed it could be useful. However, I'd not try to emulate what {pkgdown} does as a check, as this is less reliable than using the {pkgdown} functionality directly and may also change in the future. Steps involved to leverage existing infra:
Are you interested in contributing that? |
Hi @lorenzwalthert, yes I'm interested in looking at this further. I'm hoping to avoid having to run too much of the pkgdown process each commit though. |
It seems it would be enough to test if generating the indexes completes without error, ie to run
Unfortunately this brings a dependency on Pandoc as it does actually builds the html index pages. Is it possible within pre-commit checks? Otherwise I'll ask if the pkgdown devs can export some of the internal functions. |
Pandoc dependency sounds like trouble, in particular in pre-commit.ci settings. Did you find the internal functions in {pkgdown} that are responsible to trigger |
Yes, I could find the functions which generate the errors.
For vignettes, there's just The One idea I had is to define a dummy |
Do you need assistance in proceeding? I think your approach makes sense. We can also monky patch our dummy |
Good idea. I submitted an issue and pull request to pkgdown but didn't get a response. I wasn't aware of those mock packages. I'll prepare something today. |
I'm wondering about the tests for this hook. I think it will need a minimal package folder structure. |
Should be added to the template for packages. |
Done. |
I'd like to propose a new hook that checks if
_pkgdown.yaml
contains all of the topics inman/
. I'm not sure if this is a general enough issue but currently we are wasting a lot of time with commits failing the upstream checks whenpkgdown
tries to rebuild the site.Errors like:
* Topics missing from index: my_new_function
My prototype hook simply reads in each of the
.Rd
files and checks that one of the\alias{}
entries is included in a contents section of_pkgdown.yaml
. It might be interesting to check the other direction too.The text was updated successfully, but these errors were encountered: