Skip to content

Commit

Permalink
Merge branch 'main' into 283_dispatch_error
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennebacher committed Sep 8, 2022
2 parents 8c2aaa5 + f70f38e commit 71f165c
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@ on:
branches: [main, master]
pull_request:
branches: [main, master]
# run every day
# `*` is a special character in YAML so you have to quote this string
schedule:
- cron: '0 0 * * *'

name: render-readme
name: check-readme

jobs:
render-readme:
check-readme:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -38,20 +34,14 @@ jobs:
any::easystats
any::sessioninfo
any::deepdep
any::miniCRAN
any::ggraph
any::graphlayouts
any::cranlogs
any::lubridate
any::ggplot2
any::zoo
any::igraph
any::viridis
- name: Render README
run: Rscript -e 'rmarkdown::render("README.Rmd")'

- name: Commit Results
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git add man/figures/*.png README.md
git commit -m 'Re-build README.Rmd' || echo "No changes to commit"
git push origin || echo "No changes to commit"
13 changes: 13 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: lint

jobs:
lint:
uses: easystats/workflows/.github/workflows/lint.yaml@main
2 changes: 1 addition & 1 deletion .github/workflows/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ name: pkgdown

jobs:
pkgdown:
uses: easystats/workflows/.github/workflows/pkgdown.yaml@main
uses: easystats/workflows/.github/workflows/pkgdown.yaml@main
54 changes: 7 additions & 47 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ knitr::opts_chunk$set(
collapse = TRUE,
warning = FALSE,
message = FALSE,
out.width = "100%",
fig.path = "man/figures/",
fig.width = 0.7 * 16.18034,
fig.height = 0.7 * 10
Expand Down Expand Up @@ -154,54 +155,10 @@ following presentations and talks to learn more about this ecosystem:
*easystats* packages are designed to be lightweight, *i.e.*, they don't have any third-party hard dependencies, other than base-R packages or other *easystats* packages!
If you develop R packages, this means that you can safely use *easystats* packages as dependencies in your own packages, without the risk of entering the [dependency hell](https://en.wikipedia.org/wiki/Dependency_hell).

```{r depnetwork, echo=FALSE}
easystats_pkgs <- available.packages(repos = "https://easystats.r-universe.dev")
pkgsnms <- rownames(easystats_pkgs)
library("miniCRAN")
dg <- makeDepGraph(easystats_pkgs[, "Package"],
availPkgs = easystats_pkgs,
depends = TRUE, suggests = FALSE, enhances = FALSE,
includeBasePkgs = FALSE
)
# plot(dg, main = NULL, legendPosition = c(-1, 1), vertex.size = 15, cex = 0.8)
```{r depnetwork}
library(deepdep)
x <- dg
class(x) <- "igraph"
ndeps <- lapply(easystats_pkgs[, "Package"], pkgDep,
availPkgs = easystats_pkgs,
depends = TRUE, suggests = FALSE, enhances = FALSE,
includeBasePkgs = FALSE
)
ndeps <- sapply(ndeps, length)
pnames <- igraph::V(x)$name
cols <- viridis::inferno(4, begin = 0.3, end = 0.8)
pcols <- setNames(character(length = length(pnames)), pnames)
pcols[] <- "red"
pcols[ndeps <= 7] <- cols[4]
pcols[ndeps <= 4] <- cols[3]
pcols[ndeps == 2] <- cols[2]
pcols[ndeps == 1] <- cols[1]
pcols[!pnames %in% easystats_pkgs[, "Package"]] <- "white"
set.seed(123)
par(mai = rep(0, 4))
igraph::plot.igraph(x,
vertex.size = 15,
edge.arrow.size = 0.5,
edge.color = "grey",
vertex.label.cex = 0.8,
vertex.label.color = "black",
vertex.color = pcols,
vertex.shape = "circle",
vertex.label.font = 2,
xlim = c(-1.5, 1)
)
plot_dependencies("easystats", depth = 2, show_stamp = FALSE)
```

As we can see, the only exception is the [`{see}`](https://easystats.github.io/see/) package, which is responsible for plotting and creating
Expand All @@ -219,6 +176,9 @@ library(datawizard)
library(lubridate)
library(ggplot2)
easystats_pkgs <- available.packages(repos = "https://easystats.r-universe.dev")
pkgsnms <- rownames(easystats_pkgs)
# Packages data
downloads <- lapply(pkgsnms, function(x) {
cranlogs::cran_downloads(x, from = "2019-02-26")
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,13 @@ you can safely use *easystats* packages as dependencies in your own
packages, without the risk of entering the [dependency
hell](https://en.wikipedia.org/wiki/Dependency_hell).

![](man/figures/depnetwork-1.png)<!-- -->
``` r
library(deepdep)

plot_dependencies("easystats", depth = 2, show_stamp = FALSE)
```

<img src="man/figures/depnetwork-1.png" width="100%" />

As we can see, the only exception is the
[`{see}`](https://easystats.github.io/see/) package, which is
Expand All @@ -190,11 +196,11 @@ which does have a substantial number of dependencies.

| Total | insight | bayestestR | parameters | performance | datawizard | effectsize | correlation | see | modelbased | report | easystats |
|:----------|:----------|:-----------|:-----------|:------------|:-----------|:-----------|:------------|:--------|:-----------|:-------|:----------|
| 9,770,858 | 3,017,177 | 1,353,162 | 1,340,375 | 1,261,898 | 1,101,374 | 1,041,737 | 271,497 | 245,024 | 91,943 | 45,932 | 739 |
| 9,841,368 | 3,038,611 | 1,359,029 | 1,347,324 | 1,268,715 | 1,119,349 | 1,047,257 | 273,531 | 246,733 | 92,631 | 46,961 | 1,227 |

### Trend

<img src="man/figures/unnamed-chunk-7-1.png" style="display: block; margin: auto;" />
<img src="man/figures/unnamed-chunk-7-1.png" width="100%" style="display: block; margin: auto;" />

<!-- ### Average monthly downloads -->

Expand Down
Binary file modified man/figures/depnetwork-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/unnamed-chunk-7-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 71f165c

Please sign in to comment.