-
Notifications
You must be signed in to change notification settings - Fork 85
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: add templates for python samples projects #506
Conversation
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.
For new samples, what are the steps for generating a new noxfile? Is there a way for users to manually generate it to ensure they get an updated version?
Just a comment that whatever we decide the steps are for new samples, they need to be added to the authoring guide and somehow communicated outward to our lovely contributors |
Will we need to add a .yml to every subdirectory? or only the ones whose noxfiles are different than the generic one? |
str(p.relative_to(SAMPLES_TEMPLATE_PATH)) | ||
for p in SAMPLES_TEMPLATE_PATH.glob("*.rst") | ||
] | ||
t = templates.TemplateGroup(SAMPLES_TEMPLATE_PATH, excludes=excludes) |
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.
@SurferJeffAtGoogle Is it alright to use templates
directly or will it break something related to the synth metadata tracking?
@leahecole Every single one, but I tweaked the logic so that synthtool will add a default On an unrelated note this ended up being more code than I expected so I will add some tests. |
These templates will be used for templates in python-docs-samples and in Python client libraries. The README generation code is a modified version of https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/scripts/readme-gen.
Co-Authored-By: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
2e15eb3
to
35e67bb
Compare
…l into py-samples-templates
These templates will be used for templates in python-docs-samples
and in Python client libraries.
The README generation code is a modified
version of https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/scripts/readme-gen.
To finish setup for a new set of samples in
foo/
:client libraries: Go to the root of the repository, edit the synth.py, and run
synthtool
.python-docs-samples: Copy
synth.py
from the root of the repo and run synthtool.$ cp synth.py foo/synth.py $ cd foo $ synthtool
(You can also run synthtool from the root of the repository, but it will attempt to regenerate all the noxfiles and readmes.)