Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 9, 2026

CRAN's new relative path check flagged ../reference/index.html in the built vignette as invalid. R's dynamic help system uses 00Index.html for the package index, not index.html.

Changes

  • Updated vignettes/using-distances.Rmd line 31: ../reference/index.html../reference/00Index.html

The link targets the same content—the package function reference index—but now uses the correct filename for R's help system.

Original prompt

This section details on the original issue you should resolve

<issue_title>Relative URLs</issue_title>
<issue_description>New CRAN test reports:

Version: 2.11.1
Check: relative paths in package URLs
Result: NOTE 
  Found the following (possibly) invalid URL:
    URL: ../reference/index.html
      From: inst/doc/using-distances.html
Flavors: [r-devel-linux-x86_64-debian-clang](https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-clang/TreeDist-00check.html), [r-devel-linux-x86_64-debian-gcc](https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-gcc/TreeDist-00check.html)

Explanatory message from KH reads:

Specifically, please see the NOTEs about possibly invalid URLs in the
"relative paths in package URLs" check for the debian r-devel flavors.

This is a recently added check which tests whether URLs using relative
paths (and no scheme) in Rd files or HTML vignette outputs work in
dynamic help.

In general, packages can link from their help pages to their vignette
outputs using

../doc/FOO.html
../doc/FOO.pdf

and from their vignette outputs to their help files or topics using,
respectively,

../html/FILE.html
../help/TOPIC

(We have recently also allowed for ../articles as synonym for ../doc and
for ../reference as synonym for ../html.)

A package can also link to vignette outputs and help files/topics in
another package PKG by replacing ../ by ../PKG/.

There are a few other relative paths which work in dynamic help, but are
best avoided, as they cannot easily be made to work for the CRAN package
web pages.

Can you please take a look at the new NOTEs and fix "as necessary"?

If you use a relative path you think should work or be made to work,
please let me know.

(E.g., a few packages use ../reference/index.html which I guess should
be ../reference/00Index.html, but may be intended differently?)
</issue_description>

<agent_instructions>Please read the issue carefully and update the documentation accordingly, remembering to fix the roxygen source and the rendered docs (with document()). Ensure that updated URLs are correct and working.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 9, 2026 10:55
Co-authored-by: ms609 <1695515+ms609@users.noreply.github.com>
Co-authored-by: ms609 <1695515+ms609@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix possibly invalid URLs in documentation Fix relative URL in vignette for CRAN compliance Jan 9, 2026
Copilot AI requested a review from ms609 January 9, 2026 10:58
@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.31%. Comparing base (2cb9ef2) to head (2c7ee14).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #172   +/-   ##
=======================================
  Coverage   99.31%   99.31%           
=======================================
  Files          43       43           
  Lines        3201     3201           
=======================================
  Hits         3179     3179           
  Misses         22       22           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ms609
Copy link
Owner

ms609 commented Jan 9, 2026

Hmm, no, updating this in the vignette source gives a non-existent pkgdown site:
https://ms609.github.io/TreeDist/reference/00Index.html

@ms609 ms609 closed this Jan 9, 2026
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.

Relative URLs

2 participants