Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't choke on missing pip url #306

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading