Skip to content

General Coding Standards

Andrew Lee edited this page May 19, 2021 · 3 revisions

The following general standards apply to all IDAES Code:

  • All code in IDAES repositories must begin with the IDAES Copyright header.
  • Code should follow PEP-8 Style Guide: https://www.python.org/dev/peps/pep-0008/. pylint is used as part of the automated testing procedure and code must pass these test. Developers are strongly encouraged to use pylint or another linter when developing code.
  • Docstrings should use Google style formatting: https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html.
  • Commenting of code is strongly encouraged.
  • Class and variable names should be descriptive, and use of Pyomo docstrings on all components is encouraged. Aliases may be used within the code to shorten long names (fully-qualified names of IDAES components end up being very long).
  • All code must be accompanied by documentation and tests. More details on the expectations for these is provided elsewhere in the testing standards.
Clone this wiki locally