Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/datacamp/testwhat
Write Submission Correctness Tests for R exercises
https://github.com/datacamp/testwhat
fs le
Last synced: 27 days ago
JSON representation
Write Submission Correctness Tests for R exercises
- Host: GitHub
- URL: https://github.com/datacamp/testwhat
- Owner: datacamp
- License: agpl-3.0
- Created: 2014-12-23T20:56:07.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2022-06-22T07:55:31.000Z (over 2 years ago)
- Last Synced: 2024-08-13T07:14:17.722Z (4 months ago)
- Topics: fs, le
- Language: R
- Homepage: https://datacamp.github.io/testwhat
- Size: 4.2 MB
- Stars: 33
- Watchers: 35
- Forks: 25
- Open Issues: 44
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - datacamp/testwhat - Write Submission Correctness Tests for R exercises (R)
README
> :warning: **This repo had outdated tokens in its travisci config**
> To make new releases for this project it needs to be moved to circleci# testwhat
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fdatacamp%2Ftestwhat.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fdatacamp%2Ftestwhat?ref=badge_shield)
Verify R code submissions and auto-generate meaningful feedback messages.
Originally developed for R exercises on DataCamp for so-called Submission Correctness Tests, but can also be used independently.- If you are new to teaching on DataCamp, check out https://instructor-support.datacamp.com.
- If you want to learn what SCTs are and how they work, visit [this article](https://instructor-support.datacamp.com/courses/course-development/submission-correctness-tests) specifically.
- For a complete overview of all functionality inside `testwhat` and articles about what to use when, consult https://datacamp.github.io/testwhat.For details, questions and suggestions, [contact us](mailto:[email protected]).
## Installation
```R
library("remotes")
install_github("datacamp/testwhat")
```## Demo
Experimenting locally:
```R
library(testwhat)
setup_state(sol_code = "x <- 5",
stu_code = "x <- 4")ex() %>% check_object("x")
# No error: x is defined in both student and solution codeex() %>% check_object("x") %>% check_equal()
# Error: The contents of the variable `x` aren't correct.# Debugging state
s <- ex() %>% check_object()
s # only prints out state class
str(s) # full overview of state
s$get("student_code") # access student code in state
```To include an SCT in a DataCamp course, visit https://instructor-support.datacamp.com.
## Tests
`testwhat` currently depends on the proprietary `RBackend` and `RCompletion` packages to run tests. Tests run automatically on every branch that is updated through travis.
```R
devtools::test()
```## Documentation
Whenever a push is done to the `master` branch, this repo will automatically build a `pkgdown` website (containing reference documentation and vignettes), push it to the `gh-pages` branch, which in turn is served by GitHub at https://datacamp.github.io/testwhat.
## License
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fdatacamp%2Ftestwhat.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fdatacamp%2Ftestwhat?ref=badge_large)