annofabcli 1.104.0__py3-none-any.whl → 1.104.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -55,6 +55,7 @@ def lazy_parse_simple_annotation_by_input_data(annotation_path: Path) -> Iterato
55
55
 
56
56
  @dataclass(frozen=True)
57
57
  class AnnotationAreaInfo(DataClassJsonMixin):
58
+ project_id: str
58
59
  task_id: str
59
60
  task_status: str
60
61
  task_phase: str
@@ -92,6 +93,7 @@ def get_annotation_area_info_list(parser: SimpleAnnotationParser, simple_annotat
92
93
 
93
94
  result.append(
94
95
  AnnotationAreaInfo(
96
+ project_id=simple_annotation["project_id"],
95
97
  task_id=simple_annotation["task_id"],
96
98
  task_phase=simple_annotation["task_phase"],
97
99
  task_phase_stage=simple_annotation["task_phase_stage"],
@@ -135,6 +137,7 @@ def create_df(
135
137
  annotation_area_list: list[AnnotationAreaInfo],
136
138
  ) -> pandas.DataFrame:
137
139
  columns = [
140
+ "project_id",
138
141
  "task_id",
139
142
  "task_status",
140
143
  "task_phase",
@@ -57,6 +57,7 @@ class AnnotationAttribute(pydantic.BaseModel):
57
57
  入力データまたはタスク単位の区間アノテーションの長さ情報。
58
58
  """
59
59
 
60
+ project_id: str
60
61
  task_id: str
61
62
  task_status: str
62
63
  task_phase: str
@@ -87,6 +88,7 @@ def get_annotation_attribute_list_from_annotation_json(simple_annotation: dict[s
87
88
 
88
89
  result.append(
89
90
  AnnotationAttribute(
91
+ project_id=simple_annotation["project_id"],
90
92
  task_id=simple_annotation["task_id"],
91
93
  task_status=simple_annotation["task_status"],
92
94
  task_phase=simple_annotation["task_phase"],
@@ -141,6 +143,7 @@ def print_annotation_attribute_list_as_csv(annotation_attribute_list: list, outp
141
143
  df = pandas.json_normalize(annotation_attribute_list)
142
144
 
143
145
  base_columns = [
146
+ "project_id",
144
147
  "task_id",
145
148
  "task_status",
146
149
  "task_phase",
@@ -100,6 +100,7 @@ class AnnotationCountByInputData(DataClassJsonMixin, HasAnnotationAttributeCount
100
100
  入力データ単位のアノテーション数の情報。
101
101
  """
102
102
 
103
+ project_id: str
103
104
  task_id: str
104
105
  task_status: TaskStatus
105
106
  task_phase: TaskPhase
@@ -126,6 +127,7 @@ class AnnotationCountByTask(DataClassJsonMixin, HasAnnotationAttributeCounts):
126
127
  タスク単位のアノテーション数の情報。
127
128
  """
128
129
 
130
+ project_id: str
129
131
  task_id: str
130
132
  task_status: TaskStatus
131
133
  task_phase: TaskPhase
@@ -174,6 +176,7 @@ def convert_annotation_count_list_by_input_data_to_by_task(annotation_count_list
174
176
 
175
177
  result.append(
176
178
  AnnotationCountByTask(
179
+ project_id=first_elm.project_id,
177
180
  task_id=task_id,
178
181
  task_status=first_elm.task_status,
179
182
  task_phase=first_elm.task_phase,
@@ -263,6 +266,7 @@ class ListAnnotationCounterByInputData:
263
266
  frame_no = self.frame_no_map.get((simple_annotation["task_id"], simple_annotation["input_data_id"]))
264
267
 
265
268
  return AnnotationCountByInputData(
269
+ project_id=simple_annotation["project_id"],
266
270
  task_id=simple_annotation["task_id"],
267
271
  task_phase=TaskPhase(simple_annotation["task_phase"]),
268
272
  task_phase_stage=simple_annotation["task_phase_stage"],
@@ -343,6 +347,7 @@ class AnnotationCountCsvByAttribute:
343
347
  prior_attribute_columns: Optional[list[tuple[str, str, str]]] = None,
344
348
  ) -> list[tuple[str, str, str]]:
345
349
  basic_columns = [
350
+ ("project_id", "", ""),
346
351
  ("task_id", "", ""),
347
352
  ("task_status", "", ""),
348
353
  ("task_phase", "", ""),
@@ -360,6 +365,7 @@ class AnnotationCountCsvByAttribute:
360
365
  prior_attribute_columns: Optional[list[tuple[str, str, str]]] = None,
361
366
  ) -> list[tuple[str, str, str]]:
362
367
  basic_columns = [
368
+ ("project_id", "", ""),
363
369
  ("task_id", "", ""),
364
370
  ("task_status", "", ""),
365
371
  ("task_phase", "", ""),
@@ -377,6 +383,7 @@ class AnnotationCountCsvByAttribute:
377
383
  ) -> pandas.DataFrame:
378
384
  def to_cell(c: AnnotationCountByInputData) -> dict[tuple[str, str, str], Any]:
379
385
  cell: dict[tuple[str, str, str], Any] = {
386
+ ("project_id", "", ""): c.project_id,
380
387
  ("task_id", "", ""): c.task_id,
381
388
  ("task_status", "", ""): c.task_status.value,
382
389
  ("task_phase", "", ""): c.task_phase.value,
@@ -405,6 +412,7 @@ class AnnotationCountCsvByAttribute:
405
412
  ) -> pandas.DataFrame:
406
413
  def to_cell(c: AnnotationCountByTask) -> dict[tuple[str, str, str], Any]:
407
414
  cell: dict[tuple[str, str, str], Any] = {
415
+ ("project_id", "", ""): c.project_id,
408
416
  ("task_id", "", ""): c.task_id,
409
417
  ("task_status", "", ""): c.task_status.value,
410
418
  ("task_phase", "", ""): c.task_phase.value,
@@ -115,6 +115,7 @@ class AnnotationCounter(abc.ABC):
115
115
 
116
116
  @dataclass(frozen=True)
117
117
  class AnnotationCounterByTask(AnnotationCounter, DataClassJsonMixin):
118
+ project_id: str
118
119
  task_id: str
119
120
  task_status: TaskStatus
120
121
  task_phase: TaskPhase
@@ -124,6 +125,7 @@ class AnnotationCounterByTask(AnnotationCounter, DataClassJsonMixin):
124
125
 
125
126
  @dataclass(frozen=True)
126
127
  class AnnotationCounterByInputData(AnnotationCounter, DataClassJsonMixin):
128
+ project_id: str
127
129
  task_id: str
128
130
  task_status: TaskStatus
129
131
  task_phase: TaskPhase
@@ -254,6 +256,7 @@ class ListAnnotationCounterByInputData:
254
256
  frame_no = self.frame_no_map.get((task_id, input_data_id))
255
257
 
256
258
  return AnnotationCounterByInputData(
259
+ project_id=simple_annotation["project_id"],
257
260
  task_id=simple_annotation["task_id"],
258
261
  task_phase=TaskPhase(simple_annotation["task_phase"]),
259
262
  task_phase_stage=simple_annotation["task_phase_stage"],
@@ -351,6 +354,7 @@ class ListAnnotationCounterByTask:
351
354
  raise RuntimeError(f"{task_parser.task_id} ディレクトリにはjsonファイルが1つも含まれていません。")
352
355
 
353
356
  return AnnotationCounterByTask(
357
+ project_id=last_simple_annotation["project_id"],
354
358
  task_id=last_simple_annotation["task_id"],
355
359
  task_status=TaskStatus(last_simple_annotation["task_status"]),
356
360
  task_phase=TaskPhase(last_simple_annotation["task_phase"]),
@@ -468,6 +472,7 @@ class AttributeCountCsv:
468
472
  ) -> None:
469
473
  def get_columns() -> list[AttributeValueKey]:
470
474
  basic_columns = [
475
+ ("project_id", "", ""),
471
476
  ("task_id", "", ""),
472
477
  ("task_status", "", ""),
473
478
  ("task_phase", "", ""),
@@ -480,6 +485,7 @@ class AttributeCountCsv:
480
485
 
481
486
  def to_cell(c: AnnotationCounterByTask) -> dict[AttributeValueKey, Any]:
482
487
  cell = {
488
+ ("project_id", "", ""): c.project_id,
483
489
  ("task_id", "", ""): c.task_id,
484
490
  ("task_status", "", ""): c.task_status.value,
485
491
  ("task_phase", "", ""): c.task_phase.value,
@@ -506,6 +512,7 @@ class AttributeCountCsv:
506
512
  ) -> None:
507
513
  def get_columns() -> list[AttributeValueKey]:
508
514
  basic_columns = [
515
+ ("project_id", "", ""),
509
516
  ("task_id", "", ""),
510
517
  ("task_status", "", ""),
511
518
  ("task_phase", "", ""),
@@ -520,6 +527,7 @@ class AttributeCountCsv:
520
527
 
521
528
  def to_cell(c: AnnotationCounterByInputData) -> dict[tuple[str, str, str], Any]:
522
529
  cell = {
530
+ ("project_id", "", ""): c.project_id,
523
531
  ("input_data_id", "", ""): c.input_data_id,
524
532
  ("input_data_name", "", ""): c.input_data_name,
525
533
  ("frame_no", "", ""): c.frame_no,
@@ -569,6 +577,7 @@ class LabelCountCsv:
569
577
  ) -> None:
570
578
  def get_columns() -> list[str]:
571
579
  basic_columns = [
580
+ "project_id",
572
581
  "task_id",
573
582
  "task_status",
574
583
  "task_phase",
@@ -581,6 +590,7 @@ class LabelCountCsv:
581
590
 
582
591
  def to_dict(c: AnnotationCounterByTask) -> dict[str, Any]:
583
592
  d = {
593
+ "project_id": c.project_id,
584
594
  "task_id": c.task_id,
585
595
  "task_status": c.task_status.value,
586
596
  "task_phase": c.task_phase.value,
@@ -607,6 +617,7 @@ class LabelCountCsv:
607
617
  ) -> None:
608
618
  def get_columns() -> list[str]:
609
619
  basic_columns = [
620
+ "project_id",
610
621
  "task_id",
611
622
  "task_status",
612
623
  "task_phase",
@@ -621,6 +632,7 @@ class LabelCountCsv:
621
632
 
622
633
  def to_dict(c: AnnotationCounterByInputData) -> dict[str, Any]:
623
634
  d = {
635
+ "project_id": c.project_id,
624
636
  "input_data_id": c.input_data_id,
625
637
  "input_data_name": c.input_data_name,
626
638
  "frame_no": c.frame_no,
@@ -108,6 +108,7 @@ class AnnotationDuration(DataClassJsonMixin):
108
108
  入力データまたはタスク単位の区間アノテーションの長さ情報。
109
109
  """
110
110
 
111
+ project_id: str
111
112
  task_id: str
112
113
  task_status: TaskStatus
113
114
  task_phase: TaskPhase
@@ -234,6 +235,7 @@ class ListAnnotationDurationByInputData:
234
235
  }
235
236
 
236
237
  return AnnotationDuration(
238
+ project_id=simple_annotation["project_id"],
237
239
  task_id=simple_annotation["task_id"],
238
240
  task_phase=TaskPhase(simple_annotation["task_phase"]),
239
241
  task_phase_stage=simple_annotation["task_phase_stage"],
@@ -360,6 +362,7 @@ class AnnotationDurationCsvByAttribute:
360
362
  prior_attribute_columns: Optional[list[AttributeValueKey]] = None,
361
363
  ) -> list[AttributeValueKey]:
362
364
  basic_columns = [
365
+ ("project_id", "", ""),
363
366
  ("task_id", "", ""),
364
367
  ("task_status", "", ""),
365
368
  ("task_phase", "", ""),
@@ -379,6 +382,7 @@ class AnnotationDurationCsvByAttribute:
379
382
  ) -> pandas.DataFrame:
380
383
  def to_cell(c: AnnotationDuration) -> dict[tuple[str, str, str], Any]:
381
384
  cell: dict[AttributeValueKey, Any] = {
385
+ ("project_id", "", ""): c.project_id,
382
386
  ("input_data_id", "", ""): c.input_data_id,
383
387
  ("input_data_name", "", ""): c.input_data_name,
384
388
  ("task_id", "", ""): c.task_id,
@@ -423,6 +427,7 @@ class AnnotationDurationCsvByLabel:
423
427
  prior_label_columns: Optional[list[str]] = None,
424
428
  ) -> list[str]:
425
429
  basic_columns = [
430
+ "project_id",
426
431
  "task_id",
427
432
  "task_status",
428
433
  "task_phase",
@@ -442,6 +447,7 @@ class AnnotationDurationCsvByLabel:
442
447
  ) -> pandas.DataFrame:
443
448
  def to_dict(c: AnnotationDuration) -> dict[str, Any]:
444
449
  d: dict[str, Any] = {
450
+ "project_id": c.project_id,
445
451
  "input_data_id": c.input_data_id,
446
452
  "input_data_name": c.input_data_name,
447
453
  "task_id": c.task_id,
@@ -38,7 +38,7 @@ def get_video_duration_list(task_list: list[dict[str, Any]], input_data_list: li
38
38
  result = []
39
39
  for task in task_list:
40
40
  task_id = task["task_id"]
41
- elm = {"task_id": task_id, "task_status": task["status"], "task_phase": task["phase"], "task_phase_stage": task["phase_stage"]}
41
+ elm = {"project_id": task["project_id"], "task_id": task_id, "task_status": task["status"], "task_phase": task["phase"], "task_phase_stage": task["phase_stage"]}
42
42
  input_data_id_list = task["input_data_id_list"]
43
43
  assert len(input_data_id_list) == 1, f"task_id='{task_id}'には複数の入力データが含まれています。"
44
44
  input_data_id = input_data_id_list[0]
@@ -94,6 +94,7 @@ class ListVideoDuration(CommandLine):
94
94
  logger.info(f"{len(video_duration_list)} 件のタスクの動画長さを出力します。")
95
95
  if output_format == FormatArgument.CSV:
96
96
  columns = [
97
+ "project_id",
97
98
  "task_id",
98
99
  "task_status",
99
100
  "task_phase",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: annofabcli
3
- Version: 1.104.0
3
+ Version: 1.104.1
4
4
  Summary: Utility Command Line Interface for AnnoFab
5
5
  Author: Kurusugawa Computer Inc.
6
6
  License: MIT
@@ -136,12 +136,12 @@ annofabcli/stat_visualization/write_performance_rating_csv.py,sha256=0j78z5uRULo
136
136
  annofabcli/statistics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
137
137
  annofabcli/statistics/histogram.py,sha256=CvzDxT2cKLSnBGSqkZE6p92PayGxYYja1YyB24M4ALU,3245
138
138
  annofabcli/statistics/linegraph.py,sha256=0kr7jVBNMiM2ECYhv3Ry5RitElKerSl9ZKxbKzfiplI,12494
139
- annofabcli/statistics/list_annotation_area.py,sha256=K1V1w7eNXv-6P_7v3SXqO6VQx8FF6Yjl7OL0IeWiDO4,12227
140
- annofabcli/statistics/list_annotation_attribute.py,sha256=aq3wU2edygRygd3uydhh7dPBUQlyX5zQK3H4b3RiARI,12420
141
- annofabcli/statistics/list_annotation_attribute_filled_count.py,sha256=ryDLtFIdW2G5YDqYZWU2-p7L8oGAXSE6_OknSVoZLy0,28708
142
- annofabcli/statistics/list_annotation_count.py,sha256=sYepVd6UDqy2O3jUO4f6QqSRCUzTi_HorydKJcL4g5Q,52254
143
- annofabcli/statistics/list_annotation_duration.py,sha256=ZW_sSQQdUAyv14wAIKghGzUe_g1vxusWK_P2e9oGa8s,31639
144
- annofabcli/statistics/list_video_duration.py,sha256=WGM4Onucw4Z8az8how5FvpN5u-YQaxAEnIJblKY7gl8,9099
139
+ annofabcli/statistics/list_annotation_area.py,sha256=nGqhqPEHLPUccnLCmA9nmwvmYbZYlh5ZxiHNszZ1ei8,12329
140
+ annofabcli/statistics/list_annotation_attribute.py,sha256=L_wmcUGS0Lu3tnRmidDjYK3bCNdvwDjAH64r5__MQ_w,12522
141
+ annofabcli/statistics/list_annotation_attribute_filled_count.py,sha256=g-MihJwEoA1ZnLTJOGX-dn6hI5aUdqQvh2KWbREbQ9s,29033
142
+ annofabcli/statistics/list_annotation_count.py,sha256=cBmUTYifB7UESEFets7DMDn8_GKDBBDJ2vt1q_56fcc,52747
143
+ annofabcli/statistics/list_annotation_duration.py,sha256=ps0UT50W_6ZL5_cZNsSo7Dp-cSx77m1IF4QMBkwRt98,31875
144
+ annofabcli/statistics/list_video_duration.py,sha256=OCDXPOP2z7flE8NBaQD1lDkU9JG5mn3PfACijoR-5s0,9163
145
145
  annofabcli/statistics/list_worktime.py,sha256=nr--GtFY-oyFuu8M0EsUqcVxX26gjeP09LYUcdeptyk,6456
146
146
  annofabcli/statistics/scatter.py,sha256=C3hTlm_QfGBiY4KjZ-8D_u_Rk53a9f4jszx4iNZgp9w,10945
147
147
  annofabcli/statistics/subcommand_statistics.py,sha256=Pvd7s0vvDU9tSpAphPrv94IDhhR1p8iFH2tjdt7I7ZU,2536
@@ -208,8 +208,8 @@ annofabcli/task_history_event/download_task_history_event_json.py,sha256=hQLVbQ0
208
208
  annofabcli/task_history_event/list_all_task_history_event.py,sha256=mzFqOS1WjC4_QEz6Yyp1ZvU5h-kU_PU82CtnnjQRSlY,6345
209
209
  annofabcli/task_history_event/list_worktime.py,sha256=J18uLrQwZuaatkA4dAr83Rz_qAF2xsx2gOFDp6ysimI,12968
210
210
  annofabcli/task_history_event/subcommand_task_history_event.py,sha256=mJVJoT4RXk4HWnY7-Nrsl4If-gtaIIEXd2z7eFZwM2I,1260
211
- annofabcli-1.104.0.dist-info/METADATA,sha256=QfZgIqtN2dKAfkARjsETvHWWcbG63dUGdi1p2yDAjB4,5286
212
- annofabcli-1.104.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
213
- annofabcli-1.104.0.dist-info/entry_points.txt,sha256=C2uSUc-kkLJpoK_mDL5FEMAdorLEMPfwSf8VBMYnIFM,56
214
- annofabcli-1.104.0.dist-info/licenses/LICENSE,sha256=pcqWYfxFtxBzhvKp3x9MXNM4xciGb2eFewaRhXUNHlo,1081
215
- annofabcli-1.104.0.dist-info/RECORD,,
211
+ annofabcli-1.104.1.dist-info/METADATA,sha256=sgCezmhchWq4KIhpkiYl40lgFwg0rkPEg4aip9wgPqw,5286
212
+ annofabcli-1.104.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
213
+ annofabcli-1.104.1.dist-info/entry_points.txt,sha256=C2uSUc-kkLJpoK_mDL5FEMAdorLEMPfwSf8VBMYnIFM,56
214
+ annofabcli-1.104.1.dist-info/licenses/LICENSE,sha256=pcqWYfxFtxBzhvKp3x9MXNM4xciGb2eFewaRhXUNHlo,1081
215
+ annofabcli-1.104.1.dist-info/RECORD,,