Skip to content

CodingGuidelines

parcollet edited this page Apr 16, 2012 · 7 revisions

TRIQS coding guidelines

Here are the rules for code to be acceptable for incorporation in TRIQS.

Language

  • Python >= 2.7.x
  • C++. Some constructions of C++11 are accepted in the user code (See below).
  • f90 [ if necessary, not recommended ]

Libraries

The libraries that can be used in TRIQS are given in an exhaustive list below. There are two reasons for this restriction :

  • Since TRIQS is GPL, we must use only libraries with boost or GPL licence. In particular don't use non-free software, e.g. ALPS, Numerical Recipes, as they are not compatible with the GPL licence.
  • There is also a portability & installation issue. Libraries must be available on every platform that we use, and easy to install (i.e. in standard packages).
  • There is also obviously a quality issue, in particular speed, usability, etc...
  • Here is an exhaustive list of C++ libraries and Python libraries that are used within TRIQS and are recommended. If you plan to contribute or need something else, please contact the developers.

Coding Style

Here are the recommendations for the C++ style.

Clone this wiki locally