Repository navigation
feat: link the package website in .zenodo.json - #156
Merged
Merged
Conversation
pkg_site_url() returns the site URL the package records: the url of _pkgdown.yml first, then the entry of the DESCRIPTION URL field on the pages domain. A GitHub repository URL is passed over. The JSON-LD builder uses its DESCRIPTION half (pkgdown = FALSE), so its output is unchanged. Groundwork for #154. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0154SimKVEa4TH9HJ5GELbuv
build_zenodo_json() adds the package website to the Zenodo record when pkg_site_url() finds one: a second paragraph "Explore the data on a curated website" with the link in the description, written as HTML with the Description field escaped, and a related identifier with the relation isDocumentedBy and resource_type other. An empty Description gives only the website paragraph. The repository link (isSupplementTo) is now always written, since any related identifier replaces the release tag link that Zenodo adds by default; source DOIs keep isDerivedFrom. Without a website the description stays plain. The readiness fixture rewrites .zenodo.json after it writes _pkgdown.yml, and the zenodo_json readiness test covers a changed site URL. Addresses #154. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0154SimKVEa4TH9HJ5GELbuv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #154.
.zenodo.jsonnow links the package website, so the next release of a package keeps the site link on its Zenodo record. Until now that link had to be added by hand in the Zenodo editor (as on guluswm 1.0.0) and was lost at the next release. DESCRIPTION, CITATION.cff, inst/CITATION and the README are unchanged.Changes
pkg_site_url()in R/config.R. It reads theurlof_pkgdown.ymlfirst, then the DESCRIPTIONURLentry on the pages domain (github.iounlessConfig/washr/pages-domainsays otherwise). It passes over a GitHub repository URL and returns the URL as written.build_dataset_jsonld()uses the DESCRIPTION half of the helper (pkgdown = FALSE). JSON-LD output is unchanged.build_zenodo_json():description: with a website,<p>Description</p><p>Explore the data on a curated website: <a href="URL">URL</a></p>. The Description field is HTML escaped (&,<,>), because Zenodo reads the field as HTML. Without a website it stays the plain Description.related_identifiers: the repository (isSupplementTo) is always written, then the website (isDocumentedBy,resource_type: other), then source DOIs (isDerivedFrom, unchanged).update_zenodo_json()and the man page updated, plus a NEWS entry._pkgdown.ymlwinning over DESCRIPTION, no website, escaping, an empty Description, reading from another working directory, and unit tests forpkg_site_url(). The existing related identifier tests have new expectations. The readiness fixture rewrites.zenodo.jsonafter it writes_pkgdown.yml, and thezenodo_jsonreadiness test covers a changed site URL.Decisions
check_publication_readiness()reportszenodo_jsonas differing on existing packages until each one rerunsupdate_citation()at its next release. The NEWS entry says so.Test and check results
devtools::test(): 867 expectations, 0 failed, 0 skipped, 0 warnings, 0 errors.devtools::check(): 0 errors, 0 warnings, 0 notes.Follow-up
add-doiprompt (from pkgreview#35) only needs to confirm the site link on the Zenodo record, not ask for it to be added.