Skip to main content

DBIS Relational Calculus Exercise Generator

pypi PyPI Status

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

Installation

Install via pip:

pip install dbis-relational-calculus-exercise-generator

Most notably, following required packages are also installed:

Usage

from rc_exercise_generator import generate_exercise

# set the solution, either SQLite query (string), or TupleCalculus / DomainCalculus object
solution_sql_query = "SELECT a, c FROM R;"

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_sql_query,
	correct_attributes_score_perc=0.1,
	calculus_type="tuple" # the student should submit a TupleCalculus solution
)

# 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.

Metadata

Release files for dbis-relational-calculus-exercise-generator 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dbis-relational-calculus-exercise-generator 0.0.4
File Size Uploaded
dbis-relational-calculus-exercise-generator-0.0.4.tar.gz 8.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dbis-relational-calculus-exercise-generator 0.0.4
File Interpreter ABI Platform
dbis_relational_calculus_exercise_generator-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 18.7 kB

Release files / dbis-relational-calculus-exercise-generator-0.0.4.tar.gz

Download URL dbis-relational-calculus-exercise-generator-0.0.4.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7988eb13a257b445b13b02cbade19682bdbef6afdb9efc89119f0f0db899b310
BLAKE2b-256 checksum
How to use checksums
81a99fcf4b4bceb1c7fef71755f49186c48e05007b8aa4f24c6ad9bb383bddee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Release files / dbis_relational_calculus_exercise_generator-0.0.4-py3-none-any.whl

Download URL dbis_relational_calculus_exercise_generator-0.0.4-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
07d0852c79fa6882ca1f31a211900e4c7485ab1327b886230c3836d234f22695
BLAKE2b-256 checksum
How to use checksums
0c9f34426100ffa9076c2acd6aef090febe981f109e231a32610549e945a0814
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page