В Mon, 7 Apr 2025 11:10:21 -0400
"Kevin R. Coombes" <kevin.r.coom...@gmail.com> пишет:

> But version R 4.5.0 RC comes back with;
>      (possibly) invalid URL. Status: 403  Message: Forbidden
> I copied the URL as reported in the error message, pasted it into my 
> browser, and it worked just fine.
> 
> Can I assume that this is just something weird about the
> corresponding winbuilder server at the moment, and go ahead and
> submit the package?

This is a false positive. R CMD check sends automated requests to all
URLs it finds in the package. PubMed "protects" itself from automated
requests and returns an error code:

$ curl -I https://pmc.ncbi.nlm.nih.gov/articles/PMC2730180/
HTTP/2 403
content-length: 134
content-type: text/html; charset=UTF-8
date: Mon, 07 Apr 2025 15:14:59 GMT
alt-svc: clear

Using a browser instead results in subtly different behaviour visible
to the server, so the page loads successfully when clicking a link.

I see you're already linking to the article's DOI, 10.4137/cin.s2846,
and the article is not paywalled. Is it an option to remove the PubMed
link? There is code that is intended to recommend to only use the DOI,
but currently doesn't include a pattern for the new PubMed URLs:

if(length(y) &&
         any(ind <-
           (grepl(re_or(c("^https://pubmed.ncbi.nlm.nih.gov/[0-9]+";,
              "^https://www.ncbi.nlm.nih.gov/pmc/articles/PMC[0-9]+/$";,
              "^https://academic.oup.com/.*(/[0-9]*){4}$",
              "^https://www.sciencedirect.com/science/article";)),
            y$URL)))) {
    ## <FIXME>
    ## Ideally we would complain about such URLs in general
    ## and not only when the URL checks were not OK.
    paste(c("Please use DOIs for the following publisher URLs:",
            paste0("  ", y$URL[ind])),
          collapse = "\n")
    ## </FIXME>
}

If you don't want to remove the PubMed link, you can explain the
"possibly invalid URL" as a false positive in the submission comment.

-- 
Best regards,
Ivan

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to