-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added the RGF R-package * removed empty dir * added submodule * unsubmodule * moved files in appropriate folder * fixed DESCRIPTION FILE * Revert "fixed DESCRIPTION FILE" This reverts commit 561e9e7. * I updated the DESCRIPTION file * I updated the R package files as suggested * I updated the R package files as suggested * I updated the R package suggested * I updated the R package as suggested * I updated the R package as suggested * I updated the R package as suggested * I updated the R package as suggested * I updated the R package as suggested * I updated the R package as suggested * I updated the R package as suggested * I updated the R package as suggested * added R-package test at Travis * fixed R test at Travis * fixed conflicts in library versions * updated the DESCRIPTION and NEWS files * updated the R-package files * updated the R-package files * fixed arxiv.org certificate error * replaced problem link to r-pkg.org with link to package official page at cran * fixed MinGW-w64 certificates problem * update the R-package files
- Loading branch information
1 parent
60e0b6b
commit 303a787
Showing
24 changed files
with
3,235 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
mkdir -p $R_LIB_PATH | ||
cd $TRAVIS_BUILD_DIR/R-package | ||
echo "R_LIBS=$R_LIB_PATH" > .Renviron | ||
echo 'options(repos = "https://cran.rstudio.com")' > .Rprofile | ||
|
||
export PATH="$R_LIB_PATH/R/bin:$PATH" | ||
|
||
sudo apt-get install gfortran-5 | ||
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-5 10 | ||
# use system-wide libraries (fix error "symbol _ZTINSt8ios_base7failureB5cxx11E, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference") | ||
conda remove --force libgfortran-ng libgcc-ng libstdcxx-ng | ||
|
||
# install packages to build and check documentation | ||
conda install --no-deps pandoc | ||
sudo apt-get install texlive-latex-recommended texlive-fonts-recommended texlive-fonts-extra qpdf | ||
|
||
# fix "libcurl error code 60: server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none" | ||
echo -n | openssl s_client -connect arxiv.org:443 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-certificates.crt | ||
|
||
if ! command -v R &> /dev/null; then | ||
R_VER=3.5.1 | ||
cd $TRAVIS_BUILD_DIR | ||
wget https://cran.r-project.org/src/base/R-3/R-$R_VER.tar.gz | ||
tar -xzf R-$R_VER.tar.gz | ||
R-$R_VER/configure --enable-R-shlib --prefix=$R_LIB_PATH/R | ||
make | ||
make install | ||
cd $TRAVIS_BUILD_DIR/R-package | ||
fi | ||
|
||
Rscript -e 'if(!"devtools" %in% rownames(installed.packages())) { install.packages("devtools", dependencies = TRUE) }' | ||
Rscript -e 'if(!"roxygen2" %in% rownames(installed.packages())) { install.packages("roxygen2", dependencies = TRUE) }' | ||
Rscript -e 'if(!"testthat" %in% rownames(installed.packages())) { install.packages("testthat", dependencies = TRUE) }' | ||
Rscript -e 'if(!"knitr" %in% rownames(installed.packages())) { install.packages("knitr", dependencies = TRUE) }' | ||
Rscript -e 'if(!"covr" %in% rownames(installed.packages())) { install.packages("covr", dependencies = TRUE) }' | ||
Rscript -e 'if(!"rmarkdown" %in% rownames(installed.packages())) { install.packages("rmarkdown", dependencies = TRUE) }' | ||
Rscript -e 'if(!"reticulate" %in% rownames(installed.packages())) { install.packages("reticulate", dependencies = TRUE) }' | ||
Rscript -e 'if(!"R6" %in% rownames(installed.packages())) { install.packages("R6", dependencies = TRUE) }' | ||
Rscript -e 'if(!"Matrix" %in% rownames(installed.packages())) { install.packages("Matrix", dependencies = TRUE) }' | ||
|
||
Rscript -e 'update.packages(ask = FALSE, instlib = Sys.getenv("R_LIB_PATH"))' | ||
|
||
Rscript -e 'devtools::install_deps(pkg = ".", dependencies = TRUE)' | ||
|
||
R CMD build . || exit -1 | ||
|
||
PKG_FILE_NAME=$(ls -1t *.tar.gz | head -n 1) | ||
PKG_NAME="${PKG_FILE_NAME%%_*}" | ||
LOG_FILE_NAME="$PKG_NAME.Rcheck/00check.log" | ||
|
||
R CMD check "${PKG_FILE_NAME}" --as-cran || exit -1 | ||
if grep -q -R "WARNING" "$LOG_FILE_NAME"; then | ||
echo "WARNINGS have been found in the build log!" | ||
exit -1 | ||
#elif grep -q -R "NOTE" "$LOG_FILE_NAME"; then | ||
# echo "NOTES have been found in the build log!" | ||
# exit -1 | ||
fi | ||
|
||
Rscript -e 'covr::codecov(quiet = FALSE)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
^\.R\.travis\.sh$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.Rproj.user | ||
.Rhistory | ||
.RData | ||
.Ruserdata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Package: RGF | ||
Type: Package | ||
Title: Regularized Greedy Forest | ||
Version: 1.0.5 | ||
Date: 2018-08-15 | ||
Authors@R: c( person("Lampros", "Mouselimis", email = "mouselimislampros@gmail.com", role = c("aut", "cre")), person("Ryosuke", "Fukatani", role = "cph", comment = "Author of the python wrapper of the 'Regularized Greedy Forest' machine learning algorithm"), person("Nikita", "Titov", role = "cph", comment = "Author of the python wrapper of the 'Regularized Greedy Forest' machine learning algorithm"), person("Tong", "Zhang", role = "cph", comment = "Author of the 'Regularized Greedy Forest' and of the Multi-core implementation of Regularized Greedy Forest machine learning algorithm"), person("Rie", "Johnson", role = "cph", comment = "Author of the 'Regularized Greedy Forest' machine learning algorithm") ) | ||
Maintainer: Lampros Mouselimis <mouselimislampros@gmail.com> | ||
BugReports: https://github.com/RGF-team/rgf/issues | ||
URL: https://github.com/RGF-team/rgf/tree/master/R-package | ||
Description: Regularized Greedy Forest wrapper of the 'Regularized Greedy Forest' <https://github.com/RGF-team/rgf/tree/master/python-package> 'python' package, which also includes a Multi-core implementation (FastRGF) <https://github.com/RGF-team/rgf/tree/master/FastRGF>. | ||
License: MIT + file LICENSE | ||
SystemRequirements: Python (2.7 or >= 3.4), rgf_python, scikit-learn (>= 0.18.0), scipy, numpy. Detailed installation instructions for each operating system can be found in the README file. | ||
Depends: | ||
R(>= 3.2.3) | ||
Imports: | ||
reticulate, R6, Matrix | ||
Suggests: | ||
testthat, | ||
covr, | ||
knitr, | ||
rmarkdown | ||
Encoding: UTF-8 | ||
LazyData: true | ||
RoxygenNote: 6.0.1 | ||
VignetteBuilder: knitr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
YEAR: 2018 | ||
COPYRIGHT HOLDER: Mouselimis Lampros <mouselimislampros@gmail.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
# Regularized Greedy Forest (RGF) | ||
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
|
||
See file COPYING: https://github.com/RGF-team/rgf/blob/master/RGF/COPYING | ||
|
||
|
||
|
||
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
# Fast Regularized Greedy Forest (FastRGF) | ||
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
|
||
See file LICENSE: https://github.com/RGF-team/rgf/blob/master/FastRGF/LICENSE | ||
|
||
|
||
|
||
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
# Python wrapper of RGF and FastRGF | ||
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
|
||
See file LICENSE: https://github.com/RGF-team/rgf/blob/master/python-package/LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export(RGF_cleanup_temp_files) | ||
export(mat_2scipy_sparse) | ||
export(TO_scipy_sparse) | ||
export(RGF_Regressor) | ||
export(RGF_Classifier) | ||
export(FastRGF_Regressor) | ||
export(FastRGF_Classifier) | ||
import(reticulate) | ||
importFrom(R6,R6Class) | ||
importFrom(Matrix,Matrix) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
## RGF 1.0.5 | ||
|
||
The RGF R package was integrated in the home repository for the Regularized Greedy Forest (RGF) library (https://github.com/RGF-team). | ||
|
||
|
||
## RGF 1.0.4 | ||
|
||
* We modified the license from GPL-3 to MIT to go in accordance with the new structure of the *rgf_python* package. The package includes two files : *LICENSE* (for the RGF R package) and *LICENSE.note* (for the *RGF*, *FastRGF* and *rgf_python* packages). | ||
* We added the following new features of RGF estimators : *feature_importances_* and *dump_model()* | ||
* We modified the README.md file and especially the installation instructions for all operating systems (Linux, Mac OS X, Windows) | ||
* We created an R6 class (*Internal_class*) for all secondary functions which are used in RGF and FastRGF | ||
|
||
|
||
## RGF 1.0.3 | ||
|
||
* The *dgCMatrix_2scipy_sparse* function was renamed to *TO_scipy_sparse* and now accepts either a *dgCMatrix* or a *dgRMatrix* as input. The appropriate format for the RGF package in case of sparse matrices is the *dgCMatrix* format (*scipy.sparse.csc_matrix*) | ||
* We added an onload.R file to inform the users about the previous change | ||
* Due to the previous changes we modified the Vignette and the tests too | ||
|
||
|
||
## RGF 1.0.2 | ||
|
||
We commented the example(s) and test(s) related to the *dgCMatrix_2scipy_sparse* function [ *if (Sys.info()["sysname"] != 'Darwin')* ], because the *scipy-sparse* library on CRAN is not upgraded and the older version includes a bug (*TypeError : could not interpret data type*). This leads to an error on *Mac OS X* ( *reference* : https://github.com/scipy/scipy/issues/5353 ). | ||
|
||
|
||
## RGF 1.0.1 | ||
|
||
We added links to the GitHub repository (master repository, issues). | ||
|
||
|
||
## RGF 1.0.0 | ||
|
||
Initial version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#------------------------- | ||
# Load the python-modules | ||
#------------------------- | ||
|
||
|
||
RGF_mod <- NULL; RGF_utils <- NULL; SCP <- NULL; | ||
|
||
|
||
.onLoad <- function(libname, pkgname) { | ||
|
||
if (reticulate::py_available(initialize = TRUE)) { | ||
|
||
if (reticulate::py_module_available("rgf.sklearn")) { | ||
|
||
RGF_mod <<- reticulate::import("rgf.sklearn", delay_load = TRUE) | ||
} | ||
|
||
if (reticulate::py_module_available("rgf.utils")) { | ||
|
||
RGF_utils <<- reticulate::import("rgf.utils", delay_load = TRUE) | ||
} | ||
|
||
if (reticulate::py_module_available("scipy")) { | ||
|
||
SCP <<- reticulate::import("scipy", delay_load = TRUE, convert = FALSE) | ||
} | ||
} | ||
} |
Oops, something went wrong.