kitzeslab / opensoundscape

Open source, scalable software for the analysis of bioacoustic recordings
http://opensoundscape.org
MIT License
136 stars 16 forks source link

Make package available on conda #714

Open louisfh opened 1 year ago

louisfh commented 1 year ago

Should we publish the package on conda/conda-forge?

I think it would be a nice for new users to be able to conda install opensoundscape

louisfh commented 1 year ago

I think an advantage over just publishing on pypi is that non-python dependencies like ffmpeg could be installed.

sammlapp commented 1 year ago

do we have to add anything to our package? For instance, a different format of dependency list? Are there other considerations, or is it just a matter of adding and updating the package?

sammlapp commented 1 year ago

I think an advantage over just publishing on pypi is that non-python dependencies like ffmpeg will be installed.

something I was thinking about recently: now that SoundFinder added more mp3 support, is ffmpeg still a dependency for anything?

(oops didn't mean to close it)

sammlapp commented 1 year ago

The instructions look straightforward but definitely a bit more manual effort than PyPI. I can't tell if we would need to go through this procedure for every package version release, or only once.

NickleDave commented 5 months ago

Hi @sammlapp I'm helping @rhine3 with a bootcamp we're teaching, and wanted to see if it was possible to install opensoundscape from a conda channel

Not that my opinion counts for much but I am a :+1: on making a package on conda-forge, if for no other reason than that it would be possible to install with a single conda install opensoundscape like @louisfh said

Also, for reproducibility, it's not great to have to pip install, since IIUC you want pip to be a last resort you do after you install things with conda--the two package managers don't always play well together. See this post from 2018: https://www.anaconda.com/blog/using-pip-in-a-conda-environment

Running conda after pip has the potential to overwrite and potentially break packages installed via pip. Similarly, pip may upgrade or remove a package which a conda-installed package requires. In some cases these breakages are cosmetic, where a few files are present that should have been removed, but in other cases the environment may evolve into an unusable state.

(Not sure if the situation has improved since then ... but if it's confusing for us as devs then we should minimize the need for a user to think about it)

The instructions look straightforward but definitely a bit more manual effort than PyPI. I can't tell if we would need to go through this procedure for every package version release, or only once.

You are right that putting a package on conda-forge is pretty easy.
Especially if you use grayskull. You do have to re-"render" the binary package that conda-forge makes after every release, but they have a bot that detects this automatically and makes a pull request for you. For example see the feedstock repo for vak here and this PR from the autotick-bot.

There's a tutorial from pyOpenSci here. See also this section of the staged-recipes README (that I find helpful but it can be easy to miss): https://github.com/conda-forge/staged-recipes#grayskull---recipe-generator-for-python-packages-on-pypi

I have like zero bandwidth right now :weary: or I would volunteer to set up a recipe for you -- just wanted to chime in and say this would be very helpful! Esp if there was any way get it done by the third week of May :grin: :sweat_smile:

sammlapp commented 5 months ago

Hi @NickleDave we won't be implementing this on a short time scale, though we'll keep it as a possibility for the future.

Edit: I read that conda post and see the value of conda availability. Still, this isn't on a fast-tracked timeline and I think pip will not cause any issues. If you encounter issues or specific disadvantages of pip install please share.