From 0a8523c47fa4266099c7372d306f6816caf90dcb Mon Sep 17 00:00:00 2001 From: Leopold Talirz Date: Sun, 17 Mar 2024 00:51:07 +0100 Subject: [PATCH] fix: don't choke on missing pip url Web site build broke because one package did not specify pip_url --- aiida_registry/__init__.py | 2 +- aiida_registry/make_pages.py | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/aiida_registry/__init__.py b/aiida_registry/__init__.py index cda3442b..43017cfe 100644 --- a/aiida_registry/__init__.py +++ b/aiida_registry/__init__.py @@ -134,7 +134,7 @@ "Development Status :: 7 - Inactive": "inactive", } -status_no_pip_url_allowed = {"planning", "pre-alpha", "alpha"} +status_no_pip_url_required = {"planning", "pre-alpha", "alpha"} ## dictionary of human-readable entrypointtypes entrypointtypes = {k: v["longname"] for k, v in entrypoint_metainfo.items()} diff --git a/aiida_registry/make_pages.py b/aiida_registry/make_pages.py index c73d3eb1..a1c8a790 100644 --- a/aiida_registry/make_pages.py +++ b/aiida_registry/make_pages.py @@ -18,7 +18,7 @@ entrypointtypes, main_entrypoints, status_dict, - status_no_pip_url_allowed, + status_no_pip_url_required, ) entrypoints_count = defaultdict(list) @@ -120,11 +120,10 @@ def global_summary(): def get_pip_install_cmd(plugin_data): - if ( - "pip_url" not in plugin_data - and plugin_data["development_status"] in status_no_pip_url_allowed - ): - return "See source code repository." + if "pip_url" not in plugin_data: + if plugin_data["development_status"] in status_no_pip_url_required: + return "See source code repository." + return "Missing, see source code repository" pip_url = plugin_data["pip_url"]