MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / generate_sample_help

Function generate_sample_help

scripts/generate.py:91–118  ·  view source on GitHub ↗
(subparsers, template)

Source from the content-addressed store, hash-verified

89 )
90
91def generate_sample_help(subparsers, template):
92 parser = subparsers.add_parser(
93 template,
94 help="Generate sample project",
95 )
96
97 parser.set_defaults(func=generate_sample(template))
98
99 parser.add_argument(
100 "--name",
101 type=str,
102 help="Name of the sample project",
103 default="SampleTest",
104 )
105
106 parser.add_argument(
107 "--category",
108 type=str,
109 help="Which category the sample project belongs to",
110 default="api",
111 )
112
113 parser.add_argument(
114 "--output-dir",
115 type=str,
116 help="Output Directory: <project_dir>/samples/<category>",
117 default=None,
118 )
119
120def prompt_if_path_exists(output_dir, name):
121 path = os.path.join(output_dir, name)

Callers 1

generate.pyFile · 0.85

Calls 1

generate_sampleFunction · 0.85

Tested by

no test coverage detected