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

feat!: regenerate with microgenerator #30

Merged
merged 23 commits into from Jun 1, 2020
Merged

feat!: regenerate with microgenerator #30

merged 23 commits into from Jun 1, 2020

Conversation

@busunkim96
Copy link
Collaborator

@busunkim96 busunkim96 commented May 21, 2020

TODO:

  • update samples
  • specify last supported 2.7 version in README
  • merge setup.py files
@busunkim96 busunkim96 requested a review from software-dov May 27, 2020
@@ -0,0 +1,134 @@
# 2.0.0 Migration Guide
Copy link
Collaborator Author

@busunkim96 busunkim96 May 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@software-dov @telpirion Please review

Loading

Copy link

@software-dov software-dov left a comment

LGTM, just a few questions

Loading

UPGRADING.md Outdated
In the 2.0.0 release, all methods have a single positional argument `request`. Method docstrings indicate whether an argument is
required or optional.

Some methods have additional keyword only arguments. The available parameters depend on the [`google.api.method_signature` annotation](https://github.com/googleapis/googleapis/blob/master/google/cloud/texttospeech/v1/cloud_tts.proto#L53) specified by the API producer.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to emphasize that the request param and any kword only flattenings are mutually exclusive.

Loading

Copy link
Collaborator Author

@busunkim96 busunkim96 May 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

Loading

synth.py Outdated Show resolved Hide resolved
Loading
["google/cloud/**/client.py", "google/cloud/**/cloud_tts.py"],
"((en)|(no)|(nb)(cmn)|(yue))-\*",
"\g<1>-\*",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand this part. Is this indicative of an error in the template, bad escaping on the part of the generator, or just garbage input and garbage sphinx?

Loading

Copy link
Collaborator Author

@busunkim96 busunkim96 May 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sphinx/RST interprets the * as emphasis. I'd expect the generator to escape it? The proto comments look valid to me

Source protos:
https://github.com/googleapis/googleapis/blob/b8c7c4e8da56547fc32bee9b563d306fadabdb6f/google/cloud/texttospeech/v1/cloud_tts.proto#L59-L66

Loading

synth.py Outdated Show resolved Hide resolved
Loading
@busunkim96 busunkim96 closed this May 28, 2020
@busunkim96 busunkim96 reopened this May 28, 2020
Copy link

@telpirion telpirion left a comment

Looks good to me, just a couple of questions.

Also, I would add the output.mp3 file to the .gitignore.

Loading


> **WARNING**: Breaking change
Methods expect request objects. We provide a script that will convert most common use cases.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this script included in this PR?

Loading

Copy link
Collaborator Author

@busunkim96 busunkim96 Jun 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes: scripts/fixup_keywords.py is published with the library.

If you install the library it will be available on the command line. https://python-packaging.readthedocs.io/en/latest/command-line-scripts.html#the-scripts-keyword-argument

Loading

client = texttospeech.TextToSpeechClient()
voices = client.list_voices(request={"language_code": "no"})

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a significant change in behavior. You might want to updated the docs too, at least a release note.

Loading

Copy link
Collaborator Author

@busunkim96 busunkim96 Jun 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Will follow up with the TW.

Loading

## Enums and Types


> **WARNING**: Breaking change

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above: consider updating the documentation on cloud.google.com for all breaking changes.

Loading

samples/snippets/audio_profile_test.py Show resolved Hide resolved
Loading
samples/snippets/list_voices.py Outdated Show resolved Hide resolved
Loading
samples/snippets/ssml_addresses.py Outdated Show resolved Hide resolved
Loading
samples/snippets/synthesize_file.py Outdated Show resolved Hide resolved
Loading
samples/snippets/synthesize_file.py Outdated Show resolved Hide resolved
Loading
samples/snippets/synthesize_text.py Outdated Show resolved Hide resolved
Loading
samples/snippets/synthesize_text.py Outdated Show resolved Hide resolved
Loading
Copy link
Collaborator Author

@busunkim96 busunkim96 left a comment

Formatting issues have been fixed. @telpirion PTAL

Loading


> **WARNING**: Breaking change
Methods expect request objects. We provide a script that will convert most common use cases.
Copy link
Collaborator Author

@busunkim96 busunkim96 Jun 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes: scripts/fixup_keywords.py is published with the library.

If you install the library it will be available on the command line. https://python-packaging.readthedocs.io/en/latest/command-line-scripts.html#the-scripts-keyword-argument

Loading

client = texttospeech.TextToSpeechClient()
voices = client.list_voices(request={"language_code": "no"})
Copy link
Collaborator Author

@busunkim96 busunkim96 Jun 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Will follow up with the TW.

Loading

samples/snippets/audio_profile_test.py Show resolved Hide resolved
Loading
Copy link

@telpirion telpirion left a comment

Thank you for these formatting changes! LGTM.

Loading

@busunkim96 busunkim96 merged commit 3181b55 into master Jun 1, 2020
7 checks passed
Loading
@busunkim96 busunkim96 deleted the microgen branch Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants