MolSSI / cookiecutter-cms

Python-centric Cookiecutter for Molecular Computational Chemistry Packages
MIT License
385 stars 89 forks source link

Where to write the dependency? #143

Closed xiki-tempula closed 2 years ago

xiki-tempula commented 2 years ago

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?

radifar commented 2 years ago

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.

xiki-tempula commented 2 years ago

Thank you.

Lnaden commented 2 years ago

@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.

xiki-tempula commented 2 years ago

@Lnaden Thank you for the further explanation.