-
Notifications
You must be signed in to change notification settings - Fork 1.6k
chore(librarian): create docs/README.rst file during generation #14751
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
Conversation
514d6dc to
b32d263
Compare
163f69f to
ff47911
Compare
| # Read the content from the source, which will resolve any symlinks. | ||
| with open(source_path, "r") as f: | ||
| content = f.read() |
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.
nit: use the _read_text_file function
google-cloud-python/.generator/cli.py
Lines 61 to 72 in 79a5261
| def _read_text_file(path: str) -> str: | |
| """Helper function that reads a text file path and returns the content. | |
| Args: | |
| path(str): The file path to read. | |
| Returns: | |
| str: The contents of the file. | |
| """ | |
| with open(path, "r") as f: | |
| return f.read() |
| _write_json_file(output_repo_metadata, metadata_content) | ||
|
|
||
|
|
||
| def _copy_readme_to_docs(output: str, library_id: str): |
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.
Could we create a follow up issue to track adding docs/README.rst to the output of gapic-generator?
As of #14751, package level `docs/README.rst` files are included in the generated output and are a copy of the package `README.rst`. We don't need to preserve the existing version.
This PR creates a
docs/index.rstfile for a new library that is configured and generated using librarian.