Skip to content

Commit

Permalink
Merge pull request #38 from mayer79/release_candidate
Browse files Browse the repository at this point in the history
Release candidate
  • Loading branch information
mayer79 committed Jan 29, 2022
2 parents eabc0e7 + 7d77e1a commit e65a394
Show file tree
Hide file tree
Showing 46 changed files with 456 additions and 1,573 deletions.
12 changes: 9 additions & 3 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
^.*\.Rproj$
^\.Rproj\.user$
^LICENSE\.md$
^packaging.R$
[.]Rproj$
^backlog$
^cran-comments.md$
^logo.png$
^cran-comments\.md$
^doc$
^Meta$
^Meta$
^.*\.Rproj$
^\.Rproj\.user$
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ doc
Meta
/doc/
/Meta/
inst/doc
22 changes: 11 additions & 11 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: missRanger
Title: Fast Imputation of Missing Values
Version: 2.1.4
Date: 2021-05-19
Version: 2.1.5
Date: 2022-01-29
Authors@R:
person(given = "Michael",
family = "Mayer",
Expand All @@ -22,25 +22,25 @@ Description: Alternative implementation of the beautiful 'MissForest'
to do multiple imputation when repeating the call to missRanger(). A
formula interface allows to control which variables should be imputed
by which.
License: GPL(>= 2)
URL: https://github.com/mayer79/missRanger
BugReports: https://github.com/mayer79/missRanger/issues
License: GPL (>= 2)
Depends:
R (>= 3.5.0)
VignetteBuilder:
knitr
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.1
URL: https://github.com/mayer79/missRanger
BugReports: https://github.com/mayer79/missRanger/issues
Imports:
ranger,
FNN,
stats,
utils
Suggests:
knitr,
dplyr,
mice,
rmarkdown,
dplyr,
survival,
testthat
knitr,
rmarkdown,
testthat (>= 3.0.0)
VignetteBuilder: knitr
Config/testthat/edition: 3
336 changes: 336 additions & 0 deletions LICENSE.md

Large diffs are not rendered by default.

File renamed without changes.
12 changes: 10 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
# missRanger 2.1.5

Maintenance release,

- switching to testthat 3,
- changing the package structure, and
- bringing vignettes into right order.

# missRanger 2.1.4

## Minor changes

- Now using progress bar instead of "." to show progress (when verbose = 1).

# missRanger 2.1.2 & 2.1.3
# missRanger 2.1.2 and 2.1.3

## Maintainance update
## Maintenance update

- Fixing failing unit tests.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ install.packages("missRanger")
Latest version from github:
``` r
library(devtools)
install_github("mayer79/missRanger", subdir = "release/missRanger")
install_github("mayer79/missRanger")
```

## Examples
Expand Down
45 changes: 19 additions & 26 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,25 @@
## Re-Re-Re-Resubmission
This is a maintenance release, switching to

I don't get rid of the note on LazyData. Do I simply need to remove that line in the description file?
- testthat 3,
- modifying vignette order,
- improving the way how the package is being updated/generated.

## Re-Re-Resubmission
## R CMD check results seem okay

Note from incoming pre-checks:
checking for unstated dependencies in examples ... OK
WARNING
'qpdf' is needed for checks on size reduction of PDFs

* checking LazyData ... NOTE
'LazyData' is specified without a 'data' directory

I have now set LazyData to false.
## Online check results seem okay (2 notes below)

## Re-Resubmission

This is an update of the resubmission to fix one failing unit test, see e-mail below. I overlooked additional unit tests failures on M1Mac. I don't really know what is going on. However, they all seem to be related to a smallish dataset. I have replaced it with a larger dataset and hope the problems will vanish.

## Resubmission:

Fixing a failing unit test on Solaris which needs to be fixed according to Brian's e-mail below:

"
Dear maintainer,

Please see the problems shown on
<https://cran.r-project.org/web/checks/check_results_missRanger.html>.

Please correct before 2021-04-04 to safely retain your package on CRAN.

The CRAN Team
"
- check_win_devel()
- check_rhub()

Found the following (possibly) invalid DOIs:
DOI: 10.1093/bioinformatics/btr597
From: DESCRIPTION
Status: Forbidden
Message: 403
* checking for detritus in the temp directory ... NOTE
Found the following files/directories:
'lastMiKTeXException'
File renamed without changes.
Binary file modified man/figures/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
146 changes: 66 additions & 80 deletions packaging.R
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
#=====================================================================================
# BUILD THE PACKAGE
#=====================================================================================
#=============================================================================
# Put together the package
#=============================================================================

if (FALSE) {
library(ranger)
library(FNN)
lapply(list.files("R", full.names = TRUE), source)
}
# WORKFLOW: UPDATE EXISTING PACKAGE
# 1) Modify package content and documentation.
# 2) Increase package number in "use_description" below.
# 3) Go through this script and carefully answer "no" if a "use_*" function
# asks to overwrite the existing files. Or just skip that function call.

library(usethis)
library(devtools)

# Create a new package
dir.create(file.path("release"))
pkg <- file.path("release", "missRanger")

create_package(
pkg,
# Sketch of description file
use_description(
fields = list(
Title = "Fast Imputation of Missing Values",
Type = "Package",
Version = "2.1.4",
Version = "2.1.5",
Date = Sys.Date(),
Description = "Alternative implementation of the beautiful 'MissForest' algorithm used to impute
mixed-type data sets by chaining random forests, introduced by Stekhoven, D.J. and
Expand All @@ -33,87 +28,78 @@ create_package(
repeating the call to missRanger().
A formula interface allows to control which variables should be imputed by which.",
`Authors@R` = "person('Michael', 'Mayer', email = '[email protected]', role = c('aut', 'cre', 'cph'))",
URL = "https://github.com/mayer79/missRanger",
BugReports = "https://github.com/mayer79/missRanger/issues",
Depends = "R (>= 3.5.0)",
VignetteBuilder = "knitr",
License = "GPL(>= 2)",
LazyData = NULL,
Maintainer = "Michael Mayer <[email protected]>"),
open = FALSE)
Maintainer = "Michael Mayer <[email protected]>"
),
roxygen = TRUE
)

use_gpl_license(2)
use_github_links() # use this if this project is on github

file.copy(file.path(pkg, "DESCRIPTION"), to = getwd(), overwrite = TRUE)
# Use package has no option to look for pkg, so we first copy description from pkg, modify it and move back
# Your files that do not belong to the package itself (others are added by "use_* function")
use_build_ignore(c("^packaging.R$", "[.]Rproj$", "^backlog$",
"^cran-comments.md$", "^logo.png$"), escape = FALSE)

# Required external packages
use_package("FNN", "imports")
use_package("ranger", "Imports")
use_package("stats", "Imports")
use_package("utils", "Imports")

use_package("dplyr", "Suggests")
use_package("knitr", "Suggests")
use_package("mice", "Suggests")
use_package("rmarkdown", "Suggests")
use_package("survival", "Suggests")
use_package("testthat", "Suggests")

# Set up other files -------------------------------------------------
# use_readme_md()
# use_news_md()
# use_cran_comments()
# use_testthat()

# Copy readme etc.
file.copy(c(".Rbuildignore", "NEWS.md", "README.md",
"cran-comments.md", "DESCRIPTION"),
pkg, overwrite = TRUE)

# Copy R scripts and document them
if (!dir.exists(file.path(pkg, "R"))) {
dir.create(file.path(pkg, "R"))
}
file.copy(list.files("R", full.names = TRUE), file.path(pkg, "R"), overwrite = TRUE)
devtools::document(pkg)

# Logo
# If your code uses the pipe operator %>%
# use_pipe()

# If your package contains data. Google how to document
# use_data()

# Add short docu in Markdown (without running R code)
use_readme_md()

# Longer docu in RMarkdown (with running R code). Often quite similar to readme.
use_vignette("missRanger")
use_vignette("multiple_imputation")
use_vignette("working_with_censoring")

# If you want to add unit tests
use_testthat()
# use_test("test-missRanger.R")

# On top of NEWS.md, describe changes made to the package
use_news_md()

# Add logo
use_logo("logo.png")
dir.create(file.path(pkg, "man", "figures"))
file.copy(file.path("man", "figures", "logo.png"),
file.path(pkg, "man", "figures", "logo.png"), overwrite = TRUE)

# Tests
if (!dir.exists(file.path(pkg, "tests"))) {
dir.create(file.path(pkg, "tests"))
}
file.copy("tests", pkg, recursive = TRUE)
test(pkg)

if (TRUE) {
# Copy vignette
# use_vignette(name = "missRanger", title = "missRanger")
dir.create(file.path(pkg, "vignettes"))
dir.create(file.path(pkg, "doc"))
dir.create(file.path(pkg, "Meta"))
file.copy(list.files("vignettes", full.names = TRUE),
file.path(pkg, "vignettes"), overwrite = TRUE)

devtools::build_vignettes(pkg)
}
# If package goes to CRAN: infos (check results etc.) for CRAN
use_cran_comments()

# Check
check(pkg, manual = TRUE, cran = TRUE)

# Create
# build(pkg)
#=============================================================================
# Finish package building (can use fresh session)
#=============================================================================

# Install
# install(pkg)
library(devtools)

check_win_devel(pkg)
document()
test()
build_vignettes()
check(manual = TRUE, cran = TRUE)
build()
# build(binary = TRUE)
install()

rhub::check_for_cran(pkg)
rhub::check_on_windows(pkg)
rhub::check_on_linux(pkg)
rhub::check_on_macos(pkg)
rhub::check_on_solaris(pkg)
# Run only if package is public(!) and should go to CRAN
if (FALSE) {
check_win_devel()
check_rhub()

devtools::release(pkg)
# Wait until above checks are passed without relevant notes/warnings
# then submit to CRAN
release()
}
5 changes: 0 additions & 5 deletions release/missRanger/.Rbuildignore

This file was deleted.

1 change: 0 additions & 1 deletion release/missRanger/.gitignore

This file was deleted.

46 changes: 0 additions & 46 deletions release/missRanger/DESCRIPTION

This file was deleted.

Loading

0 comments on commit e65a394

Please sign in to comment.