Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 886 Bytes

File metadata and controls

22 lines (17 loc) · 886 Bytes

Script Organization

  • Descriptive header (includes name, affiliation, date, brief description of script purpose)
  • Parameters specified at top of script
  • Files loaded at top of script
  • Functions abstracted into separate script
  • Organized into sections

Readability

  • Repetitive code refactored into functions
  • All functions have docstrings
  • Descriptive in-line comments
  • Correct casing for variables and functions: camelCase (R) or snake_case (Python)
  • Descriptive variable and function names – variables should be nouns and functions should be verbs
  • Used a linter

Generalizability

  • No hardcoded values (all integers, strings, etc. should be specified at the top of the script in the “Parameters” section)
  • Use relative file paths
  • Consistent output file naming (e.g. “example-filename.tif”)