Skip to content

Commit

Permalink
Merge pull request #1107 from yuvipanda/new-r
Browse files Browse the repository at this point in the history
Bump default R version to 4.1
  • Loading branch information
manics authored Jan 8, 2022
2 parents 457f718 + e2aefcf commit 4352535
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion repo2docker/buildpacks/r.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def r_version(self):
"4.1": "4.1.2-1.1804.0",
}
# the default if nothing is specified
r_version = "3.6"
r_version = "4.1"

if not hasattr(self, "_r_version"):
parts = self.runtime.split("-")
Expand Down
5 changes: 5 additions & 0 deletions tests/r/simple/verify
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
#!/usr/bin/env Rscript
library('ggplot2')

# Fail if version is not 4.1
if (!(version$major == "4" && as.double(version$minor) >= 1 && as.double(version$minor) < 2)) {
quit("yes", 1)
}
2 changes: 1 addition & 1 deletion tests/unit/test_r.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_unsupported_version(tmpdir):


@pytest.mark.parametrize(
"runtime_version, expected", [("", "3.6"), ("3.6", "3.6"), ("3.5.1", "3.5")]
"runtime_version, expected", [("", "4.1"), ("3.6", "3.6"), ("3.5.1", "3.5")]
)
def test_version_specification(tmpdir, runtime_version, expected):
tmpdir.chdir()
Expand Down

0 comments on commit 4352535

Please sign in to comment.