Skip to content

Commit

Permalink
Merge branch 'main' into fix-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
luca-dex committed Nov 7, 2023
2 parents 845617a + d974675 commit 6e3e979
Show file tree
Hide file tree
Showing 36 changed files with 3,328 additions and 934 deletions.
8 changes: 8 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
^.travis.yml$
^.git/.*$
^\.github$
^.vscode$
^src/*\.o$
^src/*\.so$
^src/RcppExports.cpp$
^_pkgdown\.yml$
^docs$
^pkgdown$
Expand All @@ -16,3 +20,7 @@
^.*\.Rproj$
^\.Rproj\.user$
^\./RACES/\.git$
^RACES$
^_install$
^_builds$
^Makefile$
7 changes: 6 additions & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
# - {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
Expand Down Expand Up @@ -47,3 +47,8 @@ jobs:
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true

- uses: actions/upload-artifact@v3
with:
name: my-artifact
path: ./
2 changes: 1 addition & 1 deletion .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
run: pkgdown::build_site_github_pages(new_process = FALSE, install = TRUE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ _builds
_install
*.so
*.o
*.Rd
*.log
*.lock
RACES
35 changes: 18 additions & 17 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
Package: rRACES
Type: Package
Title: rRACES: An R wrapper for RACES
Title: rRACES: An R Wrapper for RACES
Version: 0.0.1
Date: 2023-10-25
Authors@R:
c(person(given = "Giulio",
family = "Caravagna",
role = c("aut", "cre"),
email = "[email protected]"),
person(given = "Alberto",
family = "Casagrande",
role = "aut"))
Description: This is a wrapper for RACES. This package supports
spacial evolution of different clones, different epigenetic
clone states, timed-triggered driver mutations.
Authors@R: c(
person("Giulio", "Caravagna", email = "[email protected]", role = c("aut", "cre")),
person("Alberto", "Casagrande", role = "aut"))
Maintainer: Giulio Caravagna <[email protected]>
Description: A wrapper for RACES. This package supports
spacial evolution of different clones, different
epigenetic clone states, timed-triggered driver
mutations.
License: GPL-3 + file LICENSE
LinkingTo: Rcpp
Encoding: UTF-8
SystemRequirements: C++17
SystemRequirements: C++17, GNU make
Imports:
methods,
magrittr,
dplyr,
Rcpp (>= 1.0.11),
ggplot2,
cli,
crayon
crayon,
RColorBrewer,
knitr,
rlang
RoxygenNote: 7.2.3
Suggests:
knitr,
rmarkdown
VignetteBuilder: knitr
Depends:
methods,
R (>= 2.10)
LazyData: true
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# prepare the package for release
PKGNAME := $(shell sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGVERS := $(shell sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION)
PKGSRC := $(shell basename `pwd`)

.PHONY: all docs build build-cran install check travis clean

docs:
R --vanilla --silent -e 'Rcpp::compileAttributes()'
R --vanilla --silent -e 'roxygen2::roxygenise(roclets=c("rd"))'

build:
(cd .. && R CMD build --no-manual $(PKGSRC))

build-cran:
(cd ..; && R CMD build $(PKGSRC))

install: build
(cd .. && R CMD INSTALL $(PKGNAME)_$(PKGVERS).tar.gz)

check: build-cran
(cd .. && R CMD check $(PKGNAME)_$(PKGVERS).tar.gz --as-cran)

travis: build
(cd ..; && R CMD check $(PKGNAME)_$(PKGVERS).tar.gz --no-manual)

clean:
rm -rf _install _builds RACES
rm src/RcppExports.cpp src/*.o src/*.so R/RcppExports.R
rm -rf man/*.Rd
(cd .. && rm -rf $(PKGNAME).Rcheck)
9 changes: 5 additions & 4 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
useDynLib(rRACES, .registration=TRUE)
importFrom("dplyr", "pull", "row_number", "%>%", "mutate", "rename", "filter", "case_when")
importFrom("stats", "time")
importFrom("rlang", ".data")
import(methods, Rcpp)

S3method(print,rraces)
export(Simulation)
export(set_initial_cell)
export(create_simulation)
export(plot_state)
export(add_species)
export(plot_tissue)
export(plot_firings)
112 changes: 0 additions & 112 deletions R/add_species.R

This file was deleted.

58 changes: 0 additions & 58 deletions R/create_simulation.R

This file was deleted.

25 changes: 13 additions & 12 deletions R/ggplot_config.R
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
my_theme = function(){
my_theme <- function() {
ggplot2::theme_linedraw(base_size = 10) +
ggplot2::theme(
legend.position = 'bottom'
legend.position = "bottom"
)
}

get_species_colors = function(x){
nm = sort(x)

nmc = RColorBrewer::brewer.pal(x %>% length(), "Set1")

if(length(nm) < length(nmc))
nmc = nmc[1:length(nm)]

names(nmc) = nm

get_species_colors <- function(x) {
nm <- sort(x)

nmc <- RColorBrewer::brewer.pal(x %>% length(), "Set1")

if (length(nm) < length(nmc)) {
nmc <- nmc[1:length(nm)]
}

names(nmc) <- nm

return(nmc)
}
1 change: 1 addition & 0 deletions R/globals.R
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
utils::globalVariables()
Loading

0 comments on commit 6e3e979

Please sign in to comment.