Skip to content

Commit

Permalink
⚡✨ init repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Ciencia de Datos • GECI committed Dec 5, 2024
1 parent 4761daf commit 9b8f5a3
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 27 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Removed

[unreleased]: https://github.com/IslasGECI/templater/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/IslasGECI/templater/releases/tag/v0.1.0
[unreleased]: https://github.com/IslasGECI/geci.diversity/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/IslasGECI/geci.diversity/releases/tag/v0.1.0
12 changes: 7 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
Package: templater
Title: Template for R projects
Package: geci.diversity
Title: Biological diversity R package
Authors@R: c(
person(given = "Ciencia de Datos",
family = "GECI",
role = c("aut", "cre", "cph"),
email = "[email protected]"
))
Config/testthat/edition: 3
Description: Plantilla de Ciencia de Datos en GECI para proyectos en R
Description: Índices de diversidad
Encoding: UTF-8
Imports:
R6,
tidyverse
tidyverse,
reshape2,
vegan
LazyData: true
License: AGPL-3.0-or-later
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
RoxygenNote: 7.3.2
Suggests:
devtools,
roxygen2,
Expand Down
10 changes: 9 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
FROM islasgeci/base:1.0.0
FROM rocker/tidyverse:4
COPY . /workdir

RUN apt update && apt full-upgrade --yes && apt install --yes \
texlive-full

RUN Rscript -e "install.packages(c('covr', 'DT', 'lintr', 'styler'), repos='http://cran.rstudio.com')"
RUN Rscript -e "install.packages(c('rshape2', 'vegan'), repos='http://cran.rstudio.com')"

WORKDIR /workdir/
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ setup: clean install
install:
R -e "devtools::document()" && \
R CMD build . && \
R CMD check templater_0.1.0.tar.gz && \
R CMD INSTALL templater_0.1.0.tar.gz
R CMD check geci.diversity_0.1.0.tar.gz && \
R CMD INSTALL geci.diversity_0.1.0.tar.gz

tests:
Rscript -e "devtools::test(stop_on_failure = TRUE)"
19 changes: 7 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
<a href="https://www.islas.org.mx"><img src="https://www.islas.org.mx/img/logo.svg" align="right" width="256" /></a>

# Template for R projects
[![codecov](https://codecov.io/gh/IslasGECI/templater/graph/badge.svg?token=wyxnwZypMA)](https://codecov.io/gh/IslasGECI/templater)
# Biological diversity R package
[![codecov](https://codecov.io/gh/IslasGECI/geci_diversity/graph/badge.svg?token=wyxnwZypMA)](https://codecov.io/gh/IslasGECI/geci_diversity)
![example branch
parameter](https://github.com/IslasGECI/templater/actions/workflows/actions.yml/badge.svg)
![licencia](https://img.shields.io/github/license/IslasGECI/templater)
![languages](https://img.shields.io/github/languages/top/IslasGECI/templater)
![commits](https://img.shields.io/github/commit-activity/y/IslasGECI/templater)
![R-version](https://img.shields.io/github/r-package/v/IslasGECI/templater)
parameter](https://github.com/IslasGECI/geci_diversity/actions/workflows/actions.yml/badge.svg)
![licencia](https://img.shields.io/github/license/IslasGECI/geci_diversity)
![languages](https://img.shields.io/github/languages/top/IslasGECI/geci_diversity)
![commits](https://img.shields.io/github/commit-activity/y/IslasGECI/geci_diversity)
![R-version](https://img.shields.io/github/r-package/v/IslasGECI/geci_diversity)

## Step to use
- Rename links in `README`.
- Rename image name in `docker-compose.yml`.
- Rename package name in `DESCRIPTION`.
- Rename image names in `actions.yml`.
- Rename package name on install recipe in `Makefile`.
- Rename package name in `teststhat.R`, `coverage.R` and `test_nothing.R`
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
version: "3.1"
services:
islasgeci:
build:
context: .
dockerfile: Dockerfile
image: islasgeci/templater:latest
image: islasgeci/geci_diversity:latest
command: bash
volumes:
- $PWD:/workdir
4 changes: 2 additions & 2 deletions tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
library(testthat)
library(templater)
test_check("templater")
library(geci.diversity)
test_check("geci.diversity")
2 changes: 1 addition & 1 deletion tests/testthat/test_nothing.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe("Test all is ready", {
describe("Get version of the module", {
it("The version is 0.1.0", {
expected_version <- c("0.1.0")
obtained_version <- packageVersion("templater")
obtained_version <- packageVersion("geci.diversity")
version_are_equal <- expected_version == obtained_version
expect_true(version_are_equal)
})
Expand Down

0 comments on commit 9b8f5a3

Please sign in to comment.