Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4505a8f
chore: disable .fernignore
lukeocodes Dec 10, 2025
ad93815
SDK regeneration
fern-api[bot] Dec 10, 2025
5a1a659
SDK regeneration
fern-api[bot] Dec 10, 2025
9883fa6
chore(tests): prettify wiremock mappings so manual edits are easier t…
lukeocodes Dec 12, 2025
29c48d5
fix(tests): fixing wiremock tests with a content-type match temporarily
lukeocodes Dec 12, 2025
e07cbf1
fix(tests): fix wiremock conftest to use base client
lukeocodes Dec 12, 2025
97a31a9
fix(test): correct wire test implementations
lukeocodes Dec 12, 2025
9589d58
chore(fernignore): protect manual fixes from generator overwrite
lukeocodes Dec 12, 2025
f9f4511
feat(client): add telemetry parameters for backwards compatibility
lukeocodes Dec 12, 2025
d4049d2
chore: update ignore files for manual tests
lukeocodes Dec 15, 2025
1d404d7
fix(websockets): change media methods to accept bytes instead of str
lukeocodes Dec 15, 2025
b413ea1
chore(fernignore): add socket client files to prevent regeneration
lukeocodes Dec 15, 2025
055ffa6
test(websockets): update manual tests to use public media methods
lukeocodes Dec 15, 2025
785b6b3
docs(websockets): add websockets-reference.md for v6 SDK
lukeocodes Dec 15, 2025
fdcce88
SDK regeneration
fern-api[bot] Dec 16, 2025
47f7228
SDK regeneration
fern-api[bot] Dec 16, 2025
0a759cf
SDK regeneration
fern-api[bot] Dec 16, 2025
b422ca3
chore: bump version to 6.0.0-alpha.1
lukeocodes Dec 17, 2025
9d01c17
ci: add release-please workflow and configuration
lukeocodes Dec 17, 2025
276ec07
ci: update CI workflow with matrix strategy and Docker verification
lukeocodes Dec 17, 2025
e1e6285
ci: add PR title checking workflow
lukeocodes Dec 17, 2025
50b4b69
ci: add changelog logging and daily test workflows
lukeocodes Dec 17, 2025
5f8fa81
docs: add migration guides from main branch
lukeocodes Dec 17, 2025
e8f3e4b
Add comprehensive examples directory with production-ready patterns
lukeocodes Dec 17, 2025
f80076b
chore(lint): apply automatic linting fixes to examples
lukeocodes Dec 17, 2025
f8a656a
fix(tests): add Python 3.8-3.10 datetime.fromisoformat compatibility
lukeocodes Dec 17, 2025
b6db74e
chore: add tests/wire/__init__.py to fernignore
lukeocodes Dec 17, 2025
c8d03a6
chore: bump version to 6.0.0-alpha.2
lukeocodes Dec 17, 2025
7f574f1
fix(ci): add poetry to PATH and remove publish matrix
lukeocodes Dec 17, 2025
6863c90
chore: bump version to 6.0.0-alpha.3
lukeocodes Dec 17, 2025
edfce11
ci: migrate PyPI publishing to OIDC trusted publishers
lukeocodes Dec 19, 2025
1438872
chore: bump version to 6.0.0-alpha.4
lukeocodes Dec 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 16 additions & 0 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"cliVersion": "3.1.0",
"generatorName": "fernapi/fern-python-sdk",
"generatorVersion": "4.42.0",
"generatorConfig": {
"client": {
"class_name": "BaseClient",
"filename": "base_client.py",
"exported_class_name": "DeepgramClient",
"exported_filename": "client.py"
},
"use_typeddict_requests": true,
"should_generate_websocket_clients": true,
"enable_wire_tests": true
}
}
102 changes: 74 additions & 28 deletions .fernignore
Original file line number Diff line number Diff line change
@@ -1,33 +1,79 @@
# Development, Configuration Files & Documentation
README.md
CONTRIBUTING.md
.vscode/
.gitignore
mypy.ini
websockets-reference.md
.github/
scripts/run_examples.sh
docs/
pyproject.toml
CHANGELOG.md
# WireMock mappings manually fixed to handle x-fern-sdk-method-name attribute
# Generator doesn't properly handle this attribute, so mappings must be manually maintained
wiremock/wiremock-mappings.json

# Examples
examples/
# Custom client implementation extending BaseClient with additional features:
# - access_token parameter support (Bearer token authentication)
# - Automatic session ID generation and header injection (x-deepgram-session-id)
# This file is manually maintained and should not be regenerated
src/deepgram/client.py

# Test Files
tests/unit/
tests/integrations/
# Wire test files with manual fixes to correct generator output:
# - test_listen_v1_media.py: Fixed transcribe_file() call to pass required request parameter (bytes)
# - test_speak_v1_audio.py: Fixed generate() call to consume iterator for request completion
# - conftest.py: Changed from generated DeepgramApi to BaseClient for WireMock compatibility
tests/wire/test_listen_v1_media.py
tests/wire/test_speak_v1_audio.py
tests/wire/conftest.py

