How to use modified plugin in CLI or artifact API

I have a modified version of q2-demux that I would like to test. I want view the webpage that comes up when you view the resultant qzv, by running the following command:

qiime demux summarize \
  --i-data demux.qza \
  --o-visualization demux.qzv

My questions are:

How can I modify a q2cli installation (preferably in a conda env) so that it uses my modified demux implementation? (this is preferred)

OR

Modify the q2 artifact API so it uses my modified demux?

Hi @mahermassoud!

QIIME 2 plugins are discovered via Python entry-points. We’re in the process of writing some new docs which will explain this in more detail, but the long-short of it is, if you have the plugin installed then it will be discovered automatically.

I’m going to assume some familiarity with development and git/GitHub, let me know if you are unfamiliar.

I would recommend cloning the source repo if you haven’t already. We have some Makefiles to make development easier. I would also do this all in a separate QIIME 2 conda environment so that if something goes wrong it’s easy to back out of.

We are in the middle of changing a bunch of metadata-related functionality system-wide, so you may want to run the following in the repo first:

git checkout 2017.12.0
git checkout -b my_changes

That will back you up to the last release, and then create a new branch off of that to make any edits you want.

Then you should be able to run:

make dev

which will build any assets and install the python package to your environment, where QIIME 2 will discover the entry-point.

The Artifact API will always match your changes, and so will q2cli (the one exception is if you change the interface of the plugin, then you may need to run qiime dev refresh-cache for q2cli to see those particular changes).

Let me know if that makes sense!

Hi @ebolyen

That was very helpful. Thanks!

2 Likes