Skip to content

docs(reference): hide internal helpers from the pkgdown reference#3

Open
truenomad wants to merge 1 commit into
masterfrom
docs/hide-internal-helpers
Open

docs(reference): hide internal helpers from the pkgdown reference#3
truenomad wants to merge 1 commit into
masterfrom
docs/hide-internal-helpers

Conversation

@truenomad

Copy link
Copy Markdown
Contributor

Summary

  • Add @noRd to the 16 per-domain indicator dictionaries (epi_dictionary, fever_dictionary, itn_dictionary, ...) and the 6 .calc_n[0-5]_internal helpers.
  • Delete the 22 now-unused man/*.Rd files (devtools::document() regenerated).
  • Update the dhs-survey-analysis and methodology vignettes to drop references to per-domain dictionary helpers, pointing readers to dhs_dictionary() + a domain filter.

Why

These helpers carried @keywords internal but no @noRd, so roxygen still generated Rd files and pkgdown still rendered them under the auto-generated Internal section of the reference. The user-facing API is dhs_dictionary() (filterable across all 16 domains) and calc_incidence() (which calls the .calc_n*_internal cascade); exposing the seams in the reference adds noise without helping anyone.

Behaviour

Unchanged. The functions remain callable in-package — internal callers and sntmethods:::name() still work. Only their visibility on the pkgdown site changed.

Test plan

  • CI on this PR passes (R-CMD-check, lint).
  • devtools::document() is a no-op on master after merge (no drift).
  • After local pkgdown::build_site(): the reference index no longer lists *_dictionary (other than dhs_dictionary and make_dhs_raw_dictionary) nor the dot-calc_n* entries.
  • sntmethods:::epi_dictionary() and sntmethods:::.calc_n0_internal(df, 1000) still work.

The 16 per-domain indicator dictionaries (epi_dictionary,
fever_dictionary, ...) and the 6 .calc_n[0-5]_internal helpers carried
@Keywords internal but no @nord, so roxygen still generated Rd files
and pkgdown still indexed them under 'Internal'. They are not part of
the user-facing API - users get dictionaries via dhs_dictionary() and
the N0-N5 cascade via calc_incidence(); the per-domain and per-N
helpers exist only as implementation seams.

- Add @nord alongside @Keywords internal on each.
- Drop the corresponding 22 Rd files (devtools::document() regenerated).
- Update the dhs-survey-analysis and methodology vignettes to point
  readers to dhs_dictionary() with a filter, rather than listing
  per-domain helpers that are no longer documented.

Behaviour: these functions remain callable in-package (sntmethods:::
still works); only their reference-index visibility changed.
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

Successfully merging this pull request may close these issues.

1 participant