vlasmirnov / MAGUS

Graph Clustering Merger
MIT License
32 stars 13 forks source link

setup.py installs non-namespaced modules #31

Open marcelm opened 6 months ago

marcelm commented 6 months ago

Hi, I’m reviewing the Bioconda recipe for MAGUS over at https://github.com/bioconda/bioconda-recipes/pull/46022 and briefly looked at the repository. I noticed a relatively typical problem that I thought I’d mention.

setup.py contains the line py_modules = py_modules=['magus', 'magus_configuration', 'version'],. The third entry in that list makes it so that a version module is available "site-wide" (not under the magus package). That is, I can write this to get the magus version:

   python3 -c 'import version; print(version.__version__)'

This could easily conflict with other packages and result in weirdness. You may want to consider not using py_modules at all and instead arrange the code so that everything is located under a magus package (=directory with __init__.py).

RuneBlaze commented 6 months ago

Saying this for other contributors: I have been dormant for a while but happy to handle this in today or tomorrow. Ideally everything moves under magus (I don't think we need to do source layout yet).

I don't have much context on the bioconda submission, so I also don't want to stand in the way, but I can contribute 🤔 .

lrauschning commented 6 months ago

Hi, I changed the version readin to this as a fix for some issues I had been having with the way it was read in before (don't remember what they were to be honest). Had been meaning to get around to repackaging MAGUS as a single python module because of some issues I had been having installing it in containers, and managed to finish that up today (see #33). Once vlad or @RuneBlaze has taken a look I can make a release and push it to conda, that should resolve the issue, I think.

RuneBlaze commented 6 months ago

@lrauschning I will happily be the second pair of eyes over the weekend (US time), but don't let me block the process if the stars align and you people would just like to proceed with publishing to bioconda -- I will do a double check on my end on the installation.