# Custom Extensions & Clients
src/deepgram/client.py
src/deepgram/extensions/
# Wire tests __init__.py with Python 3.8-3.10 datetime.fromisoformat compatibility fix:
# The Fern generator creates test files that use datetime.fromisoformat() with ISO 8601 strings
# ending in 'Z' (e.g., '2024-01-15T09:30:00Z'). However, Python 3.10's datetime.fromisoformat()
# doesn't support the 'Z' suffix (this was added in Python 3.11). Python 3.8 and 3.9 also lack
# this support.
#
# Rather than modifying generated test files (which would be overwritten on regeneration), we
# implement a monkey-patch in tests/wire/__init__.py that wraps the datetime.datetime class
# and overrides fromisoformat() to automatically convert 'Z' to '+00:00' before calling the
# original implementation.
#
# This ensures:
# 1. Generated test files remain unchanged and can be regenerated without conflicts
# 2. All wire tests pass on Python 3.8, 3.9, and 3.10 (as well as 3.11+)
# 3. The fix is transparent to all code importing datetime.datetime in the wire tests module
#
# The implementation uses a wrapper class that inherits from the original datetime class,
# ensuring all other datetime functionality remains unchanged. The wrapper is injected into
# sys.modules['datetime'].datetime so that any 'from datetime import datetime' statements
# in the wire tests will get the patched version.
tests/wire/__init__.py

# Socket Client Implementations
src/deepgram/agent/v1/socket_client.py
src/deepgram/listen/v1/socket_client.py
src/deepgram/listen/v2/socket_client.py
src/deepgram/speak/v1/socket_client.py
# Manual standalone tests
tests/manual

# Bug Fixes
src/deepgram/listen/client.py
src/deepgram/core/client_wrapper.py
# WebSocket socket client files with manual fixes for binary audio data support:
# The generator incorrectly types \*\_media methods as `str` and uses `_send_model()` which
# calls `.dict()` on the input, causing runtime errors. These files are manually fixed to:
# 1. Change parameter type from `str` to `bytes` for all `*_media` methods
# 2. Change from `_send_model()` to `_send()` to properly handle binary data
#
# src/deepgram/listen/v1/socket_client.py:
# - Line 57: Changed `async def send_listen_v_1_media(self, message: str)` to `message: bytes`
# - Line 60: Updated docstring from "sent as a str" to "sent as bytes"
# - Line 62: Changed `await self._send_model(message)` to `await self._send(message)`
# - Line 138: Changed `def send_listen_v_1_media(self, message: str)` to `message: bytes`
# - Line 141: Updated docstring from "sent as a str" to "sent as bytes"
# - Line 143: Changed `self._send_model(message)` to `self._send(message)`
#
# src/deepgram/listen/v2/socket_client.py:
# - Line 54: Changed `async def send_listen_v_2_media(self, message: str)` to `message: bytes`
# - Line 57: Updated docstring from "sent as a str" to "sent as bytes"
# - Line 59: Changed `await self._send_model(message)` to `await self._send(message)`
# - Line 121: Changed `def send_listen_v_2_media(self, message: str)` to `message: bytes`
# - Line 124: Updated docstring from "sent as a str" to "sent as bytes"
# - Line 126: Changed `self._send_model(message)` to `self._send(message)`
#
# src/deepgram/agent/v1/socket_client.py:
# - Line 136: Changed `async def send_agent_v_1_media(self, message: str)` to `message: bytes`
# - Line 139: Updated docstring from "sent as a str" to "sent as bytes"
# - Line 141: Changed `await self._send_model(message)` to `await self._send(message)`
# - Line 245: Changed `def send_agent_v_1_media(self, message: str)` to `message: bytes`
# - Line 248: Updated docstring from "sent as a str" to "sent as bytes"
# - Line 250: Changed `self._send_model(message)` to `self._send(message)`
#
# Reason: Audio data must be sent as binary bytes, not strings. The `_send_model()` method
# expects Pydantic models and calls `.dict()` which fails on bytes/str. The `_send()` method
# properly handles bytes by passing them directly to the websocket connection.
# src/deepgram/listen/v1/socket_client.py
# src/deepgram/listen/v2/socket_client.py
# src/deepgram/agent/v1/socket_client.py
3 changes: 2 additions & 1 deletion .github/.commitlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@
100
]
}
}
}

3 changes: 2 additions & 1 deletion .github/.release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
".": "5.3.0"
}
}

6 changes: 0 additions & 6 deletions .github/CODEOWNERS

This file was deleted.

219 changes: 0 additions & 219 deletions .github/ISSUE_TEMPLATE/bug_report.yml

This file was deleted.

Loading
Loading