예제 #1
0
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)
예제 #2
0
def lab_run(file_path):
    app = LabApp()
    app.run(file_path)
예제 #3
0
def lab_new(file_path):
    app = LabApp()
    app.edit(notebook_path=file_path)
예제 #4
0
def lab_new():
    """
    `automagica lab new` creates a new Automagica Lab notebook
    """
    app = LabApp()
    app.new()
예제 #5
0
def lab_new():
    app = LabApp()
    app.new()
예제 #6
0
def test_lab_app():
    app = LabApp()
    assert True
예제 #7
0
    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
예제 #8
0
def test_lab_app():
    """Test launching of Automagica Lab application"""
    app = LabApp()
    assert True
예제 #9
0
    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]