Skip to content

Add task type DataCollectionV2 - #108

Merged
GabeBlanchard merged 3 commits into
masterfrom
gabe/datacollectionv2-task-type
Oct 29, 2026
Merged

GabeBlanchard merged 3 commits into
masterfrom
gabe/datacollectionv2-task-type

Conversation

@GabeBlanchard

@GabeBlanchard GabeBlanchard commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Pull Request Summary

Description

Adds TaskType.DataCollectionV2 ("datacollectionv2") so client.create_task() can create data collection V2 tasks.

The server already exposes POST /v1/task/datacollectionv2. Until now SDK users had to call it through the low-level client.api.post_request("task/datacollectionv2", ...). With this change, client.create_task(TaskType.DataCollectionV2, **payload) sends the identical request and returns a Task.

The README gets a DataCollectionV2 example (a video-annotation payload) that covers three server behaviors:

  • upload_type determines the payload's schema, and fields outside it are rejected (e.g. batch).
  • Tasks are deduplicated on (project, metadata.id), so resending a metadata.id returns the existing task.
  • If the task's processing pipeline fails to start, the request still returns 200 and the task has status == "error".

No server changes are needed.

How did you test your code?

  • Created new unit tests in tests/ for the newly implemented methods
  • Updated existing unit tests in tests/ to cover changes made to existing methods

No new tests. The suite runs against the live API, and the earlier task-type additions (#104, #105) didn't add tests either. I checked that TaskType("datacollectionv2") resolves to TaskType.DataCollectionV2. The equivalent post_request call is already used to create DCv2 tasks.

Checklist

  • I have commented my code in details, particularly in hard-to-understand areas
  • I have updated Readme.rst document with examples for newly implemented public methods
  • I have reviewed Deployment and Publishing Guide for Python SDK document
  • I incremented the SDK version in _version.py (unless this PR only updates the documentation).
  • In order to release a new version, a "Release Summary" needs to be prepared and published after the merge

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

Adds TaskType.DataCollectionV2 and a README example.

  • SDK callers can create DataCollectionV2 tasks with client.create_task().
  • The live tests no longer check DocumentTranscription requests.

No new actionable issues were found.

Reviews (3) · Last reviewed commit: "Bump version to 2.19.0" · Reviewed by Greptile

GabeBlanchard and others added 3 commits October 27, 2026 10:23
Adds TaskType.DataCollectionV2 so client.create_task() can create
datacollectionv2 tasks through the existing POST /v1/task/datacollectionv2
endpoint, and documents the payload shape in the README.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The API no longer serves POST /v1/task/documenttranscription (the task
type was removed server-side in July 2026), so these tests 404 on every
CI run. TaskType.DocumentTranscription is left in place; removing it
would be a breaking change for a separate PR.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@GabeBlanchard
GabeBlanchard requested review from GianlucaBobbioScale and shreyas-scale and removed request for shreyas-scale October 28, 2026 15:25
@shreyasatscale
shreyasatscale self-requested a review October 29, 2026 15:13
@GabeBlanchard
GabeBlanchard merged commit 1a516ac into master Oct 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants