Skip to content
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

Function name is not a valid topic name? #2422

Closed
robmoss opened this issue Mar 19, 2024 · 6 comments
Closed

Function name is not a valid topic name? #2422

robmoss opened this issue Mar 19, 2024 · 6 comments

Comments

@robmoss
Copy link

robmoss commented Mar 19, 2024

I experience an error on GitLab CI, but not locally, where pkgdown 2.0.7 raises an error when building the function reference:

! In '_pkgdown.yml', topic must be a known topic name or alias
✖ Not 'retic_steady_state'

where retic_steady_state is a documented and exported function in my package. The reference section of _pkgdown.yaml looks like:

reference:
- title: "Model parameters"
  desc: >
    Functions that ...
  contents:
  - ends_with("_parameters")
  - retic_steady_state

In both cases, I'm calling R -e 'pkgdown::build_site()' from the command line, and the site builds without any issues on my laptop. I can't figure out why it behaves completely differently on GitLab CI — do you have any ideas? I can link to the CI job if that would be helpful.

@maelle
Copy link
Collaborator

maelle commented Mar 19, 2024

A link might help indeed!
One possibility: could the help file have been gitignored, or just not pushed to the repository?

@robmoss
Copy link
Author

robmoss commented Mar 19, 2024 via email

@maelle
Copy link
Collaborator

maelle commented Mar 19, 2024

@robmoss There's a .gitignore file in man/, that ignores all the .Rd file. pkgdown does not run devtools::document() so you'd need to either

  • add this step to the workflow that intends to build the website,
  • remove man/.gitignore.

I'd recommend doing the latter, because it's unusual to not commit the Rd files to the code source repository, even if those are "derived files".

With the Rd files checked into the repository, you could even simplify the installation instructions I think (recommending using pak (see also pak package source), or install.packages() if you set up an R-universe).

@maelle maelle closed this as completed Mar 19, 2024
@robmoss
Copy link
Author

robmoss commented Mar 19, 2024 via email

@maelle
Copy link
Collaborator

maelle commented Mar 19, 2024

Note that for package development issues, the problem can also sometimes be .Rbuildignore -- those pesky ignore files should not be... ignored 😸

@robmoss
Copy link
Author

robmoss commented Mar 19, 2024

@maelle thanks very much for your advice. I've managed to set up a personal R-universe and simplified the installation instructions as a result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants