Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Verify Spreadsheets and auto-generate meaningful feedback messages.

License

Notifications You must be signed in to change notification settings

datacamp/sheetwhat

Repository files navigation

sheetwhat

PyPI version FOSSA Status

sheetwhat enables you to write Submission Correctness Tests (SCTs) for interactive Spreadsheet exercises on DataCamp.

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

FOSSA Status

About

Verify Spreadsheets and auto-generate meaningful feedback messages.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 7

AltStyle によって変換されたページ (->オリジナル) /