-
Notifications
You must be signed in to change notification settings - Fork 18
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
Ensure pypi-normalized names when fetching from npe2api #1335
base: main
Are you sure you want to change the base?
Conversation
data-workflows/plugin/processor.py
Outdated
pypi_plugin_version = pypi_latest_plugins.get(name) | ||
if pypi_plugin_version == version: | ||
continue | ||
|
||
if pypi_plugin_version is None and is_plugin_active(name, version): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we are fetching data from npe2api and not pypi, could we simply remove the check for is_plugin_active
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think we can remove it. Do you mean in addition to the other changes here, or instead?
I still think it makes sense to do the PyPI normalization to ensure a single version of each plugin. In prod I think this also gives continuity with past versions (though I'm not sure this really matters).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this check in bcbdd73. The check is then unused so I removed the code and tests with it. I'm happy to do whatever is cleanest here 😅.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we removed the is_plugin_active
check, it should also take care of removing the duplicate entry. So one of those checks should be enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree the normalization of the names would be nice to have. But if we go down that route, we should also normalize the names in results returned by npe2api, as all of them were not normalized. ex: AlveolEye
, acquifer-napari
.
I'm not sure why the Push Remote Dev workflow is failing. It looks okay to me in Terraform. |
Description
This coerces npe2api names to be PyPI-normalized. Thanks to @manasaV3 for debugging the issue and @neuromusic for the link to the normalization docs.
We may want to also fix this in npe2api, but I'm not sure the consequences of changing that right now.
Closes #1334