- Notifications
You must be signed in to change notification settings - Fork 68
docs: explain default generation config in README.md #3388
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits Select commit Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -18,20 +18,36 @@ for additional instructions. | |
| | ||
| ## Prerequisites | ||
| | ||
| In order to generate a version for each library, a versions.txt has to exist | ||
| ### Generation configuration | ||
| | ||
| A generation configuration file is required to generate GAPIC Client Libraries. | ||
| | ||
| Please refer to [Generation configuration yaml](#generation-configuration-yaml--generation-config-path---optional) | ||
| for more information. | ||
| | ||
| ### versions.txt | ||
| | ||
| In order to generate a version for each library, a `versions.txt` has to exist | ||
| in `repository-path`. | ||
| Please refer to [Repository path](#repository-path--repositorypath---optional) | ||
| for more information. | ||
| | ||
| ## Parameters to generate a repository using the docker image | ||
| | ||
| ### Generation configuration yaml (`generation-config-path`) | ||
| ### Generation configuration yaml (`generation-config-path`), optional | ||
| Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add a sentence before this section mentioning something like "All the parameters are optional, but a generation_config.yaml is required"? Contributor Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added this to | ||
| | ||
| An absolute or relative path to a configuration file containing parameters to | ||
| generate the repository. | ||
| Please refer to [Configuration to generate a repository](#configuration-to-generate-a-repository) | ||
| for more information. | ||
| | ||
| The default value is `$(pwd)/generation_config.yaml`, i.e., `generation_config.yaml` | ||
| in the current working directory. | ||
| | ||
| This will raise `FileNotFoundError` if the specified generation config does not | ||
| exist or, in case `generation-config-path` is not specified, the default | ||
| generation config does not exist. | ||
| | ||
| ### Repository path (`repository-path`), optional | ||
| | ||
| The path to where the generated repository goes. | ||
| | @@ -41,8 +57,8 @@ For example, `cd google-cloud-java && python /path/to/entry_point.py ...` withou | |
| specifying the `--repository_path` option will modify the `google-cloud-java` | ||
| repository the user `cd`'d into. | ||
| | ||
| Note that versions.txt has to exist in `repository_path` in order to generate | ||
| right version for each library. | ||
| Note that `versions.txt` has to exist in `repository_path` in order to generate | ||
| the right version for each library. | ||
| Please refer [here](go/java-client-releasing#versionstxt-manifest) for more info | ||
| of versions.txt. | ||
| | ||
| | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
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.
IIRC, we would generate a
versions.txtfile if it does not exist. Can you confirm @diegomarquezp ?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.
No, it is not generated. The scripts will just fail if not found.
sdk-platform-java/hermetic_build/library_generation/utils/utilities.py
Lines 124 to 142 in 1080de4
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.
I see, thanks for the quick response!
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.
The file is required, per
sdk-platform-java/hermetic_build/library_generation/utils/utilities.py
Line 164 in 7d6d66a
Though I think we can create an empty file if not exist since we didn't check the contents.
I'll create a follow-up issue.