Coding guidelinesΒΆ

Glue is written entirely in Python, and we abide by the following guidelines:

  • All code should be Python 2 and 3-compatible. We do this by using the six package, which we bundle in glue.external.six.
  • We follow many of the same guidelines as the Astropy project, which you can find here.
  • We use absolute imports for most of the code in Glue, with the exception of tests, which are allowed to import the classs/functions they are testing using relative imports. This means that if we need to move files and their associated tests around, the tests will still work without having to change the imports.
  • All Qt-specific code should live in qt/ sub-directories (see Qt-specific code for more details).
  • Docstrings should be written using the numpydoc format, which is described in detail here.