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.
Proposed changes
Addresses Issues: #392 #391
The Daily and Unit Tests will verify:
Daily Tests
The daily tests invoke a series of checks against the actual/real API endpoint and save the results in the
tests/response_data
folder. This response data is updated nightly to reflect the latest response from the server. Running the daily tests does require aDEEPGRAM_API_KEY
set in your environment variables.To run the Daily Tests:
Unit Tests
The unit tests invoke a series of checks against mock endpoints using the responses saved in
tests/response_data
from the daily tests. These tests are meant to simulate running against the endpoint without actually reaching out to the endpoint; running the unit tests does require aDEEPGRAM_API_KEY
set in your environment variables because the client SDK code checks this, but you will not actually reach out to the server.To Run All The Tests (Daily + Unit)
make test
Additional changes to support this PR:
class BaseResponse
to which all response objects inherit. This removes duplication and also introduced a neweval
function to support querying the JSON string contained within the object.*kwargs
to remaining functions that were missing the parameter. This was needed to support passing in the mockhttpx
responses for themake unit-test
portion of code.examples/text-to-speech/rest
examples to renameSPEAK_OPTIONS
toSPEAK_TEXT
as they were incorrectly named. The variable is providing text to convert not the API options/parameters.Types of changes
What types of changes does your code introduce to the community Python SDK?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
NA