GuglielmoTor commited on
Commit
f7708fc
·
verified ·
1 Parent(s): e344c10

Update features/insight_and_tasks/data_models/tasks.py

Browse files
features/insight_and_tasks/data_models/tasks.py CHANGED
@@ -18,6 +18,10 @@ class TaskType(str, Enum):
18
  INITIATIVE = "initiative" # Action-oriented, new projects/changes
19
  TRACKING = "tracking" # Measurement-focused, monitoring existing metrics/processes
20
 
 
 
 
 
21
  class DataSubject(str, Enum):
22
  """Specifies the primary data domain a tracking task relates to."""
23
  FOLLOWER_STATS = "follower_stats"
@@ -132,6 +136,23 @@ class KeyResult(BaseModel):
132
  default=None,
133
  description="The specific target value for the metric (e.g., '5%', '1000 new followers')."
134
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
 
136
  class OKR(BaseModel):
137
  """
 
18
  INITIATIVE = "initiative" # Action-oriented, new projects/changes
19
  TRACKING = "tracking" # Measurement-focused, monitoring existing metrics/processes
20
 
21
+ class KeyResultType(str, Enum):
22
+ PERFORMANCE = "performance"
23
+ COMPLETION = "completion"
24
+
25
  class DataSubject(str, Enum):
26
  """Specifies the primary data domain a tracking task relates to."""
27
  FOLLOWER_STATS = "follower_stats"
 
136
  default=None,
137
  description="The specific target value for the metric (e.g., '5%', '1000 new followers')."
138
  )
139
+ key_result_type: KeyResultType = Field(
140
+ description=(
141
+ "Indicates the nature of the Key Result. "
142
+ "PERFORMANCE: Focused on achieving a specific, measurable level for a defined metric. "
143
+ "Its core metric can typically be extracted and monitored directly via a data source, such as the LinkedIn API "
144
+ "(e.g., monthly post count, engagement rate, follower gains, impressions, CTR, mention volume). "
145
+ "The goal is to hit or exceed a target for this metric. "
146
+ "COMPLETION: Focused on finishing a distinct project, delivering a specific output, or establishing a new process. "
147
+ "Progress is primarily tracked by the successful completion of the defined scope of work. "
148
+ "Generally, the primary outcome of a COMPLETION Key Result is not a metric continuously tracked via an automated "
149
+ "data source like the LinkedIn API, or the 'metric' itself describes the state of completion (e.g., 'report delivered', 'process established')."
150
+ )
151
+ )
152
+ data_subject: Optional[DataSubject] = Field(
153
+ default=None,
154
+ description="For 'performance' key results, specifies the primary data subject (e.g., follower_stats, posts, mentions). Can be 'general' or null for 'completion' tasks."
155
+ )
156
 
157
  class OKR(BaseModel):
158
  """