Python Naming Conventions

An outline of Presque Labs naming conventions in code.

Files

lowercase snake .py

raster_scan_area.py, barometer.py

Variables

Standard variables should be camelCase. This includes objects and object properties. Do not use acronyms unless they ubiquitous which is a very short list. No self made acronyms. Shortened versions of words is acceptable. (Freq for Frequency, Accel or Acc for Acceleration, etc.). If an acronym must be used they should also be in camel case as a differentiator.

callFrequency, duration, imuSystemCalibration, errorUid

Constants (things like pin numbers, time constants, etc) should be full uppercase snake

IMU_SYS_CAL, JETSON_RUNTIME_PIN

Classes

Class names should be uppercase starting CamelCase

Telemetry, RasterScanArea

Functions

Functions should be camelCase like standard variables

writeToCsv(), getValues()