Plugin development: visualizer won't "unregister" despite deleting it

My plugin is a method, so I removed dummyvisualizer.py and removed the visualizer function registration in setup.py. When I "pip install -e ." you can see the visualizer "mapping-viz" is still there but there is not anything in my project saying "mapping-viz"... Is there something I'm missing as far as removing functionality or reinstalling the plugin? I'm new to plugin dev, so more information/tips the better :slight_smile: Thanks!!! -Jennifer

1 Like

The CLI caches your deployment to make the commands faster for users. You can call

qiime dev refresh-cache

to have it re-evaluate the cache. You can also set the environment variable Q2CLIDEV=1 so that the cache is rebuilt on every command (useful while developing).

3 Likes

@Jennifer_Fouquier, adding to @ebolyen’s answer:

When you’re developing a plugin and you make changes to it, you’ll need to run qiime dev refresh-cache to see those latest changes reflected in the CLI. Or you can set the environment variable that @ebolyen described, which will do that for you automatically. This will slow down the CLI while developing; it is much faster when a user installs release versions of QIIME 2 and plugins.

This manual refreshing of the cache is necessary because the CLI caches info about the currently installed plugins, but it can’t detect when changes are made to a plugin’s code while under development. This “force refresh” of the cache should only be necessary while developing a plugin; when users install QIIME 2 and your released plugin (i.e. no longer in development), the cache will automatically be updated.

We’ll have some developer documentation on this topic in the future.

Thanks!!! That makes sense. I have some more qs too, but I’ll make a new post for clarity.

3 Likes