Skip to main content

A Python module for administering and grading assignments in data structures and algorithms courses.

Project description

DALPy

DALPy is a Python module for learning data structures and algorithms. It is based off of Introduction to Algorithms by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. This library was made specifically for administering and grading assignments related to data structures and algorithms in computer science.

With this module students can receive progress reports on their problem sets in real time as they complete assignments. Additionally, student submission assessment is done with unit tests, instead of hand-tracing, ensuring that the grades that students receive accurately reflect their submissions.

The DALPy testing suite offers extremely lightweight and flexible unit testing utilities that can be used on any kind of assignment, whether to write functions or build classes. Course administration can be easily streamlined by restricting which library data structures students are allowed to use on any particular assignment.

DALPy began as a project by two Brandeis University undergraduate students to replace hand-written problem sets written in pseudocode.

Provided Data Structures

The DALPy library offers a set of fundamental data structures and algorithms, with behavior as specified by Cormen et al.'s Introduction to Algorithms. The following structures (separated by module) are supported:

Unit Testing

Along with the DALPy data structures come test utilities for writing test cases. The testing framework allows a course administrator to easily write test cases for either expected function output or general class behavior. Test cases can then be combined into a testing suite. The testing suite has the capability to set a test case run-time timeout and to record comma-separated test results for administrative use.

Consider the example test case below:

import unittest
from dalpy.factory_utils import make_stack
from dalpy.test_utils import build_and_run_watched_suite, generic_test

from student_submission import student_function

# TestCase class for testing student_function
class StudentFunctionTest(unittest.TestCase):

    # A single test case
    def simple_test_case(self):
        stack = make_stack([1, 2, 3])
        expected = make_stack([1, 1, 2, 2, 3, 3])
        generic_test(stack, expected, student_function, in_place=True)

# Run the test cases using build_and_run_watched_suite with a timeout of 4 seconds
if __name__ == '__main__':
    build_and_run_watched_suite([StudentFunctionTest], 4)

Installation

DALPy is available on PyPI, and can be installed with pip.

pip install dalpy

DALPy has the following dependencies:

Python >= 3.6

Issues

We encourage you to report issues using the GitHub tracker. We welcome all kinds of issues, especially those related to correctness, documentation and feature requests.

Academic Usage

If you are planning to use DALPy for a university course and have questions, feel free to reach out by email.

Documentation

The full documentation for DALPy is available here.

Sample Usage

To view sample assignments using DALPy browse the DALPy sample problems repository on GitHub.

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

dalpy-1.0.0.tar.gz (22.8 kB view details)

Uploaded Source

Built Distribution

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

dalpy-1.0.0-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

Details for the file dalpy-1.0.0.tar.gz.

File metadata

  • Download URL: dalpy-1.0.0.tar.gz
  • Upload date:
  • Size: 22.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for dalpy-1.0.0.tar.gz
Algorithm Hash digest
SHA256 19f5ace1388ce7210a06f0533d3f25567b5ec4b8e77409ab7999daaa5801e763
MD5 1fccb548b1b2442cf82866d81c7acf8e
BLAKE2b-256 abaff82dc028aebdbcb1a1fab9ab58d3495512e2c341a4759d49b6c67eb8b1d2

See more details on using hashes here.

File details

Details for the file dalpy-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: dalpy-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 27.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for dalpy-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9893a2926f91da625e030cf9f94a2c023de0cab8e1867a01d2c69093e16808b9
MD5 accbe3f426cedba5829ad3423a38a99c
BLAKE2b-256 91db6e06b70a6c881940737cc74e76aa3062a1d89cd17371cbc4996250580a20

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