As mentioned by Henrik, The code referenced seems only implemented in
R-devel currently. Bioconductor will look at updating the code we use on
our systems to match when our Bioconductor version is being built against
R-devel (after the October release) .
Lori Shepherd
Bioconductor Core Team
Roswell Park Cancer Institute
Department of Biostatistics & Bioinformatics
Elm & Carlton Streets
Buffalo, New York 14263
------------------------------
*From:* Henrik Bengtsson <henrik.bengtsson at gmail.com>
*Sent:* Tuesday, September 25, 2018 7:01:36 PM
*To:* lg390 at cam.ac.uk
*Cc:* Shepherd, Lori; lluis.revilla at gmail.com; bioc-devel at r-project.org
*Subject:* Re: [Bioc-devel] NEWS.md
Forgot to mention that here's how news() select which file to parse if
there are several:
## Look for new-style inst/NEWS.Rd installed as NEWS.Rd
## If not found, look for NEWS.md.
## If not found, look at old-style
## NEWS inst/NEWS
## installed as NEWS (and ignore ChangeLog files).
Source:
https://github.com/wch/r-source/blob/d20943d71407f9209cb6c7581ac0fce3b3517419/src/library/tools/R/news.R#L62-L66
/Henrik
On Tue, Sep 25, 2018 at 3:58 PM Henrik Bengtsson
<henrik.bengtsson at gmail.com> wrote:
Note that in R-devel, we have that
(https://cran.r-project.org/doc/manuals/r-devel/NEWS.html):
* news() gains support for ?NEWS.md? files.
That is, news(package = pkg) not only finds NEWS.md (as before) but
also parses it (into sections etc.) analogously to how it parses
NEWS.Rd and NEWS.
Because of this, I'd say a package should use only one of the NEWS,
NEWS.Rd, and NEWS.md files.
Also, I believe CRAN has parsed NEWS.md files for quite a while now
and rendered them as HTML. I think Bioconductor should do the same
thing (sounds like this is what Llu?s argued for), especially with the
new NEWS.md support by news().
/Henrik
On Tue, Sep 25, 2018 at 2:08 PM Laurent Gatto <lg390 at cam.ac.uk> wrote:
Dear all,
My experience (and things may have changed since I set this up) is that
NEWS and NEWS.md serve different purposes despite a very similar
syntax. The former is used by news() and displayed on the Bioconductor
page (would NEWS.md be used if NEWS was absent?), while the one with
md extension displays nicely (including links) on github and in pkgdown
sites.
My solution is a Makefile recipe [1] (contributed by Sebastian Gibb)
that converts NEWS.md into NEWS while updating the syntax and removing
markdown links (typically to github issues, that are automatically
expanded from #123 to a full URL via a github hook).
NEWS: #' create plain text NEWS from NEWS.md if available
test -f ${PKGDIR}/NEWS.md && sed '/^# .*$$/d; /^## .*$$/{s/^##
//g; p; s/./-/g}; /^###\+/{s/./\u&/g}; s/^##\+ //g;
1,2{/^[[:space:]]*$$/d}; s/\[\(#[0-9]\+\)\]([^)]\+)/\1/g' ${PKGDIR}/NEWS.md
It can be used currently. If you remove the .md extension but keep
the format in should be recognized. As described in the ?news help page
If 'package' is '"R"' (default), a news db is built with the
since the 3.0.0 release of R (corresponding to R's top-level
'NEWS' file). Otherwise, if the given add-on package can be
in the given libraries, it is attempted to read its news in
structured form from files 'inst/NEWS.Rd', 'NEWS' or 'inst/NEWS'
(in that order).
Please also note your news file is formatted incorrectly. from the
The plain text 'NEWS' files in add-on packages use a variety of
different formats; the default news reader should be capable to
extract individual news entries from a majority of packages from
the standard repositories, which use (slight variations of) the
following format:
? Entries are grouped according to version, with version
"Changes in version" at the beginning of a line, followed
a version number, optionally followed by an ISO 8601 format
date, possibly parenthesized.
? Entries may be grouped according to category, with a
header (different from a version header) starting at the
beginning of a line.
? Entries are written as itemize-type lists, using one of
'*', '-' or '+' as item tag. Entries must be indented, and
ideally use a common indentation for the item texts.
Please remove the pound sign (# ) from the header entry - and use
"Changes in version" not "BioCor"
so for example:
# BioCor 0.99.25
* Update Vignette to just output html
# BioCor 0.99.24
* Submit the package to the Bioconductor project
# BioCor 0.99.23
* Add the Bioconductor webhook
Would become
Changes in version 0.99.25
* Update Vignette to just output html
Changes in version 0.99.24
* Submit the package to the Bioconductor project
Changes in version 0.99.23
* Add the Bioconductor webhook
Lori Shepherd
Bioconductor Core Team
Roswell Park Cancer Institute
Department of Biostatistics & Bioinformatics
Elm & Carlton Streets
Buffalo, New York 14263