Skip to content

Commit

Permalink
remove Matrix dependency since Matrix will no longer support necessar…
Browse files Browse the repository at this point in the history
…y functions
  • Loading branch information
FlorianSchwendinger committed Aug 12, 2022
1 parent f4a6f15 commit 6cb6cac
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 7 deletions.
7 changes: 5 additions & 2 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.git*
.gitignore
.Rhistory
README.html
^README.html
^Makefile
src/build_makevars.R
src/Makevars_unix
src/Makevars.win_win
Expand All @@ -21,7 +22,9 @@ src/scs/.travis.yml
src/scs/linsys/gpu
src/scs/linsys/indirect
inst/tools/*
Work

tests/testthat/test_sparse_utils.R
tests/testthat/test_problems.R

# Remove the citation file to pass checks. It is also in inst/CITATION
src/scs/CITATION.cff
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: scs
Version: 3.0-0
Version: 3.0-1
Title: Splitting Conic Solver
Authors@R: c( person("Florian", "Schwendinger", role = c("ctb", "cre"), email = "[email protected]"),
person("Brendan", "O'Donoghue", role = c("aut", "cph")),
Expand All @@ -14,10 +14,9 @@ Description: Solves convex cone programs via operator splitting. Can solve:
Depends: R (>= 3.5.0)
SystemRequirements: GNU Make
Suggests:
Matrix,
slam,
testthat
Encoding: UTF-8
License: GPL-3
URL: https://github.com/FlorianSchwendinger/scs
RoxygenNote: 7.1.2
RoxygenNote: 7.2.0
35 changes: 35 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

docs:
R -e 'library("roxygen2"); roxygenize(".", c("rd", "namespace"), load_source)'

build:
R CMD build .

inst: build
R CMD INSTALL scs*.tar.gz

check: build
R CMD check scs*.tar.gz

cran_check: build
R CMD check --as-cran scs*.tar.gz

manual: clean
R CMD Rd2pdf --output=Manual.pdf .

clean:
rm -f Manual.pdf README.knit.md README.html
rm -rf .Rd2pdf*

check_mac_m1: build
R -e "rhub::check(dir(pattern = 'scs_.*.tar.gz'), platform = 'macos-m1-bigsur-release')"

check_mac_old: build
R -e "rhub::check(dir(pattern = 'scs_.*.tar.gz'), platform = 'macos-highsierra-release-cran')"

check_gcc_san: build
R -e "rhub::check(dir(pattern = 'scs_.*.tar.gz'), platform = 'linux-x86_64-rocker-gcc-san')"

check_debian_clang: build
R -e "rhub::check(dir(pattern = 'scs_.*.tar.gz'), platform = 'debian-clang-devel')"

1 change: 0 additions & 1 deletion tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
library(testthat)
library(scs)
library(slam)
library(Matrix)
test_check("scs")
2 changes: 1 addition & 1 deletion tests/testthat/test_problems.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ info_vars_to_check <- c(
sol_vars_to_check <- c("x", "y", "s")

for (fname in rds_files) {
d <- readRDS(file.path("problem_results", fname))
d <- readRDS(file.path("problem_results", fname))
test_that(sprintf("Checking results for %s", fname), {
sol <- scs(A = d$data$A, P = d$data$P, b = d$data$b, obj = d$data$obj, cone = d$cone, control = d$settings)
if (fname == "random_prob.RDS") { ## Need lenient tolerance
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test_sparse_utils.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## Some tests for utils
# Removed this test from the build via .Rbuildignore since Matrix pkg will change.

s <- Matrix::sparseMatrix(i = c(2,4,3:5), j= c(4,7:5,5), x = 1:5, dims = c(7,7), symmetric = TRUE)

Expand Down

0 comments on commit 6cb6cac

Please sign in to comment.