datajoint/element-array-ephys

`element_interface` not in requirements

sneakers-the-rat opened this issue · 2 comments

element_interface is imported from:

from element_interface.utils import find_root_directory, find_full_path, dict_to_uuid

but it's not in the requirements:
https://github.com/datajoint/element-array-ephys/blob/main/requirements.txt

so the module can't be imported.

Thanks for the report @sneakers-the-rat. We opted not to keep element-interface in the requirements.txt because element-interface is used to install third-party packages, some of which are not on PyPI. From what I understand, all packages within the requirements.txt or setup.py must be published to PyPI in order for the package of interest to be published to PyPI. Please let us know if you have any suggestions as we are trying to find a cleaner way of setting up these dependencies.

you can require something from git in a requirements.txt file!

package-name @ git+https://github.com/whatever/repo@branchname

see https://pip.pypa.io/en/stable/topics/vcs-support/

I have several packages on PyPI that have git dependencies, so it's definitely allowed! for example: https://github.com/wehr-lab/autopilot/blob/637064da3d10e9eeb186483827c8b7dadaa2f356/pyproject.toml#L55

edit: coming back embarassed to say that while i have been publishing packages on pypi that have git dependencies for awhile, it apparently was only because of them being implicitly in a requirements.txt file (and thus not in the wheel's metadata), and when packaged correctly you are right that you can't put them up there! 🤦