Skip to content

Getting Started

Josh Holland edited this page Sep 6, 2019 · 2 revisions

See also the frontend Getting Started page.

Libraries in use

Amongst others:

The tests use unittest, with some Hypothesis thrown in for good measure.

Where to start

The entrypoint for the application is cogs/main.py.

Conventions

  • The application has a singleton Database God-object, which lives for the lifetime of the application; this provides convenience methods to interact with the database, such as finding projects with a particular ID.
  • Various things (e.g. Scheduler, Database) inherit from a custom logging mixin, meaning that you can call .log() on them and it will go to the "cogs" logger – note that this mixin only accepts two arguments, so you have to format the log message with any variables yourself.
Clone this wiki locally