A tool for drawing and evaluating mathematical functions
Project description
SketchResponse
Note: This is a forked copy of sketchresponse/SketchResponse adapted for PrairieLearn. This library is used as the backing for the pl-sketch element.
This project (will be) published to PyPI as sketchresponse, and on NPM as @prairielearn/sketchresponse.
Warning: The API is not fully compatible with the original SketchResponse project. Additionally, the codebase has been significantly refactored, and Python 3.10 is now the minimum supported version. The information in this README is not guaranteed to be up to date.
SketchResponse is a Javascript/Python(2.7-3.x) tool for drawing and evaluating mathematical functions. It was designed for use with the edX online courseware platform. However, it is a self-contained application that can be integrated into other web platforms.
Features
- Sketch Tool - configurable Javascript front-end with plugin components to provide different function drawing and annotation capabilities. See Sketch-Tool Usage for a description of the non-configurable interface elements of the sketch tool. See Sketch-Tool Plugin Configuration for a description of the available plugins.
- Grader Library - python back-end that provides an API of function grading methods that can be composed to construct custom grading scripts. See Create a Simple Grading Script for a tutorial on building a simple grading script.
Installation
- Clone this repository to the directory of your choice:
-
By using HTTPS:
$ git clone https://github.com/SketchResponse/sketchresponse.git
-
By using SSH:
$ git clone git@github.com:SketchResponse/sketchresponse.git
-
Sketch Tool Front-End
Prerequisites
You'll need to have Node.js and npm (which is now packaged with Node) to be installed on your system. Note: This currently only works with Node version 7.10.1
Installation
-
Change to the sketch_tool directory:
$ cd sketch_tool
-
Install dependencies listed in package.json:
$ npm ci
-
Build a local distribution of the sketch_tool:
$ npm run build
Grader Back-End
The SketchResponse grader backend has only two third party package requirements:
Install them by running the following command in the root directory:
$ pip install -r requirements.txt
Flask is only required if you want to run a local server for convenience when implementing and testing new grading scripts. See the Tutorial Test a Grading Script on a Local Server for details.
Usage Guides
Examples and Tutorials
- Grading Script Template
- Running & Building the Sketch Tool Front-end
- Testing a Grading Script on a Local Server
- Tutorial - Create a Simple Grading Script
- Tutorial - Create a Complex Grading Script
- Tutorial - Create a Physics Problem Grading Script
- Tutorial - Using Groups to Grade Plugins
- Tutorial - edX Quick Start Deployment Guide
Reference Information
Contribute
Contributions to this project are very welcome! If you'd like to contribute, please open a GitHub issue and we'll get in touch.
- Issue Tracker: github.com/SketchResponse/sketchresponse/issues
- Source Code: github.com/SketchResponse/sketchresponse/
Running tests for the Grader Library Back-end
The grader library has a collection of tests to validate the API functions. Those tests can be run from the root directory of the sketchresponse repository with the command below. If you haven't already done so, install the additional packages needed only for the unittest modules.
$ pip install -r test_requirements.txt
$ python -m unittest discover -t . test_grader_lib/
Rebuilding the documentation
As this project evolves, the current documentation will no longer match the existing codebase. Follow the instructions in HowTo Build the Docs to rebuild as needed.
Support
If you are having issues or encounter a bug, please create a GitHub issue and we'll try to help!
License
Please refer to the LICENSE file in the root of the SketchResponse repository.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sketchresponse-0.1.3.tar.gz.
File metadata
- Download URL: sketchresponse-0.1.3.tar.gz
- Upload date:
- Size: 72.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b018b7d67fbbf15b6d5fdaf91733f825c30b215cc1c386d4a0250265d225aee1
|
|
| MD5 |
21db135680e2cf2cd785c66916feb324
|
|
| BLAKE2b-256 |
9db5cdf3c98465d2dc434589fdc94684c440b1ad453efd5229f71ffa3c6c147c
|
Provenance
The following attestation bundles were made for sketchresponse-0.1.3.tar.gz:
Publisher:
publish.yml on PrairieLearn/sketchresponse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sketchresponse-0.1.3.tar.gz -
Subject digest:
b018b7d67fbbf15b6d5fdaf91733f825c30b215cc1c386d4a0250265d225aee1 - Sigstore transparency entry: 1370991487
- Sigstore integration time:
-
Permalink:
PrairieLearn/sketchresponse@0ebd33fd183d4cfdd18732c31ea98e81fb2edf53 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/PrairieLearn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0ebd33fd183d4cfdd18732c31ea98e81fb2edf53 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sketchresponse-0.1.3-py3-none-any.whl.
File metadata
- Download URL: sketchresponse-0.1.3-py3-none-any.whl
- Upload date:
- Size: 83.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfebe781dbd96d42305df4e31819618afee3cbe6e5d6d9f42965d2137bcee076
|
|
| MD5 |
0872b6d8e3e41dce0c1d4be914f787fe
|
|
| BLAKE2b-256 |
22d101d335c19d178e9b016e57e6bafb211cbbf02f1289b897515ec00962c0c3
|
Provenance
The following attestation bundles were made for sketchresponse-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on PrairieLearn/sketchresponse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sketchresponse-0.1.3-py3-none-any.whl -
Subject digest:
bfebe781dbd96d42305df4e31819618afee3cbe6e5d6d9f42965d2137bcee076 - Sigstore transparency entry: 1370991577
- Sigstore integration time:
-
Permalink:
PrairieLearn/sketchresponse@0ebd33fd183d4cfdd18732c31ea98e81fb2edf53 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/PrairieLearn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0ebd33fd183d4cfdd18732c31ea98e81fb2edf53 -
Trigger Event:
push
-
Statement type: