-
Notifications
You must be signed in to change notification settings - Fork 291
Conversation
(figuring out how to make samples linted correctly) |
Codecov Report
@@ Coverage Diff @@
## master #472 +/- ##
===========================================
+ Coverage 69.37% 91.06% +21.68%
===========================================
Files 17 11 -6
Lines 209 2932 +2723
Branches 0 74 +74
===========================================
+ Hits 145 2670 +2525
- Misses 64 260 +196
- Partials 0 2 +2
Continue to review full report at Codecov.
|
package.json
Outdated
"system-test": "mocha system-test/*.js --timeout 600000", | ||
"test-no-cover": "mocha test/*.js", | ||
"system-test": "mocha build/system-test/*.js --timeout 600000", | ||
"test-no-cover": "mocha build/test/*.js", | ||
"test": "npm run cover", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we just replace this with c8 mocha build/test/*.js
, it seems like this has weird bespoke coverage logic (perhaps this was the first module we added coverage to).
// tslint:disable-next-line no-any | ||
Object.defineProperty( | ||
v1.SpeechClient.prototype, | ||
'streamingRecognize', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the main benefits of the ImprovedStreamingClient
mix-in? better types in the response?
I wonder if we should consider upstreaming some of this to the generator itself, worth making a tracking ticket?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a speech-specific change. They want streamingRecognize
, which is a bi-di streaming method, to accept a separate config object:
streamingRecognize(
streamingConfig?:
| protosTypes.google.cloud.speech.v1.IStreamingRecognitionConfig
| protosTypes.google.cloud.speech.v1p1beta1.IStreamingRecognitionConfig,
options?: gax.CallOptions
)
By our design, bi-directional streaming calls don't accept any request as a parameter (only as a stream). This one is unique.
This one is complicated. It has a very weird dark magic with a helper replacing one of the auto-generated method:
nodejs-speech/src/index.js
Lines 53 to 57 in cace910
I'm replacing it with an equal (but probably not so dark) magic in TypeScript, making kind of a mixin.
nodejs-speech/src/index.ts
Lines 19 to 36 in b4c87e7
nodejs-speech/src/v1/speech_client.ts
Lines 477 to 478 in b4c87e7
Other than that, looks good to me, and all the system tests just work.