DBIS Relational Algebra Exercise Generator
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)
⚠️ 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-algebra-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)
| File | Size | Uploaded | |
|---|---|---|---|
| dbis-relational-algebra-exercise-generator-0.0.4.tar.gz | 9.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dbis_relational_algebra_exercise_generator-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.9 kB
Release files / dbis-relational-algebra-exercise-generator-0.0.4.tar.gz
| Download URL | dbis-relational-algebra-exercise-generator-0.0.4.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e1eaeca81e3bd669a7f111105ba09b6344279a9f4f21aab8f33ea2a297223000
|
|
BLAKE2b-256 checksum How to use checksums |
76c689a8ff26dfd5865cf4f5181483d7adf04046bf221230053276950b8965bc
|
| 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_algebra_exercise_generator-0.0.4-py3-none-any.whl
| Download URL | dbis_relational_algebra_exercise_generator-0.0.4-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d51e07c7a9de59042d427591106faf8687b2be34a451cd300c88c47e6a112f5d
|
|
BLAKE2b-256 checksum How to use checksums |
84060eb927f505feb1e9a5212f8eeae18b1fe83625956df89936da7c25bb3d63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|