Skip to content

Conversation

@crwilcox
Copy link
Contributor

  • Add Templating support to existing synth.py
  • Refactor Synth scripts to have similar style
  • Add black target and coverage to all synth.py
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 22, 2018
@tswast
Copy link
Contributor

tswast commented Nov 26, 2018

Cool! A bit difficult to review, though. Which files are the hand-edited ones?

@crwilcox
Copy link
Contributor Author

:) I tried to make it not too bad. the hand edited files are synth.py. There is some other hand-editing to mirror generation.
At a high-level

  • get templates from synth now (noxfile, coveragerc, flake8)
  • for each library tweak coverage numbers to match what is seen. This is still in progress but the only things that will change is the int for coverage.
@crwilcox
Copy link
Contributor Author

I should also note, some lint may fail right now. I am waiting until people have reviewed this to actually blacken (to avoid random noise in review)

asset/synth.py Outdated
# ----------------------------------------------------------------------------
# Add templated files
# ----------------------------------------------------------------------------
templated_files = gcp.CommonTemplates().py_library(unit_cov_level=86, cov_level=85)

This comment was marked as spam.

This comment was marked as spam.

# Ignore abstract methods
raise NotImplementedError
omit =
*/gapic/*.py

This comment was marked as spam.

This comment was marked as spam.

@@ -1,4 +1,5 @@
[flake8]
ignore = E203, E266, E501, W503

This comment was marked as spam.

This comment was marked as spam.

@crwilcox crwilcox added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 27, 2018
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 27, 2018
@crwilcox crwilcox added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 27, 2018
@crwilcox crwilcox merged commit 8a2b64d into googleapis:master Nov 28, 2018
@crwilcox crwilcox deleted the templating branch November 28, 2018 21:55
chrisrossi pushed a commit to chrisrossi/google-cloud-python that referenced this pull request Feb 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

6 participants