mirror of https://github.com/m-labs/artiq.git
frontend: add --version to common tools
This commit is contained in:
parent
f8a7e278b8
commit
4416378d21
|
@ -9,6 +9,7 @@ import logging
|
|||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from quamash import QEventLoop
|
||||
|
||||
from artiq import __version__ as artiq_version
|
||||
from artiq import __artiq_dir__ as artiq_dir
|
||||
from artiq.tools import (add_common_args, atexit_register_coroutine,
|
||||
get_user_config_dir)
|
||||
|
@ -21,6 +22,9 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
def get_argparser():
|
||||
parser = argparse.ArgumentParser(description="ARTIQ Browser")
|
||||
parser.add_argument("--version", action="version",
|
||||
version="ARTIQ v{}".format(artiq_version),
|
||||
help="print the ARTIQ version number")
|
||||
parser.add_argument("--db-file", default=None,
|
||||
help="database file for local browser settings "
|
||||
"(default: %(default)s)")
|
||||
|
|
|
@ -4,6 +4,7 @@ import os, sys, logging, argparse
|
|||
|
||||
from sipyco import common_args
|
||||
|
||||
from artiq import __version__ as artiq_version
|
||||
from artiq.master.databases import DeviceDB, DatasetDB
|
||||
from artiq.master.worker_db import DeviceManager, DatasetManager
|
||||
from artiq.language.environment import ProcessArgumentManager
|
||||
|
@ -16,6 +17,9 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
def get_argparser():
|
||||
parser = argparse.ArgumentParser(description="ARTIQ static compiler")
|
||||
parser.add_argument("--version", action="version",
|
||||
version="ARTIQ v{}".format(artiq_version),
|
||||
help="print the ARTIQ version number")
|
||||
|
||||
common_args.verbosity_args(parser)
|
||||
parser.add_argument("--device-db", default="device_db.py",
|
||||
|
|
|
@ -5,6 +5,7 @@ import struct
|
|||
|
||||
from sipyco import common_args
|
||||
|
||||
from artiq import __version__ as artiq_version
|
||||
from artiq.master.databases import DeviceDB
|
||||
from artiq.coredevice.comm_kernel import CommKernel
|
||||
from artiq.coredevice.comm_mgmt import CommMgmt
|
||||
|
@ -14,6 +15,9 @@ from artiq.coredevice.profiler import CallgrindWriter
|
|||
def get_argparser():
|
||||
parser = argparse.ArgumentParser(description="ARTIQ core device "
|
||||
"management tool")
|
||||
parser.add_argument("--version", action="version",
|
||||
version="ARTIQ v{}".format(artiq_version),
|
||||
help="print the ARTIQ version number")
|
||||
|
||||
common_args.verbosity_args(parser)
|
||||
parser.add_argument("--device-db", default="device_db.py",
|
||||
|
|
|
@ -13,6 +13,7 @@ from sipyco.pc_rpc import AsyncioClient, Client
|
|||
from sipyco.broadcast import Receiver
|
||||
from sipyco import common_args
|
||||
|
||||
from artiq import __version__ as artiq_version
|
||||
from artiq import __artiq_dir__ as artiq_dir, __version__ as artiq_version
|
||||
from artiq.tools import atexit_register_coroutine, get_user_config_dir
|
||||
from artiq.gui.models import ModelSubscriber
|
||||
|
@ -23,6 +24,9 @@ from artiq.dashboard import (experiments, shortcuts, explorer,
|
|||
|
||||
def get_argparser():
|
||||
parser = argparse.ArgumentParser(description="ARTIQ Dashboard")
|
||||
parser.add_argument("--version", action="version",
|
||||
version="ARTIQ v{}".format(artiq_version),
|
||||
help="print the ARTIQ version number")
|
||||
parser.add_argument(
|
||||
"-s", "--server", default="::1",
|
||||
help="hostname or IP of the master to connect to")
|
||||
|
|
|
@ -7,6 +7,8 @@ import textwrap
|
|||
from collections import defaultdict
|
||||
from itertools import count
|
||||
|
||||
from artiq import __version__ as artiq_version
|
||||
|
||||
|
||||
def process_header(output, description):
|
||||
if description["target"] != "kasli":
|
||||
|
@ -473,6 +475,9 @@ def process(output, master_description, satellites):
|
|||
def main():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="ARTIQ device database template builder")
|
||||
parser.add_argument("--version", action="version",
|
||||
version="ARTIQ v{}".format(artiq_version),
|
||||
help="print the ARTIQ version number")
|
||||
parser.add_argument("master_description", metavar="MASTER_DESCRIPTION",
|
||||
help="JSON system description file for the standalone or master node")
|
||||
parser.add_argument("-o", "--output",
|
||||
|
|
|
@ -12,6 +12,7 @@ from collections import defaultdict
|
|||
|
||||
from sipyco import common_args
|
||||
|
||||
from artiq import __version__ as artiq_version
|
||||
from artiq import __artiq_dir__ as artiq_dir
|
||||
from artiq.remoting import SSHClient, LocalClient
|
||||
from artiq.frontend.bit2bin import bit2bin
|
||||
|
@ -42,6 +43,10 @@ Prerequisites:
|
|||
plugdev group: 'sudo adduser $USER plugdev' and re-login.
|
||||
""")
|
||||
|
||||
parser.add_argument("--version", action="version",
|
||||
version="ARTIQ v{}".format(artiq_version),
|
||||
help="print the ARTIQ version number")
|
||||
|
||||
common_args.verbosity_args(parser)
|
||||
|
||||
parser.add_argument("-n", "--dry-run",
|
||||
|
|
|
@ -12,6 +12,7 @@ from sipyco.logging_tools import Server as LoggingServer
|
|||
from sipyco.broadcast import Broadcaster
|
||||
from sipyco import common_args
|
||||
|
||||
from artiq import __version__ as artiq_version
|
||||
from artiq.tools import atexit_register_coroutine
|
||||
from artiq.master.log import log_args, init_log
|
||||
from artiq.master.databases import DeviceDB, DatasetDB
|
||||
|
@ -25,6 +26,9 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
def get_argparser():
|
||||
parser = argparse.ArgumentParser(description="ARTIQ master")
|
||||
parser.add_argument("--version", action="version",
|
||||
version="ARTIQ v{}".format(artiq_version),
|
||||
help="print the ARTIQ version number")
|
||||
|
||||
common_args.simple_network_args(parser, [
|
||||
("notify", "notifications", 3250),
|
||||
|
|
|
@ -14,6 +14,7 @@ from llvmlite_artiq import binding as llvm
|
|||
|
||||
from sipyco import common_args
|
||||
|
||||
from artiq import __version__ as artiq_version
|
||||
from artiq.language.environment import EnvExperiment, ProcessArgumentManager
|
||||
from artiq.language.types import TBool
|
||||
from artiq.master.databases import DeviceDB, DatasetDB
|
||||
|
@ -127,6 +128,9 @@ class DummyCCB:
|
|||
def get_argparser(with_file=True):
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Local experiment running tool")
|
||||
parser.add_argument("--version", action="version",
|
||||
version="ARTIQ v{}".format(artiq_version),
|
||||
help="print the ARTIQ version number")
|
||||
|
||||
common_args.verbosity_args(parser)
|
||||
parser.add_argument("--device-db", default="device_db.py",
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import argparse
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
from artiq import __version__ as artiq_version
|
||||
|
||||
|
||||
def get_argparser():
|
||||
|
@ -11,6 +11,9 @@ def get_argparser():
|
|||
description="ARTIQ session manager. "
|
||||
"Automatically runs the master, dashboard and "
|
||||
"local controller manager on the current machine.")
|
||||
parser.add_argument("--version", action="version",
|
||||
version="ARTIQ v{}".format(artiq_version),
|
||||
help="print the ARTIQ version number")
|
||||
parser.add_argument("-m", action="append", default=[],
|
||||
help="add argument to the master command line")
|
||||
parser.add_argument("-d", action="append", default=[],
|
||||
|
|
Loading…
Reference in New Issue