-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
chore: script to create a new module #8517
Conversation
.gitignore
Outdated
|
||
# Environments | ||
.env |
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.
Why all these changes in .gitignore
.
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.
Excerpt from GitHub's recommendations https://github.com/github/gitignore/blob/main/Python.gitignore
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.
Maybe group all of the Python-related ignores in a separate section? Or, restrict it to a specific subdirectory like generation/
?
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.
Grouped the Python-related entries.
@@ -0,0 +1,24 @@ | |||
# Copyright 2021 Google LLC |
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.
Can we put these template files under generation/new_client
?
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 prefer to place template files in a separate directory than scripts files.
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.
Can you make a subdirectory within generation/?
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 better question is) What do you feel is the problem with the current location?
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.
It's used only by scripts in /generation
. So, I think it makes sense to be organized that way. For someone navigating the code, it will cause less head scratching. They can still be in a separate directory: generation/templates
.
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 those who navigate code, the current structure is unnecessarily deep. That makes sense. Let me change it less nested.
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.
Moved template files from generation/new_client/templates/new-client
to generation/new_client/templates
. I keep the templates directory within new_client because it's clear that the template files are for new client library generation.
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 think I actually misread the original directory structure. Did you have it in generation/templates
already? I thought it was in templates
parallel to generation
. In that case, sorry for the confusion.
@@ -29,6 +37,22 @@ docs/ | |||
api_key | |||
|
|||
# Python utilities | |||
*.pyc |
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.
pyc is covered by *.py[cod]
|
||
monorepo/ |
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.
This moved to the end.
@@ -0,0 +1,24 @@ | |||
# Copyright 2021 Google LLC |
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 prefer to place template files in a separate directory than scripts files.
Cont of #8257. generation/new_client/README.md is the usage document.
#8519 is an example output of this script. The pull request to create a new module.
suztomo@suztomo:~/google-cloud-java/generation/new_client$ python3.9 new-client.py generate --api_shortname=apikeys --proto-path=google/api/apikeys --name-pretty="API Keys API" --product-docs="https://cloud.google.com/api-keys/" --api-description="API Keys lets you create and manage your API keys for your projects." --release-level=preview --transport=grpc --language=java --monorepo-url="https://github.com/googleapis/google-cloud-java"