-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved testing coverage and TranscribeAudio
endpoint refactor
#50
Merged
citomcclure
merged 19 commits into
main
from
feature/testing-coverage-and-transcribe-audio-refactor
Jun 20, 2024
Merged
Improved testing coverage and TranscribeAudio
endpoint refactor
#50
citomcclure
merged 19 commits into
main
from
feature/testing-coverage-and-transcribe-audio-refactor
Jun 20, 2024
Conversation
This file contains 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
…rTranscript(), and generateTranscriptionId()
…eturning no notes. Also removed last udpated values from NoteOrder since they are not being used and last updated time has not been implemented for sort yet.
…ion, log statements, and refactored use of transcription id, key, and job names to just all use id for readability in activity class.
…cumentation and fixed checkstyles for current branch.
…ogger being used as method argument and refactored broken unit test.
…r from activity. Updated test class. TranscribeAudioActivty fully refactored to only have business logic.
…to mock static method from AudioSystem for testing.
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.
Overall
Testing Coverage
Increased testing coverage from 35% to 55%:
TranscribeAudio Refactor
Created wrapper classes for S3 and Transcribe and moved non-business logic out of activity class. This made the class testable and provided much better readability.
Implementation
Unit tests for the following classes:
ModelConverter
NoteDateTimeConverter
TranscriptionUtils
GetNotesActivity
ClientProvider
s (ddb, s3, transcribe)TranscribeAudioActivity
New methods (and moved logic):
S3Wrapper
putAudioInS3()
getAudioLocation()
getTranscriptionJobResult()
TranscribeWrapper
startTranscriptionJob()
pollTranscriptionJob()
TranscriptionUtils
getSampleRate()
Other
ClientProvider
classes. Was only able to test for null region. Likely would require a refactoring of those classes and how they are used in Dependency Injection by having each client provider class depend on the client builder and then providing those through DI. Then those builders could be mocked and theRegion
value could be intercepted using anArgumentCaptor
CollectionUtils
class - was not being usedNullUtils
class - were note being usedS3Utils
class - moved bucket names over toS3Wrapper