The rest API used by napari to query plugins
- The fetch action is triggered by:
- any push to the
main
branch - a cron job every 10 minutes
- a
workflow_dispatch
triggered manually from the actions page - TODO: a comment on an issue that says
please re-index
(or something like that)
- any push to the
- When triggered, the fetch action
- installs
npe2
- calls
npe2 fetch --all -o public/manifest
which- fetches all current napari plugin manifests
- places them into the
public/manifest
directory - records any fetch errors in
public/manifest/errors.json
- runs
scripts/reindex.py
which validates the manifests and builds any aggregates/indices. - commits these changes to the
main
branch usinggit-auto-commit-action
- installs
- This triggers vercel to build the (fully static) API and deploy to https://npe2api.vercel.app
- Endpoints:
- https://npe2api.vercel.app/api/plugins
- map of {plugin_names -> version}
- https://npe2api.vercel.app/api/summary
- all basic plugin info needed to populate the plugin browser in napari
- https://npe2api.vercel.app/api/manifest/{plugin-name}
- the full manifest for a given plugin
- https://npe2api.vercel.app/api/conda
- map of {pypi_name -> conda_channel/package_name}
- https://npe2api.vercel.app/api/conda/{plugin-name}
- conda info for a plugin. name is pypi_name, not conda-name
- https://npe2api.vercel.app/errors.json
- errors encountered during the last fetch
- https://npe2api.vercel.app/readers.json (example ... may change)
- lookup of filename pattern to reader
- https://npe2api.vercel.app/api/plugins
to run the next.js app locally:
git checkout https://github.com/napari/npe2api.git
cd npe2api
npm i
npm run dev