-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b6d5ff7
commit 403f118
Showing
6 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
from domain.message import IrisMessage, IrisMessageRole | ||
from domain.course import Course | ||
from domain.exercise import ProgrammingExercise | ||
from domain.submission import ProgrammingSubmission | ||
from domain.codehint import CodeHint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
class ProgrammingExerciseSolutionEntry: | ||
def __init__(self, file_path: str, previous_line: int, line: int, previous_code: str, code: str): | ||
self.file_path = file_path | ||
self.previous_line = previous_line | ||
self.line = line | ||
self.previous_code = previous_code | ||
self.code = code | ||
|
||
|
||
class CodeHint: | ||
def __init__(self, title: str, description: str, content: str, solution_entries: [ProgrammingExerciseSolutionEntry]): | ||
self.title = title | ||
self.description = description | ||
self.content = content | ||
self.solution_entries = solution_entries |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class Course: | ||
def __init__(self, title, description): | ||
self.title = title | ||
self.description = description |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
from domain import Course, ProgrammingExercise, IrisMessage, ProgrammingSubmission, CodeHint | ||
|
||
|
||
class ProgrammingExerciseTutorChatDTO: | ||
def __init__(self, | ||
course: Course, | ||
exercise: ProgrammingExercise, | ||
submission: ProgrammingSubmission, | ||
chat_history: [IrisMessage] | ||
): | ||
self.course = course | ||
self.exercise = exercise | ||
self.submission = submission | ||
self.chat_history = chat_history | ||
|
||
|
||
class CodeEditorChatDTO: | ||
def __init__(self, | ||
problem_statement: str, | ||
solution_repository: dict[str, str], | ||
template_repository: dict[str, str], | ||
test_repository: dict[str, str], | ||
chat_history: [IrisMessage] | ||
): | ||
self.problem_statement = problem_statement | ||
self.solution_repository = solution_repository | ||
self.template_repository = template_repository | ||
self.test_repository = test_repository | ||
self.chat_history = chat_history | ||
|
||
|
||
class CodeEditorAdaptDTO: | ||
def __init__(self, | ||
problem_statement: str, | ||
solution_repository: dict[str, str], | ||
template_repository: dict[str, str], | ||
test_repository: dict[str, str], | ||
instructions: str | ||
): | ||
self.problem_statement = problem_statement | ||
self.solution_repository = solution_repository | ||
self.template_repository = template_repository | ||
self.test_repository = test_repository | ||
self.chat_history = instructions | ||
|
||
|
||
class HestiaDTO: | ||
def __init__(self, code_hint: CodeHint, exercise: ProgrammingExercise): | ||
self.code_hint = code_hint | ||
self.exercise = exercise |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class ProgrammingExercise: | ||
def __init__(self, title: str, problem_statement: str): | ||
self.title = title | ||
self.problem_statement = problem_statement |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class BuildLogEntry: | ||
def __init__(self, time: str, message: str): | ||
self.time = time | ||
self.message = message | ||
|
||
|
||
class ProgrammingSubmission: | ||
def __init__(self, commit_hash: str, build_failed: bool, build_log_entries: [BuildLogEntry]): | ||
self.commit_hash = commit_hash | ||
self.build_failed = build_failed | ||
self.build_log_entries = build_log_entries |