Skip to content

Commit 9d8bd48

Browse files
robot-ci-heartexfern-api[bot]Jo Booth
authored
feat: ROOT-194: Improve project representation in SDK and docs (#625)
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Jo Booth <jo@humansignal.com>
1 parent 282790a commit 9d8bd48

24 files changed

Lines changed: 1264 additions & 509 deletions

.mock/definition/__package__.yml

Lines changed: 227 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ types:
183183
Serializer get numbers from project queryset annotation,
184184
make sure, that you use correct one(Project.objects.with_counts())
185185
properties:
186-
allow_stream: string
186+
allow_stream: boolean
187187
annotation_limit_count:
188188
type: optional<integer>
189189
validation:
@@ -281,7 +281,7 @@ types:
281281
model_version:
282282
type: optional<string>
283283
docs: Machine learning model version
284-
num_tasks_with_annotations: string
284+
num_tasks_with_annotations: integer
285285
organization: optional<integer>
286286
overlap_cohort_percentage:
287287
type: optional<integer>
@@ -296,21 +296,21 @@ types:
296296
type: optional<datetime>
297297
docs: Pinned date and time
298298
prompts: string
299-
queue_done: string
300-
queue_left: string
299+
queue_done: integer
300+
queue_left: integer
301301
queue_total: string
302-
ready: string
303-
rejected: string
302+
ready: boolean
303+
rejected: integer
304304
require_comment_on_skip:
305305
type: optional<boolean>
306306
default: false
307307
reveal_preannotations_interactively:
308308
type: optional<boolean>
309309
docs: Reveal pre-annotations interactively
310310
review_settings: ReviewSettings
311-
review_total_tasks: string
312-
reviewed_number: string
313-
reviewer_queue_total: string
311+
review_total_tasks: integer
312+
reviewed_number: integer
313+
reviewer_queue_total: integer
314314
sampling: optional<AllRolesProjectListSampling>
315315
show_annotation_history:
316316
type: optional<boolean>
@@ -343,7 +343,7 @@ types:
343343
maxLength: 50
344344
total_annotations_number: string
345345
total_predictions_number: integer
346-
useful_annotation_number: string
346+
useful_annotation_number: optional<integer>
347347
workspace: string
348348
workspace_title: string
349349
source:
@@ -3900,20 +3900,20 @@ types:
39003900
type: integer
39013901
docs: Honeypot annotation number in project
39023902
id: integer
3903-
num_tasks_with_annotations: string
3904-
queue_done: string
3905-
queue_left: string
3903+
num_tasks_with_annotations: integer
3904+
queue_done: integer
3905+
queue_left: integer
39063906
queue_total: string
3907-
rejected: string
3908-
review_total_tasks: string
3909-
reviewed_number: string
3907+
rejected: integer
3908+
review_total_tasks: integer
3909+
reviewed_number: integer
39103910
skipped_annotations_number: string
39113911
task_number:
39123912
type: integer
39133913
docs: Total task number in project
39143914
total_annotations_number: string
39153915
total_predictions_number: integer
3916-
useful_annotation_number: string
3916+
useful_annotation_number: optional<integer>
39173917
source:
39183918
openapi: openapi/openapi.yaml
39193919
LseProjectCreateSampling:
@@ -4079,6 +4079,202 @@ types:
40794079
workspace: optional<integer>
40804080
source:
40814081
openapi: openapi/openapi.yaml
4082+
LseProjectResponseSampling:
4083+
discriminated: false
4084+
union:
4085+
- SamplingDe5Enum
4086+
- NullEnum
4087+
source:
4088+
openapi: openapi/openapi.yaml
4089+
inline: true
4090+
LseProjectResponseSkipQueue:
4091+
discriminated: false
4092+
union:
4093+
- SkipQueueEnum
4094+
- NullEnum
4095+
source:
4096+
openapi: openapi/openapi.yaml
4097+
inline: true
4098+
LseProjectResponse:
4099+
docs: >-
4100+
Serializer for project response, combining all the serializers for
4101+
different roles. Don't use it except for Spectacular/Fern definitions.
4102+
properties:
4103+
allow_stream: boolean
4104+
annotation_limit_count:
4105+
type: optional<integer>
4106+
validation:
4107+
min: 1
4108+
annotation_limit_percent:
4109+
type: optional<string>
4110+
validation:
4111+
pattern: ^-?\d{0,3}(?:\.\d{0,2})?$
4112+
annotator_evaluation_minimum_score:
4113+
type: optional<string>
4114+
default: '95.00'
4115+
validation:
4116+
pattern: ^-?\d{0,3}(?:\.\d{0,2})?$
4117+
annotator_evaluation_minimum_tasks:
4118+
type: optional<integer>
4119+
default: 10
4120+
validation:
4121+
min: 0
4122+
assignment_settings: AssignmentSettings
4123+
color:
4124+
type: optional<string>
4125+
validation:
4126+
maxLength: 16
4127+
comment_classification_config: optional<string>
4128+
config_has_control_tags:
4129+
type: boolean
4130+
docs: Flag to detect is project ready for labeling
4131+
config_suitable_for_bulk_annotation:
4132+
type: boolean
4133+
docs: Flag to detect is project ready for bulk annotation
4134+
control_weights: optional<unknown>
4135+
created_at: datetime
4136+
created_by:
4137+
type: optional<UserSimple>
4138+
docs: Project owner
4139+
custom_script: optional<string>
4140+
custom_task_lock_ttl:
4141+
type: optional<integer>
4142+
docs: TTL in seconds for task reservations, on new and existing tasks
4143+
validation:
4144+
min: 1
4145+
max: 86400
4146+
data_types: unknown
4147+
description:
4148+
type: optional<string>
4149+
docs: Project description
4150+
duplication_done:
4151+
type: optional<boolean>
4152+
default: false
4153+
duplication_status: optional<string>
4154+
enable_empty_annotation:
4155+
type: optional<boolean>
4156+
docs: Allow annotators to submit empty annotations
4157+
evaluate_predictions_automatically:
4158+
type: optional<boolean>
4159+
docs: Retrieve and display predictions when loading a task
4160+
expert_instruction:
4161+
type: optional<string>
4162+
docs: Labeling instructions in HTML format
4163+
finished_task_number:
4164+
type: integer
4165+
docs: Finished tasks
4166+
ground_truth_number:
4167+
type: integer
4168+
docs: Honeypot annotation number in project
4169+
id: integer
4170+
is_draft:
4171+
type: optional<boolean>
4172+
docs: Whether or not the project is in the middle of being created
4173+
is_published:
4174+
type: optional<boolean>
4175+
docs: Whether or not the project is published to annotators
4176+
label_config:
4177+
type: optional<string>
4178+
docs: Label config in XML format. See more about it in documentation
4179+
maximum_annotations:
4180+
type: optional<integer>
4181+
docs: >-
4182+
Maximum number of annotations for one task. If the number of
4183+
annotations per task is equal or greater to this value, the task is
4184+
completed (is_labeled=True)
4185+
validation:
4186+
min: -2147483648
4187+
max: 2147483647
4188+
members: string
4189+
members_count: integer
4190+
min_annotations_to_start_training:
4191+
type: optional<integer>
4192+
docs: >-
4193+
Minimum number of completed tasks after which model training is
4194+
started
4195+
validation:
4196+
min: -2147483648
4197+
max: 2147483647
4198+
model_version:
4199+
type: optional<string>
4200+
docs: Machine learning model version
4201+
num_tasks_with_annotations: integer
4202+
organization: optional<integer>
4203+
overlap_cohort_percentage:
4204+
type: optional<integer>
4205+
validation:
4206+
min: -2147483648
4207+
max: 2147483647
4208+
parsed_label_config: unknown
4209+
pause_on_failed_annotator_evaluation:
4210+
type: optional<boolean>
4211+
default: false
4212+
pinned_at:
4213+
type: optional<datetime>
4214+
docs: Pinned date and time
4215+
prompts: string
4216+
queue_done: integer
4217+
queue_left: integer
4218+
queue_total: integer
4219+
ready: boolean
4220+
rejected: integer
4221+
require_comment_on_skip:
4222+
type: optional<boolean>
4223+
default: false
4224+
reveal_preannotations_interactively:
4225+
type: optional<boolean>
4226+
docs: Reveal pre-annotations interactively
4227+
review_settings: ReviewSettings
4228+
review_total_tasks: integer
4229+
reviewed_number: integer
4230+
reviewer_queue_total: integer
4231+
sampling: optional<LseProjectResponseSampling>
4232+
show_annotation_history:
4233+
type: optional<boolean>
4234+
docs: Show annotation history to annotator
4235+
show_collab_predictions:
4236+
type: optional<boolean>
4237+
docs: If set, the annotator can view model predictions
4238+
show_ground_truth_first: optional<boolean>
4239+
show_instruction:
4240+
type: optional<boolean>
4241+
docs: Show instructions to the annotator before they start
4242+
show_overlap_first: optional<boolean>
4243+
show_skip_button:
4244+
type: optional<boolean>
4245+
docs: Show a skip button in interface and allow annotators to skip the task
4246+
show_unused_data_columns_to_annotators: optional<boolean>
4247+
skip_queue: optional<LseProjectResponseSkipQueue>
4248+
skipped_annotations_number: integer
4249+
start_training_on_annotation_update:
4250+
type: boolean
4251+
docs: Start model training after any annotations are submitted or updated
4252+
task_data_login:
4253+
type: optional<string>
4254+
docs: 'Task data credentials: login'
4255+
validation:
4256+
maxLength: 256
4257+
task_data_password:
4258+
type: optional<string>
4259+
docs: 'Task data credentials: password'
4260+
validation:
4261+
maxLength: 256
4262+
task_number:
4263+
type: integer
4264+
docs: Total task number in project
4265+
title:
4266+
type: optional<string>
4267+
docs: Project name. Must be between 3 and 50 characters long.
4268+
validation:
4269+
minLength: 3
4270+
maxLength: 50
4271+
total_annotations_number: integer
4272+
total_predictions_number: optional<integer>
4273+
useful_annotation_number: optional<integer>
4274+
workspace: string
4275+
workspace_title: string
4276+
source:
4277+
openapi: openapi/openapi.yaml
40824278
LseProjectUpdateSampling:
40834279
discriminated: false
40844280
union:
@@ -4722,6 +4918,13 @@ types:
47224918
project:
47234919
type: optional<integer>
47244920
docs: Project ID for this task
4921+
review_time:
4922+
type: integer
4923+
docs: >-
4924+
Calculate total review time for this task from MetricInTimeBucket
4925+
records.
4926+
4927+
Returns time in seconds.
47254928
reviewed: optional<boolean>
47264929
reviewers: list<map<string, unknown>>
47274930
reviewers_count: integer
@@ -5169,6 +5372,13 @@ types:
51695372
project:
51705373
type: optional<integer>
51715374
docs: Project ID for this task
5375+
review_time:
5376+
type: integer
5377+
docs: >-
5378+
Calculate total review time for this task from MetricInTimeBucket
5379+
records.
5380+
5381+
Returns time in seconds.
51725382
reviewed: optional<boolean>
51735383
reviewers: list<map<string, unknown>>
51745384
reviewers_count: integer

0 commit comments

Comments
 (0)