Closed drewrisinger closed 5 years ago
That can be obtained with conda list or running that code in the python repl. The issue is to which tool the flag should be added. Why not dashboard, browser, or compile?
artiq_run
and _master
are fine by me. Why not just add it to verbosity_args()
? That covers a lot.
Maybe rename verbosity_args
to e.g. common_args
then?
@sbourdeauducq That would require a fair amount of refactoring, though I agree with the idea. A quick scan of the repo shows ~15 files where verbosity_args
is used, not counting code built on top of it.
Also, processing the --version
flag could be abstracted to some common function, maybe something like (in artiq.tools
):
def process_common_args(cmd_arguments: argparse.Namespace):
"""Process common ARTIQ arguments."""
if cmd_arguments.version:
# print version
init_logger(cmd_arguments)
Edit: removed bind
processing b/c needs special return, doesn't process in place
See #1181 for related PR.
Pending approval on #1181
When bug reporting, it's useful to have an idea what ARTIQ version is causing the issue. I suggest adding a
--version
flag toartiq_run
orartiq_master
to print the version number.It could be added elsewhere, but this seems one of the easiest places.
Implementation (neglecting adding flag to argparse):