Submission correctness tests for spreadsheets
Project description
sheetwhat
sheetwhat
enables you to write Submission Correctness Tests (SCTs) for interactive Spreadsheet exercises on DataCamp.
- 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 specifically.
- For a complete overview of all functionality inside
sheetwhat
and articles about what to use when, consult https://sheetwhat.readthedocs.io.
Installing
pip install sheetwhat
Demo
Sheetwhat is typically used in a web application, but you can also experiment with its functions on your local machine.
SCT functions that fail will throw a TestFail
error.
# Setup: make all checking functions available
from sheetwhat.sct_syntax import SCT_CTX
globals().update(SCT_CTX)
# Setup: set up state with student data, solution data and SCT range
from sheetwhat.State import State
from protowhat.Reporter import Reporter
Ex.root_state = State(
{'values': [["a", "a"]], "formulas": [["=B1"]]},
{'values': [["b", "b"]], "formulas": [["=B1"]]},
"A1",
Reporter()
)
# Experiment interactively with SCTs
# Passes, as formulas at A1 match
Ex().has_equal_formula()
# Fails, as values at A1 do not match
Ex().has_equal_value()
Testing
pip install -r requirements.txt
pip install -e .
pytest
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sheetwhat-0.5.3.tar.gz
(23.7 kB
view details)
File details
Details for the file sheetwhat-0.5.3.tar.gz
.
File metadata
- Download URL: sheetwhat-0.5.3.tar.gz
- Upload date:
- Size: 23.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1645f5c11395dbda2a2b15214a6ff46c56365f7a738e47dc876aa2dbbf446bbe |
|
MD5 | 4964c62c770596788e5109d370fa896c |
|
BLAKE2b-256 | c935ca9105713d3eadecfb005c88925c81e844c583509a60854aa47735231f5a |