You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On running the plugin update process workflow, we found 499 public plugins (i.e., plugins that are neither hidden nor blocked) on the hub. This was unexpected, as PyPI lists only 496 plugins in total, and the npe2api lists 483.
The reason for this discrepancy is due to duplicate entries for some plugins in the Napari Hub. For example, the plugin anchor-droplet-chip appears twice: once as anchor-droplet-chip and once as anchor_droplet_chip, even though both refer to the same name and version of the plugin.
Why is this happening?
The issue arises from how plugin data is retrieved and processed. The workflow fetches plugin list from the npe2 API, where the plugin anchor_droplet_chip is listed with underscores. However, we also have an old entry for anchor-droplet-chip from when PyPI was used as the data source. This older entry should have been marked as stale, since it doesn’t match the entry from npe2api (the new source of truth for the latest plugin version).
To prevent problems caused by intermittent issues with PyPI returning empty lists (which led to the deletion of all plugins on the hub multiple times), we added an extra check before removing any plugin. This check ensures that a plugin is only removed if it is not considered as active by npe2api. (ref: https://github.com/napari/npe2api/blob/main/public/classifiers.json)
However, the issue is that the list we use for this check contains entries with hyphenated names, like pypi (eg. anchor-droplet-chip), and not the underscored versions (e.g., anchor_droplet_chip). As a result, the duplicate entry with underscores is skipped for deletion, and continues to be retained.
TLDR: The difference in how certain plugins are named in different parts of the npe2api is resulting in duplicate entries.
The text was updated successfully, but these errors were encountered:
Description
On running the plugin update process workflow, we found 499 public plugins (i.e., plugins that are neither hidden nor blocked) on the hub. This was unexpected, as PyPI lists only 496 plugins in total, and the npe2api lists 483.
The reason for this discrepancy is due to duplicate entries for some plugins in the Napari Hub. For example, the plugin anchor-droplet-chip appears twice: once as
anchor-droplet-chip
and once asanchor_droplet_chip
, even though both refer to the same name and version of the plugin.Why is this happening?
The issue arises from how plugin data is retrieved and processed. The workflow fetches plugin list from the npe2 API, where the plugin
anchor_droplet_chip
is listed with underscores. However, we also have an old entry foranchor-droplet-chip
from when PyPI was used as the data source. This older entry should have been marked as stale, since it doesn’t match the entry from npe2api (the new source of truth for the latest plugin version).To prevent problems caused by intermittent issues with PyPI returning empty lists (which led to the deletion of all plugins on the hub multiple times), we added an extra check before removing any plugin. This check ensures that a plugin is only removed if it is not considered as active by npe2api. (ref: https://github.com/napari/npe2api/blob/main/public/classifiers.json)
However, the issue is that the list we use for this check contains entries with hyphenated names, like pypi (eg.
anchor-droplet-chip
), and not the underscored versions (e.g.,anchor_droplet_chip
). As a result, the duplicate entry with underscores is skipped for deletion, and continues to be retained.TLDR: The difference in how certain plugins are named in different parts of the npe2api is resulting in duplicate entries.
The text was updated successfully, but these errors were encountered: