Skip to content

Add @keywords #154

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

Closed
dsweber2 opened this issue Aug 25, 2023 · 1 comment · Fixed by #155
Closed

Add @keywords #154

dsweber2 opened this issue Aug 25, 2023 · 1 comment · Fixed by #155
Labels
documentation Improvements or additions to documentation

Comments

@dsweber2
Copy link
Contributor

per suggestion by @dajmcdon:

To view “all possible endpoints”, we could add @Keyword tags to each of their documentation files. This has 2 benefits. One is that this can be easily (and quickly) searched. So we could write a small helper, say, available_endpoints(), that would just list them all. If we add more later, we just remember to add the same keyword to the epicall function. The second benefit is that the _pkgdown.yml reference index can contain has_keyword(…), so we don’t need to list all the endpoints individually. Since this (and likely lots of other parts of the documentation) are shared across all signals, we could even extract anything shared to a single doc. I can probably do this as a PR if others think it would be worth having.

@dsweber2 dsweber2 added the documentation Improvements or additions to documentation label Aug 25, 2023
@dajmcdon
Copy link
Contributor

Logging a pain point for posterity:

Despite adding @keyword endpoint in the Roxygen, these turn out not to create "keywords" in help.search(). The reason is that there is a list of standardized keywords and "endpoint" isn't among them. I believe that, because it's non-standard, and even though it's still converted to \keyword{endpoint} in the .Rd file, it actually gets stored as a "concept".

This was super annoying to try to figure out. You can view the standard keywords with file.show(file.path(R.home("doc"), "KEYWORDS"))

So, once #155 is merged, help.search(package = "epidatr", keyword = "endpoint") will find nothing, but help.search("endpoint", package = "epidatr", fields = "concept") will list all the endpoints.

dajmcdon added a commit that referenced this issue Aug 30, 2023
dshemetov pushed a commit that referenced this issue Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants