def lab_edit(file_path): """ `automagica lab edit <filename>` opens an existing Automagica Lab notebook (.ipynb) for editing """ app = LabApp() app.edit(notebook_path=file_path)
def lab_run(file_path): app = LabApp() app.run(file_path)
def lab_new(file_path): app = LabApp() app.edit(notebook_path=file_path)
def lab_new(): """ `automagica lab new` creates a new Automagica Lab notebook """ app = LabApp() app.new()
def lab_new(): app = LabApp() app.new()
def test_lab_app(): app = LabApp() assert True
url = url.replace("automagica://", "") parts = url.split("/") os.chdir(os.path.expanduser("~")) # Automagica Flow (automagica://flow/new) if parts[0] == "flow": if parts[1] == "new": app = FlowApp() app.run() # Automagica Lab (automagica://lab/new) if parts[0] == "lab": if parts[1] == "new": app = LabApp() app.new() # Automagica Wand (automagica://wand) if parts[0] == "wand": app = WandApp() app.run() # Automagica Bot (automagica://bot/bot_secret/ABCD12345) if parts[0] == "bot": config = Config() if parts[1] == "bot_secret": bot_secret = parts[2] config.values["bot_secret"] = bot_secret
def test_lab_app(): """Test launching of Automagica Lab application""" app = LabApp() assert True
parts = url.split("/") os.chdir(os.path.expanduser("~")) # Automagica Flow (automagica://flow/new) if parts[0] == "flow": if parts[1] == "new": root = AutomagicaTk() _ = FlowApp(root) root.mainloop() # Automagica Lab (automagica://lab/new) if parts[0] == "lab": if parts[1] == "new": app = LabApp() app.new() # Automagica Wand (automagica://wand) if parts[0] == "wand": root = AutomagicaTk() _ = WandApp(root) root.mainloop() # Automagica Bot (automagica://bot/bot_secret/ABCD12345) if parts[0] == "bot": config = Config() # Bot secret specified if parts[1] == "bot_secret": bot_secret = parts[2]