Conda packaging of a new plugin

I appreciate the developer docs are in flux so this question might in part just be about updating
https://docs.qiime2.org/2024.2/plugins/developing/

Quoting:

There are several high-level steps to registering a QIIME 2 plugin:

  1. A QIIME 2 plugin must define one or more Python 3 functions that will be accessible through QIIME.
  2. The plugin must be a Python 3 package that can be installed with setuptools.
  3. The plugin must then instantiate a qiime2.plugin.Plugin object and define some information including the name of the plugin and its URL. In the plugin package’s setup.py file, this instance will be defined as an entry point.
  4. The plugin must then register its functions as QIIME 2 Actions, which will be accessible to users through any of the QIIME 2 interfaces.
  5. Optionally, the plugin could be distributed through Anaconda or pypi as that will simplify installation for QIIME 2 users.

These steps are covered in detail below.

I have written a proof of principle / minimal viable product first iteration of a plugin which I have been testing locally at the command line (i.e. steps 1 to 4). Next is packaging for distribution, but point 5 is apparently out of date and there are no further details below.

I am familiar with PyPI packaging, but given Qiime2 nor even the q2-types are on PyPI, it seems odd to put a Qiime2 plugin there when its dependencies are not available.

Should I be working from Publishing a Plugin on Library — QIIME 2 Developer Documentation documentation instead? Thank you!

Hi @peterjc, We're uncertain at the moment what the fate of the current library.qiime2.org is going to be. @ebolyen and I were discussing some options today that might be simpler alternatives.

What I recommend doing is documenting how to install your plugin in one of our environments. For example, if your functionality is amplicon-related, have your users install the amplicon distribution using the instructions here. Then, have them activate that environment and install your plugin (using pip, conda, or whatever makes sense for your plugin). Finally, to share with the community, I recommend posting about your plugin in the Community Contributions category of the forum.

I'm going to have an example of this whole process for one of the plugins that my lab is developing coming soon, and I have some notes on our recommendations (essentially the same info I provided here) in our new QIIME 2 Contributing Guidelines.

As you can see, a lot of our developer support is in flux right now as we're working to better support the QIIME 2 developer community. Thanks again for your patience through this process, and for your interest in developing QIIME 2 plugins! Looking forward to seeing what you're working on!

Thanks @gregcaporaso. I understand that the Qiime2 library is in limbo, and so you won’t be issuing security tokens for use with action-library-packaging for uploading to the qiime2 conda channel.

Are you still accepting community packages into Package repository for qiime2 :: Anaconda.org by another route?

I have no wish to setup my own conda channel, and believe bioconda and condaforge wouldn’t accept a qiime2 plugin without also having its qiime2 dependencies in a default channel.

That seems to leave using PyPI with a dependency on qiime2 libraries which cannot be met from PyPI. Presumably as long as the user has installed Qiime2 first and has it active, pip install should work… I’ll try that.

Thanks.

Update: Released on PyPI, but installation requires some non-Python dependencies so this isn't as easy as it could be with conda.

P.S. Easy to guess from my GitHub profile, but the plugin is q2-thapbi-pict which currently wraps the initial stages of the amplicon pipeline in my tool THAPBI PICT.

2 Likes

Hey @peterjc,

We don't have a definitive replacement for this right at the moment. However I have a thought about how we can potentially get this to work without particular effort on your part. I'm going to run some experiments to see.

Would you mind if I sent a PR adding a few CI-related things to your repo sometime in the next day or two?


In the interim, I think your current readme file is very understandable for getting things installed.

More soon!

1 Like

Sure (I'm guessing this would be adding a conda recipe in the style of the official plugins), and thanks!

2 Likes

Sure (I'm guessing this would be adding a conda recipe in the style of the official plugins), and thanks!

Exactly :slight_smile: (also some github actions which will build the above)

1 Like