diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index d8aeb54..304faa3 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -26,7 +26,7 @@ jobs: - {os: windows-latest, r: 'release'} # Use 3.6 to trigger usage of RTools35 - - {os: windows-latest, r: '3.6'} + # - {os: windows-latest, r: '3.6'} # use 4.1 to check with rtools40's older compiler - {os: windows-latest, r: '4.1'} diff --git a/.gitignore b/.gitignore index f8f4759..f1b1ffa 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,6 @@ $RECYCLE.BIN/ .DS_Store docs revdep +README_files/ +.Renviron + diff --git a/DESCRIPTION b/DESCRIPTION index 3609e45..1d6f7ed 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -8,7 +8,7 @@ Authors@R: c( License: GPL-2 Copyright: Andrie de Vries, Microsoft Corporation Title: Create a Mini Version of CRAN Containing Only Selected Packages -Description: Makes it possible to create an internally consistent +# Description: Makes it possible to create an internally consistent repository consisting of selected packages from CRAN-like repositories. The user specifies a set of desired packages, and 'miniCRAN' recursively reads the dependency tree for these packages, then downloads only this diff --git a/NEWS b/NEWS index 20f6e7e..05efae6 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +miniCRAN v0.2.16.9000 +================ + +* Support for `mac.binary.big-sur` (#152) +* Rewrite tests to use [Posit Public Package Manager](https://packagemanager.posit.co), since MRAN ceased to operate their service during 2023 + miniCRAN v0.2.16 ================ diff --git a/README.Rmd b/README.Rmd index 4f863eb..4097daf 100644 --- a/README.Rmd +++ b/README.Rmd @@ -1,5 +1,5 @@ --- -output: github_document +format: gfm --- @@ -16,12 +16,11 @@ knitr::opts_chunk$set( # miniCRAN -[![R build status](https://github.com/andrie/miniCRAN/workflows/R-CMD-check/badge.svg)](https://github.com/andrie/miniCRAN/actions) +[![CRAN status](https://www.r-pkg.org/badges/version/miniCRAN)](https://CRAN.R-project.org/package=miniCRAN) +[![R-CMD-check](https://github.com/andrie/miniCRAN/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/andrie/miniCRAN/actions/workflows/R-CMD-check.yaml) [![Code coverage](https://codecov.io/gh/andrie/miniCRAN/branch/main/graph/badge.svg)](https://codecov.io/gh/andrie/miniCRAN?branch=main) -[![CRAN version](http://www.r-pkg.org/badges/version/miniCRAN)](http://www.r-pkg.org/pkg/miniCRAN) [![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/miniCRAN)](http://www.r-pkg.org/pkg/miniCRAN) -[![CRAN status](https://www.r-pkg.org/badges/version/miniCRAN)](https://cran.r-project.org/package=miniCRAN) -[![R-CMD-check](https://github.com/andrie/miniCRAN/workflows/R-CMD-check/badge.svg)](https://github.com/andrie/miniCRAN/actions) + Create a mini version of CRAN containing only selected packages diff --git a/README.md b/README.md index 340f0e5..dfd3075 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,19 @@ + # miniCRAN -[![R build -status](https://github.com/andrie/miniCRAN/workflows/R-CMD-check/badge.svg)](https://github.com/andrie/miniCRAN/actions) +[![CRAN +status](https://www.r-pkg.org/badges/version/miniCRAN.png)](https://CRAN.R-project.org/package=miniCRAN) +[![R-CMD-check](https://github.com/andrie/miniCRAN/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/andrie/miniCRAN/actions/workflows/R-CMD-check.yaml) [![Code coverage](https://codecov.io/gh/andrie/miniCRAN/branch/main/graph/badge.svg)](https://codecov.io/gh/andrie/miniCRAN?branch=main) -[![CRAN -version](http://www.r-pkg.org/badges/version/miniCRAN)](http://www.r-pkg.org/pkg/miniCRAN) [![CRAN RStudio mirror -downloads](http://cranlogs.r-pkg.org/badges/miniCRAN)](http://www.r-pkg.org/pkg/miniCRAN) -[![CRAN -status](https://www.r-pkg.org/badges/version/miniCRAN)](https://cran.r-project.org/package=miniCRAN) -[![R-CMD-check](https://github.com/andrie/miniCRAN/workflows/R-CMD-check/badge.svg)](https://github.com/andrie/miniCRAN/actions) +downloads](http://cranlogs.r-pkg.org/badges/miniCRAN.png)](http://www.r-pkg.org/pkg/miniCRAN) + Create a mini version of CRAN containing only selected packages diff --git a/tests/testthat/test-r-version.R b/tests/testthat/test-r-version.R new file mode 100644 index 0000000..80eb555 --- /dev/null +++ b/tests/testthat/test-r-version.R @@ -0,0 +1,44 @@ + +# R.version +R.version_3.6.0 <- structure(list( + platform = "x86_64-w64-mingw32", + arch = "x86_64", + os = "mingw32", + system = "x86_64, mingw32", + status = "", + major = "3", minor = "6.0", + year = "2019", month = "04", day = "26", + `svn rev` = "76424", language = "R", + version.string = "R version 3.6.0 (2019-04-26)", + nickname = "Planting of a Tree" +), class = "simple.list") + +# getRversion() +getRversion_3.6.0 <- structure(list( + c(3L, 6L, 0L)), + class = c("R_system_version", "package_version", "numeric_version")) + +expect_3.6 <- function(object) { + expect_equal(object, "3.6") +} + +test_that("twoDigitRversion() behaves", { + expect_3.6( + twodigitRversion(list(major = 3, minor = 6)) + ) + expect_3.6( + twodigitRversion("3.6") + ) + expect_3.6( + twodigitRversion("3.6.0") + ) + expect_3.6( + twodigitRversion("3.6.1") + ) + expect_3.6( + twodigitRversion(R.version_3.6.0) + ) + expect_3.6( + twodigitRversion(getRversion_3.6.0) + ) +})