Skip to main content

RWTH Aachen Computer Science i5/dbis assets for Lecture Datenbanken und Informationssysteme

Project description

DBIS Relational Algebra Exercise Generator

pypi PyPI Status

This library generates relational algebra exercises based on the dbis-relational-algebra library.

Installation

Install via pip:

pip install dbis-relational-algebra-exercise-generator

Most notably, following required packages are also installed:

Usage

from ra_exercise_generator import generate_exercise

from relational_algebra import *
solution_algebra_expression = Projection("R", ("R.a", "R.c"))

from excmanager.Task import Exercise, Task, SubTask
exercise1 = Exercise(1)
task1 = Task(exercise1, "1.1")
subtask1 = SubTask(task1, "a", points=2)
# task description
description = "Select the attributes a and c from the relation R."

generated_cells = generate_exercise(
	subtask1,
	description,
	solution_algebra_expression,
	correct_attributes_score_perc=0.1
)

# generated_cells is a dictionary of cells, which can be used to generate a Jupyter Notebook
# format:
# filename (str) -> cell content (str)

:warning: Guidelines

In order to directly use the generated cells in an exercise Jupyter notebook, one should follow the following guidelines:

  • tasks should be named task1, task2, ...
  • The SQLite Connection has to be made beforehand. This connection should be stored in the variable sql_con.

View the templates and this test for more information on what cells are generated and how one can incorporate them into an exercise Jupyter notebook.

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

File details

Details for the file dbis-relational-algebra-exercise-generator-0.0.4.tar.gz.

File metadata

File hashes

Hashes for dbis-relational-algebra-exercise-generator-0.0.4.tar.gz
Algorithm Hash digest
SHA256 e1eaeca81e3bd669a7f111105ba09b6344279a9f4f21aab8f33ea2a297223000
MD5 f69535b80246a7417971b37b49fc6aa5
BLAKE2b-256 76c689a8ff26dfd5865cf4f5181483d7adf04046bf221230053276950b8965bc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dbis_relational_algebra_exercise_generator-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d51e07c7a9de59042d427591106faf8687b2be34a451cd300c88c47e6a112f5d
MD5 33ac4f4b0cfd9eb8460a4bb954d1620d
BLAKE2b-256 84060eb927f505feb1e9a5212f8eeae18b1fe83625956df89936da7c25bb3d63

See more details on using hashes here.

Supported by

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