MolSSI/cookiecutter-cms

Where to write the dependency?

xiki-tempula opened this issue · 4 comments

Sorry this is a very simple question, I have selected the

Select dependency_source:
1 - conda-forge

I wonder where should I add dependencies for the installation?
Normally, I would add the dependencies to install_requires in setup.py, but that would mean that the dependency is installed via pip.
I wonder where should I put the dependencies?

Hi @xiki-tempula, you are correct. Any dependencies are added to setup.py.

IIRC, Select dependency_source is for CI. See this test_env.yaml which is used by CI.yaml GitHub Action configuration. Therefore also make sure to update those files when modifying the dependencies in setup.py

See this MolSSI Python Package Best Practice material for more detail.

Thank you.

@radifar is spot on with this.

One caveat I will add is with either Conda option nothing precludes you from editing the dependencies in setup.py. However, if you try to install the package via conda-build (such as with the --local-install option), dependencies which are installed via pip only will raise en error. This level of nuance with conda-build though is one of the reason we moved away from it though, so it should not come up in day-to-day use of the cookiecutter until you deploy to Conda-Forge.

And always feel welcome to ask any question you have, no need to apologize.

@Lnaden Thank you for the further explanation.