annofabcli 1.114.1__py3-none-any.whl → 1.114.2__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.
@@ -63,12 +63,13 @@ class UpdateMetadataOfTaskMain(CommandLineWithConfirm):
63
63
  task_index: int | None = None,
64
64
  ) -> bool:
65
65
  logging_prefix = f"{task_index + 1} 件目" if task_index is not None else ""
66
+ logging_prefix += f" task_id='{task_id}' :: "
66
67
  task = self.service.wrapper.get_task_or_none(project_id, task_id)
67
68
  if task is None:
68
- logger.warning(f"{logging_prefix} タスク '{task_id}' は存在しないのでスキップします。")
69
+ logger.warning(f"{logging_prefix}タスクは存在しないのでスキップします。")
69
70
  return False
70
71
 
71
- logger.debug(f"task_id='{task_id}', metadata='{json.dumps(task['metadata'])}'")
72
+ logger.debug(f"{logging_prefix}現在のmetadata='{json.dumps(task['metadata'])}'")
72
73
 
73
74
  if not self.confirm_processing(self.get_confirm_message(task_id, metadata)):
74
75
  return False
@@ -81,7 +82,7 @@ class UpdateMetadataOfTaskMain(CommandLineWithConfirm):
81
82
  request_body = {task_id: new_metadata}
82
83
  self.service.api.patch_tasks_metadata(project_id, request_body=request_body)
83
84
 
84
- logger.debug(f"{logging_prefix} タスク '{task_id}' のメタデータを更新しました。")
85
+ logger.debug(f"{logging_prefix}タスクのメタデータを更新しました。 :: 新しいmetadata={json.dumps(new_metadata)}")
85
86
  return True
86
87
 
87
88
  def set_metadata_to_task_wrapper(self, tpl: tuple[int, TaskMetadataInfo], project_id: str) -> bool:
@@ -214,7 +214,7 @@ def create_df_task(
214
214
  # 入力データ数を計算
215
215
  task["input_data_count"] = len(task["input_data_id_list"])
216
216
 
217
- # 動画の長さを計算(時間)
217
+ # 動画の長さを計算
218
218
  video_duration_hour = 0
219
219
  video_duration_minute = 0
220
220
  for input_data_id in task["input_data_id_list"]:
@@ -229,7 +229,7 @@ def create_df_task(
229
229
  # メタデータの値を抽出
230
230
  metadata = task["metadata"]
231
231
  for key in metadata_keys:
232
- task[f"metadata.{key}"] = metadata[key]
232
+ task[f"metadata.{key}"] = metadata.get(key)
233
233
 
234
234
  columns = ["task_id", "phase", "input_data_count", "video_duration_hour", "video_duration_minute"] + [f"metadata.{key}" for key in metadata_keys] + ["task_status_for_summary"]
235
235
  df = pandas.DataFrame(task_list, columns=columns)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: annofabcli
3
- Version: 1.114.1
3
+ Version: 1.114.2
4
4
  Summary: Utility Command Line Interface for AnnoFab
5
5
  Author: Kurusugawa Computer Inc.
6
6
  License: MIT
@@ -213,9 +213,9 @@ annofabcli/task/put_tasks.py,sha256=-v6JIXX0hGjwDWTkHLnRYr60hDHRg77Y86d-dfPymoo,
213
213
  annofabcli/task/put_tasks_by_count.py,sha256=6i7y-aH99pEDBQRWqsEQ5ESuSOL6v0SRNl3HddxLYnM,5979
214
214
  annofabcli/task/reject_tasks.py,sha256=lCpAfsU530O2TaYf8TbO4CeML7LoFgWwsCUCH6S_YC0,21924
215
215
  annofabcli/task/subcommand_task.py,sha256=vZIBXsHGc0203Q3yiSrQgNjov5MPSRyNLJ2qsFepVCA,2387
216
- annofabcli/task/update_metadata_of_task.py,sha256=Z0GF-LDt-brwgHhfz3aNYOsL4rHCf6qfzv-fzlnngOY,12817
216
+ annofabcli/task/update_metadata_of_task.py,sha256=WECoFLJ_-LWdpJ1bvzDGMh459FoLUkT8gbeLDN0JCqY,12895
217
217
  annofabcli/task_count/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
218
- annofabcli/task_count/list_by_phase.py,sha256=v3EZVCvh57BgbWILbadxT4luYcnXRGZ3Z08aBMN26Ek,23826
218
+ annofabcli/task_count/list_by_phase.py,sha256=IytZ9U1jOfPh0vPBvhHDTaY-G6nNK4YCsUTDSpL0K_8,23818
219
219
  annofabcli/task_count/subcommand_task_count.py,sha256=DDys_Qa4TxJarqSkJQB3zjQipSvGA7-WDNoN2HA-_JQ,735
220
220
  annofabcli/task_history/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
221
221
  annofabcli/task_history/download_task_history_json.py,sha256=mmQ0r0jGvQyeNahVeNXX8bUjOAYxP0vgBNA9Sf0QLu8,2424
@@ -227,8 +227,8 @@ annofabcli/task_history_event/download_task_history_event_json.py,sha256=lWyOoS2
227
227
  annofabcli/task_history_event/list_all_task_history_event.py,sha256=yNmvIEoNkfXXWPq9JZ3eAio82CrmELPSFg2M1yRHSzo,8017
228
228
  annofabcli/task_history_event/list_worktime.py,sha256=k6Hgy0pE2w5BtyUePN-LAyTbw0W2RMU4retwa6rC2uU,15497
229
229
  annofabcli/task_history_event/subcommand_task_history_event.py,sha256=dFllzpm8plnnwADwTV74h-R2LOA7rZW-xd2YnSkwTHo,1229
230
- annofabcli-1.114.1.dist-info/METADATA,sha256=YAxgPB0wyUWHZgC19UQm6HpQiTCnJkqzfVWe5uThbAU,4949
231
- annofabcli-1.114.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
232
- annofabcli-1.114.1.dist-info/entry_points.txt,sha256=C2uSUc-kkLJpoK_mDL5FEMAdorLEMPfwSf8VBMYnIFM,56
233
- annofabcli-1.114.1.dist-info/licenses/LICENSE,sha256=pcqWYfxFtxBzhvKp3x9MXNM4xciGb2eFewaRhXUNHlo,1081
234
- annofabcli-1.114.1.dist-info/RECORD,,
230
+ annofabcli-1.114.2.dist-info/METADATA,sha256=UmgP3UTctIz_pkS4QLfuxEHW1Ae0WNQBWfK3-3n5ILI,4949
231
+ annofabcli-1.114.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
232
+ annofabcli-1.114.2.dist-info/entry_points.txt,sha256=C2uSUc-kkLJpoK_mDL5FEMAdorLEMPfwSf8VBMYnIFM,56
233
+ annofabcli-1.114.2.dist-info/licenses/LICENSE,sha256=pcqWYfxFtxBzhvKp3x9MXNM4xciGb2eFewaRhXUNHlo,1081
234
+ annofabcli-1.114.2.dist-info/RECORD,,