Skip to content
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

Cicdchange #162

Closed
wants to merge 57 commits into from
Closed

Cicdchange #162

wants to merge 57 commits into from

Conversation

CopperBeardy
Copy link
Collaborator

Updated CI/CD to incorporate dotnet 8

CopperBeardy and others added 30 commits November 11, 2023 11:49
Stripped back version of the API to incorporate the model name changes from V3 -
Naming has been kept as close as possible to NodeSDK but there are some cases in which class name clashed so they were renamed
refactored Httpclient to be able to accept a preconfigured Httpclient

refactored QueryParamaterUtil so that a callback url casing is respected - addressing github issues - #128
Refactored the AbstractRestClient so that it can either accept a HttpClient or a IHttpClientFactory. if  a HttpClient is passed in it is stored in the parameter ExternalHttpClient. During a Rest call the methods will checker wheter a HttpClient or a IHttpClientFactory is present then assign or create HttpClient that will make the rest call, this allows for a timeout to be set at anytime. this will address both issues -
Timeout -#127
Socket Exhaustion - #148
Added get and post request method and there tests
added the stubs for - Onprem, Prerecorded & Manage Methods
methods for ManageClient and OnpremClient created along with summary comments for the classes and methods
links to the equivalent  files in the node sdk for what needs to be considered in creating this sdk
initial prerecorded client set,
Note a difference from V3. instead of taking a FileSource in the TranscibeFile - there a two versions of this method,--
 one that will accept a byte array(equivalent to a node buffer)
one that will accept a stream(equivalent to node readable)

Callback method have a return type as a Request id is returned

no unit test done yet for any of the specific clients that derive from AbstractRestClient
correct call take either a byte[] or stream parameter  so that there create streamcontent and not string content
rename the client method to have Async at the end of there name.

all rest client now have 2  constructors, the default which does not take a DeepgramClientOptions and one that does.

setting the proxy for HttpClient need to be done at time of creation. so doing this internally would mean managing the lifecycle of the HttpClient and would bloat the size of the sdk. It is much more practical to get the client to set the proxy when adding the HttpClient to services(readme update to show how this is done). Since it is most likely that when a proxy is needed it will be made for a named client. so internally when the create client method is called it needs to know the name of the  named client, so this this has been added to the DeepgramClientOptions.
changed parameter order to so they make more sense
refactor how the httpclient options are passed to and processed by the sdk. they are now passed during service registration(needed to be done here for setting any proxy that needs to be used)
Update the readme to reflect most of the changes
added comments to public facing models
removal of a project that was used to test the servicecollection generation -- not needed
uncommeted the check for timeout -
Note -- timeout can now be set as part of the deepgramclientoptions && by calling a method of the AbstractRestClient
the timeout checks before the calls are there to allow for the flexibility to change timeout before making a call
deepgram options back to the constructor as the Custom headers and baseurl might be different for each client depending how a onprem is set up.

Proxy for httpclient need to be set on the HttpMessageHandler which needs to be passed to the Httpclient on creation, so this need to be handle in the servicescollection
throwing System.PlatformNotSupportedException
update package references to use the latest minor build for a give major build
updated test to reflect nunit code chages
refactored out duplicate test code to a SetUp attributed methods in the relevant classes.
introduce FluentAssertions into test project. Make it easier to read the Assert Statements
cleaned up the library and language version to remove the Hash being added to the  relevant versions
CopperBeardy and others added 27 commits December 1, 2023 13:34
Clean up of code and comments
Following best practices logging added to capture exceptions (https://learn.microsoft.com/en-us/dotnet/core/extensions/logger-message-generator)
the generators in there compiled code add checks to see if logging is enabled at a specific log level, if it is not nothing is logged
instead of keeping a instance of logger in a client the code will now request the Logger when needed from the log provider

Tentative implementation of the Live client not much change so far cleaned up the logging and updated the types
made getting the logger instance more clear enabling passing around the logger or loggername more clear
protocol checking added when creating anyclient -
rest clients use BaseAddressUtil.GetHttps
websockets use BaseAddressUtil.GetHttps

split the live client into 2 class the AbstractWebsocketClient which contains all the internal methods and LiveCLient which contains the public facing methods

WssClientUtil class added to add to provide the functionality of adding the authorization and any custom headers to the websocketclient
timeout did not make sense having it here when it is use in the websocket client so timeout reverted to being set through a method call and checked before a request is sent
comment added for the schemas - prerecorded, live, transcription
forgot to add api version to  url strings - now corrected
reduces noise output consoles when building and git actions
remove unused packages and alphabetically sorted the ones there - quicker to see find references
removed the code duplication in AbstractRestClient and LiveClient
…ation

Rewrite/feature/setup and registration
update CI/CD to included dotnet 8
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.

2 participants