gromero commented on a change in pull request #9229:
URL: https://github.com/apache/tvm/pull/9229#discussion_r735726417
##########
File path: apps/microtvm/zephyr/template_project/microtvm_api_server.py
##########
@@ -229,40 +229,69 @@ def _get_nrf_device_args(options):
PROJECT_OPTIONS = [
server.ProjectOption(
"extra_files_tar",
+ optional=["generate_project"],
+ type="str",
help="If given, during generate_project, uncompress the tarball at
this path into the project dir.",
),
server.ProjectOption(
- "gdbserver_port", help=("If given, port number to use when running the
local gdbserver.")
+ "gdbserver_port",
+ help=("If given, port number to use when running the local
gdbserver."),
+ optional=["open_transport"],
+ type="int",
),
server.ProjectOption(
"nrfjprog_snr",
+ optional=["open_transport"],
+ type="int",
help=("When used with nRF targets, serial # of the attached board to
use, from nrfjprog."),
),
server.ProjectOption(
"openocd_serial",
+ optional=["open_transport"],
+ type="int",
help=("When used with OpenOCD targets, serial # of the attached board
to use."),
),
server.ProjectOption(
"project_type",
- help="Type of project to generate.",
choices=tuple(PROJECT_TYPES),
+ required=["generate_project"],
+ type="str",
+ help="Type of project to generate.",
+ ),
+ server.ProjectOption(
+ "verbose",
+ optional=["build"],
+ help="Run build with verbose output.",
+ type="bool",
),
- server.ProjectOption("verbose", help="Run build with verbose output.",
choices=(True, False)),
server.ProjectOption(
"west_cmd",
+ optional=["generate_project"],
+ default="python3 -m west",
Review comment:
I was not totally sure at first, but I thought it would be kind to let
the user known what the default is here.
I've changed it as you suggested and now it uses `sys.executable`. So, done
in
https://github.com/apache/tvm/pull/9229/commits/efbc2803a2f5c4775a4d6c0019e3ce0d3e262718
I also took the chance to add `default` value to the help message in
https://github.com/apache/tvm/pull/9229/commits/9bf6643bd083a006034b87067d4f3a192c7287fe
so now, for instance, `west_cmd` is displayed to the user like:
```
west_cmd=WEST_CMD
path to the west tool. If given, supersedes both
the zephyr_base option and ZEPHYR_BASE environment variable. Defaults to
'/usr/bin/python3 -m west'.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]