From 1e7cd8a877a850eaf6a5c25a911cc9dce0dfc578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Castro=20Insua?= Date: Wed, 4 Sep 2024 09:53:05 +0200 Subject: [PATCH] Remove Dockerfile --- .Rbuildignore | 4 --- .travis.yml | 26 --------------- Docker/Dockerfile | 6 ---- Docker/Dockerfile-build | 6 ---- README.Rmd | 58 -------------------------------- README.md | 59 --------------------------------- build/build-image.sh | 3 -- build/build-package.sh | 17 ---------- build/source-all.R | 3 -- build/test-internal-functions.R | 7 ---- 10 files changed, 189 deletions(-) delete mode 100644 .travis.yml delete mode 100644 Docker/Dockerfile delete mode 100644 Docker/Dockerfile-build delete mode 100644 build/build-image.sh delete mode 100644 build/build-package.sh delete mode 100644 build/source-all.R delete mode 100644 build/test-internal-functions.R diff --git a/.Rbuildignore b/.Rbuildignore index 4e70d8b..9e5b13e 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,13 +1,9 @@ ^.*\.Rproj$ ^\.Rproj\.user$ init.R -paleobioDB-Ex.R .gitignore .git -^\.travis\.yml$ NEWS.md -build -Docker .*\.tar\.gz$ ^README\.Rmd$ ^\.github$ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d362115..0000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: r -sudo: false -cache: packages - -r_github_packages: - - r-lib/covr - -# The script phase is overridden in order to run the tests outside the 'CRAN check'. This is motivated by the majority -# of the tests depending on performing actual calls to the PaleobioDB API. -# Tests of functions not exposed, which requires sourcing the files -script: - - | - R CMD build . - R CMD check paleobioDB*tar.gz --as-cran --no-tests - R CMD INSTALL paleobioDB*tar.gz - Rscript -e 'library(testthat); library(paleobioDB); test_dir("tests/testthat", stop_on_failure = TRUE)' - if [ $? -ne 0 ]; then exit 1; fi - cd build && Rscript test-internal-functions.R - -after_success: - - Rscript -e 'covr::codecov(token = "9b1bd09b-9035-4144-8529-8fec93ceff7f")' - -notifications: - email: - on_success: change - on_failure: change diff --git a/Docker/Dockerfile b/Docker/Dockerfile deleted file mode 100644 index 5d62902..0000000 --- a/Docker/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM rocker/tidyverse:4 - -RUN apt-get update && \ - apt-get install -y libgdal-dev - -RUN Rscript -e 'install.packages(c("curl", "rjson", "maps", "gtools", "terra"))' diff --git a/Docker/Dockerfile-build b/Docker/Dockerfile-build deleted file mode 100644 index 2a51273..0000000 --- a/Docker/Dockerfile-build +++ /dev/null @@ -1,6 +0,0 @@ -FROM rocker/r-devel - -RUN apt-get update && \ - apt-get install -y libgdal-dev pandoc tidy - -RUN Rscript -e 'install.packages(c("curl", "rjson", "maps", "gtools", "terra", "curl", "roxygen2", "testthat"))' diff --git a/README.Rmd b/README.Rmd index 0840752..564a8b8 100644 --- a/README.Rmd +++ b/README.Rmd @@ -219,64 +219,6 @@ the fossil records. pbdb_temporal_resolution(canidae) ``` -## Docker - -We include a Dockerfile to ease working on the package as it fulfills -all its system dependencies. - -How to load the package with Docker: - -1. Install Docker. Reference here: https://docs.docker.com/get-started/ - -2. Build the docker image. From the root folder of this - repository, type: - -```bash -docker build -t rpbdb Docker -``` - -This command will create a docker image in your system based on some -of the [rocker/tidyverse](https://hub.docker.com/r/rocker/tidyverse/) -images. You can see the new image with `docker image ls`. - -3. Start a container for this image. Type the following command - picking some `` of your choice. - -```bash -docker run -d --name="rpbdb_rstudio" --rm -p 8787:8787 \ - -e PASSWORD= -v $PWD:/home/rstudio rpbdb -``` - -This will start a container with access to your current folder where -all the code of the package is. Inside the container, the code will -be located in `/home/rstudio`. It also exposes the port 8787 of the -container so you may access the RStudio web application which is -bundled in the Rocker base image. - -4. Then, you can either: - - - Navigate to `http://localhost:8787`. Enter with username - "rstudio" and the password you used in the command above. - - - Or you can enter the container via console with: - - ```bash - docker exec -ti -u rstudio -w /home/rstudio rpbdb_rstudio R - ``` - -Either from RStudio or from within the container you can install the -package from source with: - -```r -install.packages(".", repos = NULL, type = "source") -``` - -5. When you are finished, you can stop the container: - -```bash -docker container stop rpbdb_rstudio -``` - ## Meta Please report any [issues or bugs](https://github.com/ropensci/paleobioDB/issues). diff --git a/README.md b/README.md index eaac461..8456ca3 100644 --- a/README.md +++ b/README.md @@ -341,65 +341,6 @@ pbdb_temporal_resolution(canidae) #> [1381] 0.1173 2.5683 2.5683 2.5683 2.5683 0.0117 0.0117 1.0260 0.6450 0.0117 #> [1391] 0.0117 0.7623 0.6450 0.6450 0.6450 -## Docker - -We include a Dockerfile to ease working on the package as it fulfills -all its system dependencies. - -How to load the package with Docker: - -1. Install Docker. Reference here: - - -2. Build the docker image. From the root folder of this repository, - type: - -``` bash -docker build -t rpbdb Docker -``` - -This command will create a docker image in your system based on some of -the [rocker/tidyverse](https://hub.docker.com/r/rocker/tidyverse/) -images. You can see the new image with `docker image ls`. - -3. Start a container for this image. Type the following command picking - some `` of your choice. - -``` bash -docker run -d --name="rpbdb_rstudio" --rm -p 8787:8787 \ - -e PASSWORD= -v $PWD:/home/rstudio rpbdb -``` - -This will start a container with access to your current folder where all -the code of the package is. Inside the container, the code will be -located in `/home/rstudio`. It also exposes the port 8787 of the -container so you may access the RStudio web application which is bundled -in the Rocker base image. - -4. Then, you can either: - - - Navigate to `http://localhost:8787`. Enter with username - “rstudio” and the password you used in the command above. - - - Or you can enter the container via console with: - - ``` bash - docker exec -ti -u rstudio -w /home/rstudio rpbdb_rstudio R - ``` - -Either from RStudio or from within the container you can install the -package from source with: - -``` r -install.packages(".", repos = NULL, type = "source") -``` - -5. When you are finished, you can stop the container: - -``` bash -docker container stop rpbdb_rstudio -``` - ## Meta Please report any [issues or diff --git a/build/build-image.sh b/build/build-image.sh deleted file mode 100644 index 915d6b6..0000000 --- a/build/build-image.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -docker build -f Docker/Dockerfile -t rpbdb . diff --git a/build/build-package.sh b/build/build-package.sh deleted file mode 100644 index 9ccf883..0000000 --- a/build/build-package.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -# Use this script to build and check "as CRAN" the R package - -# Usage: -# From the root folder of this repo: `./build/build-package.sh` - -# Prerequisites: docker - -echo 'Building docker image for r-devel, including the R dependencies' -docker build -f Docker/Dockerfile-build -t rpbdb-build . - -echo "Building R package" -docker run --rm -ti -w /paleo -v $PWD:/paleo rpbdb-build R CMD build . - -echo "Check as CRAN" -docker run --rm -ti -w /paleo -v $PWD:/paleo rpbdb-build R CMD check paleobioDB*tar.gz --as-cran diff --git a/build/source-all.R b/build/source-all.R deleted file mode 100644 index bd3ace5..0000000 --- a/build/source-all.R +++ /dev/null @@ -1,3 +0,0 @@ -setwd('../R') -source('rest_api_tools.R') -lapply(dir(), source) diff --git a/build/test-internal-functions.R b/build/test-internal-functions.R deleted file mode 100644 index 1f7400a..0000000 --- a/build/test-internal-functions.R +++ /dev/null @@ -1,7 +0,0 @@ -source('source-all.R') - -library(rjson) -library(gtools) -library(testthat) - -test_dir('../tests/testthat/internal/', stop_on_failure = TRUE)