diff --git a/meggie/configuration.json b/meggie/configuration.json index a416d87b..706c6efd 100644 --- a/meggie/configuration.json +++ b/meggie/configuration.json @@ -1,4 +1,5 @@ { + "id": "meggie", "tabs": [ {"id": "preprocessing", "name": "Preprocessing", diff --git a/meggie/mainwindow/dynamic.py b/meggie/mainwindow/dynamic.py index 78600f84..bd1bf9df 100644 --- a/meggie/mainwindow/dynamic.py +++ b/meggie/mainwindow/dynamic.py @@ -51,13 +51,16 @@ def find_all_package_specs(): continue with open(config_path, "r") as f: config = json.load(f) - if config: + if config and config.get("id"): package_specs[source] = config # add possibly missing fields for package_spec in package_specs.values(): if "name" not in package_spec: - package_spec["name"] = "" + package_spec["name"] = package_spec["id"] + + if "description" not in package_spec: + package_spec["description"] = package_spec.get("name", "") if "author" not in package_spec: package_spec["author"] = "" @@ -462,6 +465,7 @@ def connect_to_handler(button, name): def handler_wrapper(checked): experiment = self.parent.experiment if not experiment: + messagebox(self, "You need to open an experiment first.") return subject = experiment.active_subject