Skip to content

Commit c72bd72

Browse files
WIP: add cell_timeout to assignment settings
1 parent a36a6e5 commit c72bd72

File tree

2 files changed

+32
-3
lines changed

2 files changed

+32
-3
lines changed

docs/source/_static/openapi/schemas.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ components:
9292
group:
9393
type: "string"
9494
example: "Chapter 1: Data Types"
95+
cell_timeout:
96+
type: "integer"
97+
example: "300"
9598
example:
9699
late_submission:
97100
- period: "P1W1D"

grader_service/api/models/assignment_settings.py

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class AssignmentSettings(Model):
1414
Do not edit the class manually.
1515
"""
1616

17-
def __init__(self, deadline=None, max_submissions=None, allowed_files=[], late_submission=None, autograde_type='auto', group=None): # noqa: E501
17+
def __init__(self, deadline=None, max_submissions=None, allowed_files=[], late_submission=None, autograde_type='auto', group=None, cell_timeout=None): # noqa: E501
1818
"""AssignmentSettings - a model defined in OpenAPI
1919
2020
:param deadline: The deadline of this AssignmentSettings. # noqa: E501
@@ -29,14 +29,17 @@ def __init__(self, deadline=None, max_submissions=None, allowed_files=[], late_s
2929
:type autograde_type: str
3030
:param group: The group of this AssignmentSettings. # noqa: E501
3131
:type group: str
32+
:param cell_timeout: The cell_timeout of this AssignmentSettings. # noqa: E501
33+
:type cell_timeout: int
3234
"""
3335
self.openapi_types = {
3436
'deadline': datetime,
3537
'max_submissions': int,
3638
'allowed_files': List[str],
3739
'late_submission': List[SubmissionPeriod],
3840
'autograde_type': str,
39-
'group': str
41+
'group': str,
42+
'cell_timeout': int
4043
}
4144

4245
self.attribute_map = {
@@ -45,7 +48,8 @@ def __init__(self, deadline=None, max_submissions=None, allowed_files=[], late_s
4548
'allowed_files': 'allowed_files',
4649
'late_submission': 'late_submission',
4750
'autograde_type': 'autograde_type',
48-
'group': 'group'
51+
'group': 'group',
52+
'cell_timeout': 'cell_timeout'
4953
}
5054

5155
self._deadline = deadline
@@ -54,6 +58,7 @@ def __init__(self, deadline=None, max_submissions=None, allowed_files=[], late_s
5458
self._late_submission = late_submission
5559
self._autograde_type = autograde_type
5660
self._group = group
61+
self._cell_timeout = cell_timeout
5762

5863
@classmethod
5964
def from_dict(cls, dikt) -> 'AssignmentSettings':
@@ -197,3 +202,24 @@ def group(self, group: str):
197202
"""
198203

199204
self._group = group
205+
206+
@property
207+
def cell_timeout(self) -> int:
208+
"""Gets the cell_timeout of this AssignmentSettings.
209+
210+
211+
:return: The cell_timeout of this AssignmentSettings.
212+
:rtype: int
213+
"""
214+
return self._cell_timeout
215+
216+
@cell_timeout.setter
217+
def cell_timeout(self, cell_timeout: int):
218+
"""Sets the cell_timeout of this AssignmentSettings.
219+
220+
221+
:param cell_timeout: The cell_timeout of this AssignmentSettings.
222+
:type cell_timeout: int
223+
"""
224+
225+
self._cell_timeout = cell_timeout

0 commit comments

Comments
 (0)