Skip to content

Commit

Permalink
fix: don't choke on missing pip url
Browse files Browse the repository at this point in the history
Web site build broke because one package did not specify pip_url
  • Loading branch information
ltalirz committed Mar 16, 2024
1 parent c306d6a commit 0a8523c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion aiida_registry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()}
Expand Down
11 changes: 5 additions & 6 deletions aiida_registry/make_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
entrypointtypes,
main_entrypoints,
status_dict,
status_no_pip_url_allowed,
status_no_pip_url_required,
)

entrypoints_count = defaultdict(list)
Expand Down Expand Up @@ -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"]

Expand Down

0 comments on commit 0a8523c

Please sign in to comment.