All Projects → sckott → mutant

sckott / mutant

Licence: other
mutation testing for R

Programming Languages

r
7636 projects
Makefile
30231 projects

Projects that are alternatives of or similar to mutant

schtools
Schloss Lab Tools for Reproducible Microbiome Research 💩
Stars: ✭ 22 (+69.23%)
Mutual labels:  rstats, r-package
rsnps
Wrapper to a number of SNP web APIs
Stars: ✭ 44 (+238.46%)
Mutual labels:  rstats, r-package
rinat
A programmatic interface to iNaturalist
Stars: ✭ 36 (+176.92%)
Mutual labels:  rstats, r-package
pbapply
Adding progress bar to '*apply' functions in R
Stars: ✭ 115 (+784.62%)
Mutual labels:  rstats, r-package
miner
R package for controlling Minecraft via API
Stars: ✭ 74 (+469.23%)
Mutual labels:  rstats, r-package
rfishbase
R interface to the fishbase.org database
Stars: ✭ 79 (+507.69%)
Mutual labels:  rstats, r-package
WikidataQueryServiceR
An R package for the Wikidata Query Service API
Stars: ✭ 23 (+76.92%)
Mutual labels:  rstats, r-package
riem
✈️ ☀️ R package for accessing ASOS data via the Iowa Environment Mesonet ☁️ ✈️
Stars: ✭ 38 (+192.31%)
Mutual labels:  rstats, r-package
rdryad
R client for Dryad web services
Stars: ✭ 25 (+92.31%)
Mutual labels:  rstats, r-package
paleobioDB
R interface to the Paleobiology Database
Stars: ✭ 36 (+176.92%)
Mutual labels:  rstats, r-package
cyphr
Humane encryption
Stars: ✭ 91 (+600%)
Mutual labels:  rstats, r-package
dotwhisker
Dot-and-Whisker Plots of Regression Results
Stars: ✭ 51 (+292.31%)
Mutual labels:  rstats, r-package
antiword
R wrapper for antiword utility
Stars: ✭ 47 (+261.54%)
Mutual labels:  rstats, r-package
getCRUCLdata
CRU CL v. 2.0 Climatology Client for R
Stars: ✭ 17 (+30.77%)
Mutual labels:  rstats, r-package
tiler
Generate geographic and non-geographic map tiles from R
Stars: ✭ 56 (+330.77%)
Mutual labels:  rstats, r-package
rglobi
R library to access species interaction data of http://globalbioticinteractions.org
Stars: ✭ 12 (-7.69%)
Mutual labels:  rstats, r-package
pkgreviewr
R package to facilitate rOpenSci package reviews.
Stars: ✭ 35 (+169.23%)
Mutual labels:  rstats, r-package
individual
R Package for individual based epidemiological models
Stars: ✭ 20 (+53.85%)
Mutual labels:  rstats, r-package
NLMR
📦 R package to simulate neutral landscape models 🏔
Stars: ✭ 57 (+338.46%)
Mutual labels:  rstats, r-package
rredlist
IUCN Red List API Client
Stars: ✭ 31 (+138.46%)
Mutual labels:  rstats, r-package

mutant

Project Status: Concept – Minimal or no implementation has been done yet, or the repository is only intended to be a limited example, demo, or proof-of-concept. R-CMD-check

mutant - mutation testing

(wikipedia: mutation testing vs. fuzzing)

info

  • mutaters: in mutaters.R
    • currently only have:
      • boolean replacement (TRUE -> FALSE, and vice versa)
      • binary operator replacement (e.g., > to >=)

install

remotes::install_github("sckott/astr", "sckott/mutant")

current workflow

As of this writing (2020-05-18) ...

# path to an R package with working tests in tests/
path <- "../randgeo/" 
## collect fxns into an environment
env <- collect_fxns(path)
ls.str(env)
## make pkg map for later
pkgmap <- make_pkg_map(path)
## parse fxns with getParseData
# fxns <- parse_fxns(env)
## mutate something
mut_fxns <- mutate(as.list(env))
# what fxn was mutated?
which(vapply(mut_fxns, function(x) attr(x, "mutated"), logical(1)))
## write a new package with test suite to a tempdir
new_fxns <- make_fxns(mut_fxns)
newpath <- write_mutated_pkg(pkg_path = path, fxns = new_fxns, map = pkgmap)
## run test suite & collect diagnostics
mutout <- mutation_test(newpath)
# mutout
dplyr::select(data.frame(mutout), file, context, test, nb, failed, skipped, error, warning, passed)

This will all be internal code however - only exposing probably a few functions to users to run mutation testing, do something with results, etc.

To do

brainstorming high level steps:

  1. map input package api
    • optionally map what test lines are linked to what code lines (#10)
  2. generate mutants
    • each of these are full packages, which with a different mutation
  3. put all mutants in a queue (#2)
  4. test all mutants - pull jobs from the queue until all are done
  5. collate results, write to disk

Meta

  • Please report any issues or bugs.
  • License: MIT
  • Get citation information for mutant in R doing citation(package = 'mutant')
  • Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].