{"id":14067466,"url":"https://github.com/sckott/mutant","last_synced_at":"2025-06-14T16:35:26.018Z","repository":{"id":140973590,"uuid":"78046605","full_name":"sckott/mutant","owner":"sckott","description":"mutation testing for R","archived":false,"fork":false,"pushed_at":"2024-11-11T06:42:28.000Z","size":1108,"stargazers_count":17,"open_issues_count":7,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-11T05:16:45.060Z","etag":null,"topics":["mutation-testing","r","r-package","rstats","testing","ttd"],"latest_commit_sha":null,"homepage":"https://sckott.github.io/mutant/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sckott.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-01-04T19:34:49.000Z","updated_at":"2024-11-11T06:38:00.000Z","dependencies_parsed_at":"2025-04-17T16:01:01.239Z","dependency_job_id":null,"html_url":"https://github.com/sckott/mutant","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sckott/mutant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sckott%2Fmutant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sckott%2Fmutant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sckott%2Fmutant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sckott%2Fmutant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sckott","download_url":"https://codeload.github.com/sckott/mutant/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sckott%2Fmutant/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259846091,"owners_count":22920861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mutation-testing","r","r-package","rstats","testing","ttd"],"created_at":"2024-08-13T07:05:36.687Z","updated_at":"2025-06-14T16:35:26.006Z","avatar_url":"https://github.com/sckott.png","language":"R","readme":"mutant\n======\n\n```{r echo=FALSE}\nknitr::opts_chunk$set(\n  comment = \"#\u003e\",\n  collapse = TRUE,\n  warning = FALSE,\n  message = FALSE\n)\n```\n\n[![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.](https://www.repostatus.org/badges/latest/concept.svg)](https://www.repostatus.org/#concept)\n![R-CMD-check](https://github.com/sckott/mutant/workflows/R-CMD-check/badge.svg)\n\n`mutant` - mutation testing\n\n(wikipedia: [mutation testing](https://en.wikipedia.org/wiki/Mutation_testing) vs. [fuzzing](https://en.wikipedia.org/wiki/Fuzzing))\n\n## info\n\n- mutaters: in `mutaters.R`\n  - currently only have:\n    - boolean replacement (TRUE -\u003e FALSE, and vice versa)\n    - binary operator replacement (e.g., \u003e to \u003e=)\n\n## install\n\n```{r eval=FALSE}\nremotes::install_github(\"sckott/astr\", \"sckott/mutant\")\n```\n\n## current workflow\n\nAs of this writing (2020-05-18) ...\n\n```{r eval=FALSE}\n# path to an R package with working tests in tests/\npath \u003c- \"../randgeo/\"\n## collect fxns into an environment\nenv \u003c- collect_fxns(path)\nls.str(env)\n## make pkg map for later\npkgmap \u003c- make_pkg_map(path)\n## parse fxns with getParseData\n# fxns \u003c- parse_fxns(env)\n## mutate something\nmut_fxns \u003c- mutate(as.list(env))\n# what fxn was mutated?\nwhich(vapply(mut_fxns, function(x) attr(x, \"mutated\"), logical(1)))\n## write a new package with test suite to a tempdir\nnew_fxns \u003c- make_fxns(mut_fxns)\nnewpath \u003c- write_mutated_pkg(pkg_path = path, fxns = new_fxns, map = pkgmap)\n## run test suite \u0026 collect diagnostics\nmutout \u003c- mutation_test(newpath)\n# mutout\ndplyr::select(data.frame(mutout), file, context, test, nb, failed, skipped, error, warning, passed)\n```\n\nThis will all be internal code however - only exposing probably a few functions to users to\nrun mutation testing, do something with results, etc.\n\n## To do\n\nbrainstorming high level steps:\n\n1. map input package api\n    - optionally map what test lines are linked to what code lines ([#10](https://github.com/sckott/mutant/issues/10))\n2. generate mutants\n    - each of these are full packages, which with a different mutation\n3. put all mutants in a queue ([#2](https://github.com/sckott/mutant/issues/2))\n4. test all mutants - pull jobs from the queue until all are done\n5. collate results, write to disk\n\n## Meta\n\n* Please [report any issues or bugs](https://github.com/sckott/mutant/issues).\n* License: MIT\n* Get citation information for `mutant` in R doing `citation(package = 'mutant')`\n* Please note that this project is released with a [Contributor Code of Conduct][coc]. By participating in this project you agree to abide by its terms.\n\n[coc]: https://github.com/sckott/mutant/blob/main/CODE_OF_CONDUCT.md\n","funding_links":[],"categories":["R","Mutation testing"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsckott%2Fmutant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsckott%2Fmutant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsckott%2Fmutant/lists"}