Skip to main content

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

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.

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

sketchresponse-0.0.4.tar.gz (65.9 kB view details)

Uploaded Source

Built Distribution

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

sketchresponse-0.0.4-py3-none-any.whl (76.2 kB view details)

Uploaded Python 3

File details

Details for the file sketchresponse-0.0.4.tar.gz.

File metadata

  • Download URL: sketchresponse-0.0.4.tar.gz
  • Upload date:
  • Size: 65.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sketchresponse-0.0.4.tar.gz
Algorithm Hash digest
SHA256 7636fd3d4505a853cd3ea2023a0bf75e076f69abb22dab7c21972143fbeda826
MD5 6b2bd09b156e9756cb90aaa1d25a3c3b
BLAKE2b-256 6c29a2393a32a1fe1149021f2e5f60679208e57d40f2de6aac687627ae4bc57a

See more details on using hashes here.

Provenance

The following attestation bundles were made for sketchresponse-0.0.4.tar.gz:

Publisher: publish.yml on PrairieLearn/sketchresponse

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sketchresponse-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: sketchresponse-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 76.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sketchresponse-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 83dab3a361104be07e35f5ca8922f1e49661d322a9df032438cd6aad827a3a3d
MD5 46bb3fc90fcdf154ec7d15de47f297a2
BLAKE2b-256 d6ddf58a21dfd11c9e225ebdbbbcf75e3b825fe7cf92181ae7aa772f2847bcb6

See more details on using hashes here.

Provenance

The following attestation bundles were made for sketchresponse-0.0.4-py3-none-any.whl:

Publisher: publish.yml on PrairieLearn/sketchresponse

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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