Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

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
Contributor

@busunkim96 busunkim96 commented May 21, 2020

TODO:

  • update samples
  • specify last supported 2.7 version in README
  • merge setup.py files

@busunkim96 busunkim96 added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label May 21, 2020
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 21, 2020
@@ -0,0 +1,134 @@
# 2.0.0 Migration Guide
Copy link
Contributor Author

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

Copy link

@software-dov software-dov left a comment

Choose a reason for hiding this comment

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

LGTM, just a few questions

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

synth.py Outdated Show resolved Hide resolved
Comment on lines +38 to +40
["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?

Copy link
Contributor Author

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

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

@telpirion telpirion left a comment

Choose a reason for hiding this comment

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

Looks good to me, just a couple of questions.

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


> **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?

Copy link
Contributor Author

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


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.

Copy link
Contributor Author

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.

## 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.

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

@busunkim96 busunkim96 left a comment

Choose a reason for hiding this comment

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

Formatting issues have been fixed. @telpirion PTAL


> **WARNING**: Breaking change

Methods expect request objects. We provide a script that will convert most common use cases.
Copy link
Contributor Author

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


client = texttospeech.TextToSpeechClient()

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

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.

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

@telpirion telpirion left a comment

Choose a reason for hiding this comment

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

Thank you for these formatting changes! LGTM.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes This human has signed the Contributor License Agreement. do not merge Indicates a pull request not ready for merge, due to either quality or timing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants