def test_change_operator(self): # user指定 main([ self.command_name, "change_operator", "--project_id", project_id, "--task_id", task_id, "--user_id", self.user_id, "--yes", ]) # 未割り当て main([ self.command_name, "change_operator", "--project_id", project_id, "--task_id", task_id, "--not_assign", "--yes", ])
def test_delete_and_restore_annotation(self): backup_dir = str(out_dir / "backup-annotation") main([ "annotation", "delete", "--project_id", project_id, "--task_id", task_id, "--backup", backup_dir, "--yes", ]) main([ "annotation", "restore", "--project_id", project_id, "--task_id", task_id, "--annotation", backup_dir, "--yes", ])
def test_wait(self): main([ "job", "wait", "--project_id", project_id, "--job_type", "gen-annotation", ])
def test_list_task_creation_history(self): main([ "job", "list_task_creation_history", "--project_id", project_id, "--output", str(out_dir / "list_task_creation_history-out.csv"), ])
def test_list_history(self): main([ "instruction", "list_history", "--project_id", project_id, "--output", str(out_dir / "list_history-out.csv"), ])
def test_list_added_task_history_with_downloading(self): out_file = str(out_dir / "task.csv") main([ self.command_name, "list_added_task_history", "--project_id", project_id, "--output", out_file, ])
def test_download(self): main([ "instruction", "download", "--project_id", project_id, "--output_dir", str(out_dir / "download-out"), "--download_image", ])
def test_list_input_data_merged_task_with_json(self): out_file = str(out_dir / "task.csv") main([ self.command_name, "list_added_task_history", "--project_id", project_id, "--output", out_file, ])
def test_list(self): main([ "annotation", "list", "--project_id", project_id, "--task_id", task_id, "--output", str(out_dir / "annotation_count.csv"), ])
def test_delete(self): main([ "job", "delete", "--project_id", project_id, "--job_type", "gen-annotation", "--job_id", "not_exists_job_id", ])
def test_update_metadata(self): main([ self.command_name, "update_metadata", "--project_id", project_id, "--metadata", '{"attr1":"foo"}', "--task_id", task_id, ])
def test_reject_task(self): main([ self.command_name, "reject", "--project_id", project_id, "--task_id", task_id, "--comment", "テストコメント", "--yes", ])
def test_list_inspection_comment_with_json(self): main( [ "inspection_comment", "list_with_json", "--project_id", project_id, "--exclude_reply", "--output", str(out_dir / "list_with_json-out.csv"), ] )
def test_list_input_data_merged_task(self): out_file = str(out_dir / "input_data.csv") main( [ "input_data", "list_merged_task", "--project_id", project_id, "--output", out_file, ] )
def test_list_last_job(self): main([ "job", "list_last", "--project_id", project_id, "--job_type", "gen-annotation", "--format", "csv", "--output", str(out_dir / "list_last-out.csv"), ])
def test_list_inspection_comment(self): main( [ "inspection_comment", "list", "--project_id", project_id, "--task_id", task_id, "--output", str(out_dir / "list-out.csv"), ] )
def test_dashboad(self): out_file = str(out_dir / "dashboard.csv") main([ self.command_name, "dashboard", "--project_id", project_id, "--date", "2020-07-01", "--output", str(out_file), "--yes", ])
def test_dump_annotation(self): output_dir = str(out_dir / "dump-annotation") main([ "annotation", "dump", "--project_id", project_id, "--task_id", task_id, "--output", output_dir, "--yes", ])
def test_list_count(self): main([ "annotation", "list_count", "--project_id", project_id, "--annotation_query", '{"label_name_en": "car"}', "--task_id", task_id, "--output", str(out_dir / "annotation_count.csv"), ])
def test_import(self): main([ "annotation", "import", "--project_id", project_id, "--annotation", str(data_dir / "imported-annotation.zip"), "--task_id", task_id, "--overwrite", "--yes", ])
def test_update_metadata(self): main( [ "input_data", "update_metadata", "--project_id", project_id, "--input_data_id", self.input_data_id, "--metadata", '{"attr1":"foo"}', "--yes", ] )
def test_list_with_json(self): main([ "task_history", "list_with_json", "--project_id", project_id, "--task_id", "test1", "test2", "--output", str(out_dir / "list_with_json-out.csv"), "--format", "csv", ])
def test_list_task_history(self): main([ "task_history", "list", "--project_id", project_id, "--task_id", task_id, "--format", "csv", "--output", str(out_dir / "list-out.csv"), ])
def test_list(self): out_file = str(out_dir / "task.csv") main([ self.command_name, "list", "--project_id", project_id, "--task_query", f'{{"user_id": "{self.user_id}", "phase":"acceptance", "status": "complete"}}', "--output", out_file, "--format", "csv", ])
def test_complete_task(self): main([ self.command_name, "complete", "--project_id", project_id, "--task_id", task_id, "--phase", "annotation", "--reply_comment", "対応しました(自動投稿)", "--yes", ])
def test_list_labor_worktime(self): out_file = str(out_dir / "list_labor_worktime.csv") main([ self.command_name, "list_labor_worktime", "--project_id", project_id, "--start_date", "2020-07-01", "--end_date", "2020-07-02", "--output", str(out_file), "--yes", ])
def test_list_input_data(self): out_file = str(out_dir / "input_data.json") main( [ "input_data", "list", "--project_id", project_id, "--input_data_query", '{"input_data_name": "abcdefg"}', "--add_details", "--output", out_file, ] )
def test_put_input_data_with_zip(self): # 注意:ジョブ登録される zip_file = str(data_dir / "lenna.zip") main( [ "input_data", "put", "--project_id", project_id, "--zip", zip_file, "--wait", "--yes", ] )
def test_put_input_data(self): csv_file = str(data_dir / "input_data2.csv") main( [ "input_data", "put", "--project_id", project_id, "--csv", csv_file, "--overwrite", "--yes", "--parallelism", "2", ] )
def test_list_input_data_with_json(self): out_file = str(out_dir / "input_data.csv") main( [ "input_data", "list_with_json", "--project_id", project_id, "--input_data_query", '{"input_data_name": "abcdefg"}', "--input_data_id", "test1", "test2", "--output", out_file, ] )