Skip to main content

Submission correctness tests for spreadsheets

Project description

:warning: This repo has outdated tokens in its travisci config To make new releases for this project it needs to be moved to circleci

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

Project details


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.6.0.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sheetwhat-0.6.0-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

Details for the file sheetwhat-0.6.0.tar.gz.

File metadata

  • Download URL: sheetwhat-0.6.0.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for sheetwhat-0.6.0.tar.gz
Algorithm Hash digest
SHA256 bb800cd4dd0806ba9ae170d8351bd1512a46f469bceca28de6724066cbf81b73
MD5 f89122aceed853e7373bf8d29d8b956c
BLAKE2b-256 e14727d6dc3a08b1b86ac253d3cde3552ba5e204281a4fa6facd216f56fe7ff1

See more details on using hashes here.

File details

Details for the file sheetwhat-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: sheetwhat-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 28.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for sheetwhat-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35037f0b4353200cf2ec648b68390a7f522dc0a8aacc4a70767f5317bc6f9170
MD5 fb428ada79d61055adecea3ed9b048aa
BLAKE2b-256 12bc01198f0c9c94e1b8dc29965cee8566239d9231bd49cacc2a8e484ddcbbe4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page