Rewrite pyannote-cloud crate with progenitor#4160
Merged
Conversation
Replace hand-written API client with progenitor-generated code from the official pyannote OpenAPI spec (https://docs.pyannote.ai/openapi.json). - Add build.rs using progenitor-utils (same pattern as chatwoot crate) - Add fetch.sh to download the OpenAPI spec - Add openapi.gen.json (raw spec) and openapi.filtered.json (processed) - Remove manual client code (lib.rs, get_job.rs, submit_diarization_job.rs, test_key.rs) - Update dependencies: add progenitor-client, regress, chrono, serde_json; remove url, specta Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
✅ Deploy Preview for hyprnote canceled.
|
✅ Deploy Preview for hyprnote-storybook canceled.
|
Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rewrite
pyannote-cloudcrate with progenitorSummary
Replaces the hand-written pyannote API client with a progenitor-generated client from the official OpenAPI spec, following the same pattern as the
chatwootcrate:fetch.sh— downloads the raw OpenAPI spec toopenapi.gen.jsonbuild.rs— usesprogenitor-utilsto filter, normalize, and generate Rust client code at build timeopenapi-filtered.gen.json— the processed/filtered spec committed for referencesrc/lib.rs— singleinclude!of the generated codeRemoves the manual
PyannoteClient,PyannoteClientBuilder, and hand-written modules (get_job.rs,submit_diarization_job.rs,test_key.rs).The generated client now covers all pyannote API endpoints: diarize, voiceprint, identify, get job, list jobs, test, and media upload/download.
Review & Testing Checklist for Human
PyannoteClient::builder(),get_job::Request/Response,submit_diarization_job::Request/Response, etc.) is fully removed. Verify nothing outside this crate depends on those types — grep found no.rsimports, but check Tauri command bindings or any code that may referencespecta::Typerenames likeDiarizationSubmitRequest,DiarizationRetrieveResponse.specta::Typederives: The old types derivedspecta::Typefor TypeScript binding generation. Progenitor-generated types won't have these. Confirm this doesn't break any frontend type generation pipeline.cargo build -p pyannote-cloud) and inspect the generated types/methods intarget/debug/build/pyannote-cloud-*/out/codegen.rs. Ensure the progenitor client's constructor and method signatures work for your use case (e.g., Bearer auth setup).regresscrate added as new dependency: Required by progenitor-generated pattern validation code (forGetMediaUploadUrl.urlandVoiceprint.labelpatterns). Verify this is acceptable.Notes
ALLOWED_PATH_PREFIXESinbuild.rsis set to["/v1/"]which retains all endpoints. This is intentional since the entire pyannote API lives under/v1/.#[ignore]integration tests were removed. No new tests were added.