Skip to content

Style Guide

matt wilkie edited this page Aug 1, 2017 · 2 revisions

General

Follow the Python Style Guide (PEP 8 and PEP 257).

Option names

All options given to optparse should have the same long name and destination name.

Modules and packages

New packages should be named after the service they are implementing. The package init file must define a string SECTION_HEADER, which gives the section header of the config file that service-specific options are defined in.

Each package must also contain a module named service. The service module must define two items:

  • service_class: alternate name for the service being implemented. For example, service_class = CalendarServiceCL
  • tasks: a dictionary mapping names of tasks (e.g. 'list') to util.Task instances.

Use of util.Task

Each string (or string element of the list) given to the requires keyword must match one of the options given to optparse.

Clone this wiki locally