-
Notifications
You must be signed in to change notification settings - Fork 86
Creating aspect
option (ALL, CODE, PACKAGE)
#475
Creating aspect
option (ALL, CODE, PACKAGE)
#475
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.
In general looks good, with several comments.
artman/pipelines/grpc_generation.py
Outdated
|
||
def get_tasks(self, **kwargs): | ||
tasks = self.get_grpc_codegen_tasks(**kwargs) | ||
tasks += self._get_publish_tasks(**kwargs) | ||
return task_utils.instantiate_tasks(tasks, kwargs) | ||
|
||
def get_grpc_codegen_tasks(self, **kwargs): | ||
if self.language == 'java': |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -179,6 +179,11 @@ def parse_args(*args): | |||
type=str, | |||
help='[Required] Name of the artifact for artman to generate. Must ' | |||
'match an artifact in the artman config yaml.') | |||
parser_generate.add_argument( | |||
'--aspect', |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -116,8 +117,19 @@ def execute(self, language, toolkit_path, descriptor_set, service_yaml, | |||
if service_yaml: | |||
args = args + ['--service_yaml=' + os.path.abspath(service_yaml)] | |||
args = args + gapic_args | |||
|
|||
gapic_artifact = '' | |||
if aspect == 'ALL': |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -54,7 +54,7 @@ | |||
} | |||
|
|||
|
|||
def load_artifact_config(artman_config_path, artifact_name): | |||
def load_artifact_config(artman_config_path, artifact_name, aspect=None): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
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.
LGTM, but I still don't like the huge get_grpc_codegen_tasks
method.
@@ -179,6 +179,11 @@ def parse_args(*args): | |||
type=str, | |||
help='[Required] Name of the artifact for artman to generate. Must ' | |||
'match an artifact in the artman config yaml.') | |||
parser_generate.add_argument( | |||
'--aspect', |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
artman/pipelines/grpc_generation.py
Outdated
|
||
def get_tasks(self, **kwargs): | ||
tasks = self.get_grpc_codegen_tasks(**kwargs) | ||
tasks += self._get_publish_tasks(**kwargs) | ||
return task_utils.instantiate_tasks(tasks, kwargs) | ||
|
||
def get_grpc_codegen_tasks(self, **kwargs): | ||
if self.language == 'java': |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
I split apart the long function, PTAL |
This will only work for C# so far; after googleapis/gapic-generator#2166 , it will work for Java too.