Coding standards

  • Code should be readable

  • All lab members should be familiar with principles of readable coding:

  • Code should be modular

    • Functions should do a single thing that is clearly expressed in the name of the function
    • Functions should include a docstring that clearly specifies input and output
  • Code should be portable

    • Any absolute paths should be specified as a variable in a single location, or preferably as a command line argument
    • Any required environment variables should be clearly described
    • Any non-standard requirements (e.g. Python libraries not available through PYPI) should be described with instructions on how to install
  • Important functions should be tested