Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Now news(package = "princurve") works - by renaming CHANGELOG to NEWS #11

Merged
merged 1 commit into from
Jul 6, 2018

Conversation

HenrikBengtsson
Copy link
Contributor

By renaming CHANGELOG to NEWS and placing it under the inst/ folder, R will recognize it and news(package = "princurve") will parse it and rendering it in text, as HTML, etc.

I haven't edited the content, but I've verified that it passes the (picky) parser that R uses for NEWS files. If the parser is not happy, news() will just display it as plain text. I use the following home-cooked validator for this:

check_news <- function (pathname = "NEWS") {
    news <- tools:::.news_reader_default(pathname)
    bad <- which(attr(news, "bad"))
    if (length(bad) == 0) 
        return(news)
    news_bad <- news[bad, ]
    msg <- sprintf("Detected %d malformed entries in %s: %s", 
        nrow(news_bad), sQuote(pathname), paste(news_bad$Version, 
            collapse = ", "))
    stop(msg, call. = FALSE)
}

@HenrikBengtsson
Copy link
Contributor Author

Forgot to say: By using a proper NEWS file, it will also be linked to from the HTML help index of the package.

@codecov
Copy link

codecov bot commented Jul 6, 2018

Codecov Report

Merging #11 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #11   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           8      8           
  Lines         266    266           
=====================================
  Hits          266    266

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 49c2a4e...a9db5a6. Read the comment docs.

@rcannood rcannood changed the base branch from master to devel July 6, 2018 05:44
@rcannood
Copy link
Owner

rcannood commented Jul 6, 2018

Good to know, thanks!

@rcannood rcannood merged commit 0ec06c8 into rcannood:devel Jul 6, 2018
@rcannood rcannood mentioned this pull request Jul 6, 2018
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.

2 participants