A well-behaved writer class.

It is important to help readability. Therefore, arte has code conventions.

  • Line indentation is 4 spaces. No Tabs!
  • Maximum line length is 80 characters.
  • Comments should be complete sentences in English.
  • Modules use short, all-lowercase names with underscores (snake_case).
  • Class names use the UpperCamelCase convention.
  • Method names use all-lowercase with underscore (snake_case) convention.
  • Docstrings use the numpydoc convention:

Eclipse Support

  • The Python plugin PyDev for Eclipse has a tool for checking source code on conformity with PEP8 standard. Use it!
  • Set Pydev->Editor->Code Style->Code Formatter->Formatter style=Pydev.Formatter
  • Check Pydev->Editor->Code Analysis->Do Code Analysis
class arte.code_convention.InafIsAnAcronym

Bases: object

InafIsAnAcronym is more readable than INAFIsAnAcronym

So use Inaf, Lbt, Eso and so on in acronyms

class arte.code_convention.NiceWriter(path)

Bases: object

A nice writer.

This class is an example of code styling conventions.

You can do some math:

\[f(x) = x^{-5/3} + \frac{1}{L_0^2}^{-42}\]
Parameters:path (str) – the path of something


Show that 2+3=5

>>> a = 2
>>> b = 3
>>> print(a+b)
A_CLASS_CONSTANT = 'whatever it is, centralize constant here'
public_work(an_argument, an_array, a_keyword='not needed')

One-liner description here.

More detailed description here, using reStructuredText if needed.

  • an_argument (str) – argument description here.
  • an_array (numpy.array) – pass an_array as an array
  • a_keyword (str, default='not needed') – something optional.

k – whatever.

Return type: