From 08596505b1fb15ef0776775bf8d1c6cf27b9de93 Mon Sep 17 00:00:00 2001 From: kmkkiii Date: Wed, 5 Nov 2025 16:49:20 +0900 Subject: [PATCH 1/4] =?UTF-8?q?Task=E3=81=AE=E3=81=BF=E3=82=92=E4=BD=9C?= =?UTF-8?q?=E6=88=90=E3=81=99=E3=82=8B(Content=E3=81=AA=E3=81=97)=E3=83=A1?= =?UTF-8?q?=E3=82=BD=E3=83=83=E3=83=89=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastlabel/__init__.py | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/fastlabel/__init__.py b/fastlabel/__init__.py index 24b0348..9f6e7f7 100644 --- a/fastlabel/__init__.py +++ b/fastlabel/__init__.py @@ -1975,6 +1975,54 @@ def create_sequential_pcd_task( return self.api.post_request(endpoint, payload=payload) + def create_task_without_content( + self, + project: str, + name: str, + status: str | None = None, + external_status: str | None = None, + priority: Priority | None = None, + tags: list[str] = [], + **kwargs, + ) -> str: + """ + Create a single task without content. + Currently only supports robotics projects. + + project is slug of your project (Required). + name is an unique identifier of task in your project (Required). + status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back', 'approved', 'declined' (Optional). + external_status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back', 'approved', 'declined', 'customer_declined' (Optional). + priority is the priority of the task (default: none) (Optional). + Set one of the numbers corresponding to: + none = 0, + low = 10, + medium = 20, + high = 30, + tags is a list of tag to be set in advance (Optional). + assignee is slug of assigned user (Optional). + reviewer is slug of review user (Optional). + approver is slug of approve user (Optional). + external_assignee is slug of external assigned user (Optional). + external_reviewer is slug of external review user (Optional). + external_approver is slug of external approve user (Optional). + """ + endpoint = "tasks/without-content" + + payload = {"project": project, "name": name} + if status: + payload["status"] = status + if external_status: + payload["externalStatus"] = external_status + if priority is not None: + payload["priority"] = priority + if tags: + payload["tags"] = tags + + self.__fill_assign_users(payload, **kwargs) + + return self.api.post_request(endpoint, payload=payload) + def import_appendix_file( self, project: str, From b94d8d4eab11d37c057e0b94a41a12ccf6df8124 Mon Sep 17 00:00:00 2001 From: kmkkiii Date: Wed, 5 Nov 2025 16:50:31 +0900 Subject: [PATCH 2/4] =?UTF-8?q?doc:=20README=E8=BF=BD=E8=A8=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index a24c0a7..50f4b7b 100644 --- a/README.md +++ b/README.md @@ -2064,6 +2064,23 @@ Example of a single dicom task object } ``` +### Task without Content + +Supported following project types: + +- Robotics - Task Classification + +#### Create Tasks + +Create a new task. + +```python +task_id = client.create_task_without_content( + project="YOUR_PROJECT_SLUG", + name="TASK_NAME", +) +``` + ### Common APIs for update and delete and count are same over all tasks. From 3a5cfc07c5fe6f3cd8de93d66c2468bc20e101c5 Mon Sep 17 00:00:00 2001 From: kmkkiii Date: Wed, 5 Nov 2025 17:40:15 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89?= =?UTF-8?q?=E5=90=8D=E3=81=A8endpoint=E3=82=92=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 ++++--- fastlabel/__init__.py | 7 +++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 50f4b7b..8a39f42 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ - [PCD](#pcd) - [Sequential PCD](#sequential-pcd) - [DICOM](#dicom) + - [Robotics](#robotics) - [Common](#common) - [Appendix](#appendix) - [Annotation](#annotation) @@ -2064,7 +2065,7 @@ Example of a single dicom task object } ``` -### Task without Content +### Robotics Supported following project types: @@ -2072,10 +2073,10 @@ Supported following project types: #### Create Tasks -Create a new task. +Create a new task (Content creation is required separately). ```python -task_id = client.create_task_without_content( +task_id = client.create_robotics_task( project="YOUR_PROJECT_SLUG", name="TASK_NAME", ) diff --git a/fastlabel/__init__.py b/fastlabel/__init__.py index 9f6e7f7..8f99dfc 100644 --- a/fastlabel/__init__.py +++ b/fastlabel/__init__.py @@ -1975,7 +1975,7 @@ def create_sequential_pcd_task( return self.api.post_request(endpoint, payload=payload) - def create_task_without_content( + def create_robotics_task( self, project: str, name: str, @@ -1986,8 +1986,7 @@ def create_task_without_content( **kwargs, ) -> str: """ - Create a single task without content. - Currently only supports robotics projects. + Create a single robotics task without content. project is slug of your project (Required). name is an unique identifier of task in your project (Required). @@ -2007,7 +2006,7 @@ def create_task_without_content( external_reviewer is slug of external review user (Optional). external_approver is slug of external approve user (Optional). """ - endpoint = "tasks/without-content" + endpoint = "tasks/robotics" payload = {"project": project, "name": name} if status: From 5608273846bb53f062e5be87c37316187e4dc4d9 Mon Sep 17 00:00:00 2001 From: kmkkiii Date: Mon, 10 Nov 2025 10:09:53 +0900 Subject: [PATCH 4/4] =?UTF-8?q?fix:=20create=5Frobotics=5Ftask=E3=81=AE?= =?UTF-8?q?=E5=9E=8B=E3=81=A8=E5=BC=95=E6=95=B0=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastlabel/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fastlabel/__init__.py b/fastlabel/__init__.py index 8f99dfc..97cc308 100644 --- a/fastlabel/__init__.py +++ b/fastlabel/__init__.py @@ -1979,10 +1979,10 @@ def create_robotics_task( self, project: str, name: str, - status: str | None = None, - external_status: str | None = None, - priority: Priority | None = None, - tags: list[str] = [], + status: Optional[str] = None, + external_status: Optional[str] = None, + priority: Optional[Priority] = None, + tags: Optional[list[str]] = None, **kwargs, ) -> str: """ @@ -2016,7 +2016,7 @@ def create_robotics_task( if priority is not None: payload["priority"] = priority if tags: - payload["tags"] = tags + payload["tags"] = tags or [] self.__fill_assign_users(payload, **kwargs)