Skip to content

[Bioc-devel] NEWS.md

7 messages · Laurent Gatto, Henrik Bengtsson, Shepherd, Lori +1 more

#
Dear Bioconductor team,

I found that the new R version 3.5.1, to be used with the new release of
Bioconductor, supports the ?NEWS.md? files.

I updated my package (BioCor) to use `NEWS.md`. However, on the devel
landing page of the package stills shows the old file NEWS file. This is
consistent with the developer page (
https://www.bioconductor.org/developers/package-guidelines/#news).

Will this be a requirement or can I keep the NEWS.md file?

Many thanks,

Llu?s
#
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 news
     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 found
     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 ?news


     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 header
          "Changes in version" at the beginning of a line, followed by
          a version number, optionally followed by an ISO 8601 format
          date, possibly parenthesized.

        ? Entries may be grouped according to category, with a category
          header (different from a version header) starting at the
          beginning of a line.

        ? Entries are written as itemize-type lists, using one of 'o',
          '*', '-' 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
#
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 the
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 > ${PKGDIR}/NEWS

(where ${PKGDIR} is the package directory)

Unsure whether this helps or adds further to the confusion.

Best wishes,

Laurent

[1] https://github.com/ComputationalProteomicsUnit/maker
On 25 September 2018 13:55, Shepherd, Lori wrote:

            
--
Laurent Gatto | @lgatt0
http://lgatto.github.io/
#
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:
#
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:
#
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
#
Yes I was arguing if NEWS.md could be used. Only after Lori reply I
realized the changes don't apply for the next release of Bioconductor.
Anyway, thanks Laurent for the command, and the team for considering it in
its due time.

Llu?s


On Wed, 26 Sep 2018 at 13:22, Shepherd, Lori <Lori.Shepherd at roswellpark.org>
wrote: