-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathtask.py
More file actions
90 lines (64 loc) · 1.8 KB
/
task.py
File metadata and controls
90 lines (64 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
from typing import Optional
from paperswithcode.models.page import Page
from paperswithcode.models.model import Model
class Area(Model):
"""Area object.
Representing an area of research.
Attributes:
id: Area ID.
name: Area name.
"""
id: str
name: str
class Areas(Page):
"""Object representing a paginated page of areas.
Attributes:
count: Number of elements matching the query.
next_page: Number of the next page.
previous_page: Number of the previous page.
results: List of areas on this page.
"""
results: list[Area]
class Task(Model):
"""Task object.
Attributes:
id: Task ID.
name: Task name.
description: Task description.
"""
id: str
name: str
description: str
class TaskCreateRequest(Model):
"""Task object.
Attributes:
name: Task name.
description: Task description.
area: Task area ID or area name.
parent_task: ID of the parent task.
"""
name: str
description: str = ""
area: Optional[str] = None
parent_task: Optional[str] = None
class TaskUpdateRequest(Model):
"""Evaluation table row object.
Attributes:
name: Task name.
description: Task description.
area: Task area ID.
parent_task: ID of the parent task.
"""
name: Optional[str] = None
description: Optional[str] = None
area: Optional[str] = None
parent_task: Optional[str] = None
class Tasks(Page):
"""Object representing a paginated page of tasks.
Attributes:
count: Number of elements matching the query.
next_page: Number of the next page.
previous_page: Number of the previous page.
results: List of tasks on this page.
"""
results: list[Task]