Exemplo n.º 1
0
    def on_list_view_clicked(self, index):

        element = self.elements[index.row()]
        self.hide()
        self.selected_element_window.set_element(element)
        self.selected_element_window.set_registered(
            installer.is_registered(element))
        self.selected_element_window.show()
Exemplo n.º 2
0
def test_install_element():
    """Install an element properly

    This method installs and registers element along with its dependencies and verifies
    their registration on the system.
    """
    installer.install(ELEMENT)
    for element in DEPENDENCIES:
        assert installer.is_registered(element)
Exemplo n.º 3
0
def test_uninstall_element():
    """Uninstall an element properly

    This method removes and unregisters grandparent along with its dependents and verifies
    their registration on the system.
    """
    installer.uninstall(PARENT, clean=True)
    installer.uninstall(GRANDPARENT)
    for element in DEPENDENCIES:
        assert not installer.is_registered(element)
Exemplo n.º 4
0
    def update(self):

        self.list_view.clear()
        self.elements = list(installer.list_all_elements().keys())
        for element in self.elements:
            element_item = QtWidgets.QListWidgetItem(element)
            if installer.is_registered(element):
                element_item.setBackground(QtGui.QColor("#2ecc71"))
            element_item.setSelected(False)
            element_item.setIcon(self.default_icon)
            self.list_view.addItem(element_item)
Exemplo n.º 5
0
                              commit=args["commit"],
                              suppress_dump=args["dump"])

        elif args["uninstall"]:
            installer.uninstall(element=args["uninstall"], force=args["force"])

        elif args["dep"]:
            dep = installer.get_dependencies(args["dep"])
            print("\n".join(dep) if dep else None)

        elif args["list"]:
            all_elements = installer.list_all_elements().keys()
            print("SST Elements".ljust(25), "Registered")
            print("-" * 41)
            for element in all_elements:
                if installer.is_registered(element):
                    # print check mark (✓)
                    print(f"{element.ljust(28)} \033[32m✓\033[0m")
                else:
                    print(element)

        elif args["registered"]:
            if args["registered"] == "all":
                print("\n".join(installer.list_registered_elements()))
            else:
                print(installer.is_registered(args["registered"]))

        elif args["info"]:
            print("\n".join(installer.get_info(args["info"])))

        elif args["tests"]: