User Tools

Site Tools


wiki:documentation:computing:codingtips

Coding Tips

Debugging

Adding dependencies

When should you add a dependency (aka a package) to your project?

Why should we be careful about dependencies

  • The more dependencies you have, the easier your code will break when you update packages.
  • It is possible to introduce unsolvable dependency conflicts (eg. a package depends on numpy 1.17 and another on 1.15)
  • you introduce bugs from potential unvetted, non-maintained packages

How to evaluate a package If you need a certain functionality from a new package, ask the following questions:

  • is this an official package (numpy, scipy, pandas, matplotlib, …) and maintained by more than one person? This is easy to see on github: private packags have only 1 contributor
  • Will this be of net-benefit to my project or can I find another solution?
  • when was the last update to the package?
  • Is there a ReadMe or tutorial that indicates this code is widely used and actually tested?
  • is the version number >1 (this indicates a 'stable release', meaning they don't intend to majorly change things like the package structure anymore)
  • What are the dependencies of the package? You usually find this in the setup.py file or in requirements.txt in the github or on the documentation webpage
wiki/documentation/computing/codingtips.txt · Last modified: 2020/08/13 03:36 by mscholz

Bitnami