Skip to content

Commit

Permalink
Tests mostly ready
Browse files Browse the repository at this point in the history
  • Loading branch information
derek-corcoran-barrios committed Dec 6, 2022
1 parent c3cc5c8 commit c96a839
Show file tree
Hide file tree
Showing 41 changed files with 21,614 additions and 44 deletions.
Binary file modified .RData
Binary file not shown.
46 changes: 23 additions & 23 deletions .Rhistory
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
#Simular una base de datos como la que tiene Pame
m <- matrix(rbinom(100, size = 1, prob = 0.3), ncol = 10, byrow = T) %>% as.data.frame() %>% tibble::rowid_to_column()
## Transformar en red
Mat <- network::as.network(as.matrix(m[,-1]))
Mat
Adjacency <- as.matrix.network.adjacency(Mat)
Adjacency
library(network)
library(igraph)
library(tidyverse)
set.seed(2020)
#Simular una base de datos como la que tiene Pame
m <- matrix(rbinom(100, size = 1, prob = 0.3), ncol = 10, byrow = T) %>%
as.data.frame() %>%
tibble::rowid_to_column()
View(m)
library(network)
library(tidyverse)
set.seed(2020)
#Simular una base de datos como la que tiene Pame
m <- matrix(rbinom(100, size = 1, prob = 0.3), ncol = 10, byrow = T) %>%
as.data.frame() %>%
tibble::rowid_to_column()
## Transformar en red
Mat <- network::as.network(as.matrix(m[,-1]))
Adjacency <- as.matrix.network.adjacency(Mat)
Expand Down Expand Up @@ -510,3 +487,26 @@ library(NetworkExtinction)
install.packages("pkgdown")
install.packages("ragg")
install.packages("ragg")
library(NetworkExtinction)
library(NetworkExtinction)
install.packages("cranlogs")
?cranlogs::cran_downloads()
NetExt <- cran_downloads(packages = "NetworkExtinction",from = "2014-06-30", to = "2022-11-22")
library(cranlogs)
NetExt <- cran_downloads(packages = "NetworkExtinction",from = "2014-06-30", to = "2022-11-22")
NetExt
NetExt$count
NetExt$count %>% hist
NetExt$count |> hist
NetExt$count |> hist()
NetExt$count |> sum()
sum(NetExt$count)
NetExt <- cran_downloads(packages = "NetworkExtinction", when = "last-month")
sum(NetExt$count)
View(NetExt)
NetExt <- cran_downloads(packages = "NetworkExtinction",from = "2014-06-30", to = "2022-11-22")
list.files(path = "data/")
citation("splines")
covr::code_coverage()
covr::package_coverage()
covr::package_coverage()
1 change: 1 addition & 0 deletions .Rproj.user/shared/notebooks/paths
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/home/au687614/Documents/NetworkExtinction/R/Extintions.R="5517A387"
/home/au687614/Documents/NetworkExtinction/README.Rmd="BEC06318"
50 changes: 50 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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: test-coverage

jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
needs: coverage

- name: Test coverage
run: |
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
)
shell: Rscript {0}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
6 changes: 4 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ Imports: broom, doParallel, dplyr, foreach, ggplot2, igraph, magrittr, network,
License: GPL (>= 2)
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.1
RoxygenNote: 7.2.2
Suggests:
knitr,
rmarkdown,
pkgdown
pkgdown,
testthat (>= 3.0.0)
VignetteBuilder: knitr
Config/testthat/edition: 3
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ importFrom(igraph,as.undirected)
importFrom(igraph,cluster_edge_betweenness)
importFrom(igraph,cluster_infomap)
importFrom(igraph,cluster_label_prop)
importFrom(igraph,cluster_spinglass)
importFrom(igraph,graph_from_adjacency_matrix)
importFrom(igraph,modularity)
importFrom(magrittr,"%>%")
Expand Down
Loading

0 comments on commit c96a839

Please sign in to comment.