Skip to contents

check_publication_readiness() walks through the publication workflow and reports, item by item, what is in place and what is missing. For every gap it names the step and the washr function that closes it, so a skipped step shows up here and not as an error in a later function. The function only reads the package. It writes nothing.

The items are the mechanically decidable part of the openwashdata review standard for the metadata, the data dictionary, the documentation and the check workflow of a package. Each item has a stable id, so a script or a review tool can pick the rows it needs.

AreaidPasses when
metadatalicenseLicense in DESCRIPTION is CC BY 4.0, the license of the standard
metadatadescription_completeTitle, Description and Authors@R no longer hold the placeholder text of a new package
metadatacitation_cffCITATION.cff is present
metadatacitation_versionthe version in CITATION.cff equals Version in DESCRIPTION
metadatacitation_authorsCITATION.cff and inst/CITATION carry real authors, not "Firstname Lastname"
metadatazenodo_json.zenodo.json is present and equals what DESCRIPTION gives now
metadatakeywordsDESCRIPTION carries X-schema.org-keywords; the detail says whether CITATION.cff agrees
metadatacoverageDESCRIPTION carries X-schema.org-spatialCoverage and X-schema.org-temporalCoverage
metadatatitle_lengthTitle has at most 65 characters
datadata_presentdata/ holds at least one .rda file that loads
datadictionary_presentdata-raw/dictionary.csv is present
datadictionary_coveragethe dictionary covers every variable of every data object
datadictionary_descriptionsno description is empty or a placeholder
datadictionary_schemathe five washr columns in order, UTF-8 without a byte order mark, one class name per variable_type
docsroxygen_docsevery data object has a help page in man/
docsreadmeREADME.Rmd and the rendered README.md are present
docsrd_sourceat least one help page in man/ carries a source
docsreadme_extdata_linksREADME.md links a .csv or .xlsx file under inst/extdata/
docsreadme_citationREADME.md names the DOI that CITATION.cff carries
docsvignettes_locationno .Rmd or .qmd file sits directly in vignettes/
docspkgdown_config_pkgdown.yml is present
docspkgdown_analytics_pkgdown.yml carries the analytics header
docspkgdown_urlurl in _pkgdown.yml is the Pages URL, not the repository URL
docspkgdown_funding_pkgdown.yml carries the funding text of the organisation
docspkgdown_publisherthe footer in _pkgdown.yml carries the publisher sentence of the organisation
docspkgdown_washr_versionthe footer in _pkgdown.yml names the washr version that Config/washr/version records
docspkgdown_brandthe brand entry in _pkgdown.yml matches the organisation
docspkgdown_llm_docs_pkgdown.yml does not switch off the llms.txt of the site (llm-docs: false)
docsdocs_untrackedgit tracks no file under docs/ while the pkgdown workflow deploys the site
testscheck_workflow.github/workflows/R-CMD-check.yaml is present
testscheck_workflow_devevery branches: list in that workflow includes dev
testscheck_badgeREADME.Rmd carries the R CMD check badge

An item that cannot be decided is reported as not applicable, with the reason: for example the version comparison when CITATION.cff is missing, or the docs/ item when the package has no pkgdown workflow. Not applicable items never count against the package.

Usage

check_publication_readiness(path = ".", profile = NULL)

Arguments

path

Path to the root of the data package. Defaults to the working directory.

profile

A named list with what the organisation expects of its packages. With NULL, the default, the package is held to its own values: the Config/washr/ fields in its DESCRIPTION that update_description() writes. A review tool passes the profile of the organisation instead. All entries are optional:

  • license: the license the package has to carry, "CC BY 4.0" by default, or "any" to accept every license that is set. A package of another organisation that is held to its own values gets "any".

  • analytics: "plausible" (the default) or "none". With "none" the analytics item is not applicable.

  • site_url_pattern: the Pages URL of a package, with <package> in place of the package name. Without it, any github.io URL passes.

  • funding_text: the funding sentence that _pkgdown.yml has to carry word for word. Without it, the funding item is not applicable.

  • publisher_text: the publisher sentence the footer has to carry word for word. Without it, the publisher item is not applicable.

  • keywords_required: keywords every package of the organisation has to carry.

  • brand: "none" when the organisation has no brand, or the name of its brand. Without it, the brand item is not applicable.

Value

A data frame of class washr_readiness, invisibly, with one row per item and the columns id, area, check (the item in words), status ("pass", "fail" or "na" for not applicable), detail (what was found) and fix (the step that closes the gap). The attribute ready is TRUE when no item fails, washr_version holds the installed washr version, and package the name and version of the package that was checked. Printing the object shows the report again.

See also

Before: every step of the workflow, up to update_citation() and setup_website(). Next: fix the items that fail and run it again, then release the package.

Other publishing functions: setup_readme(), setup_website(), update_website(), use_brand()

Examples

if (FALSE) { # \dontrun{
check_publication_readiness()

# Keep the result and work with the items that fail
readiness <- check_publication_readiness()
readiness[readiness$status == "fail", c("id", "detail", "fix")]
attr(readiness, "ready")
} # }