Skip to content

IDAES v2 code cleanup

Andrew Lee edited this page Apr 15, 2022 · 9 revisions

Checklist

  • Run Black
  • Run pylint
  • Open PR in IDAES/idaes-pse
  • Update IDAES/examples-pse#109 with what needs to be updated in the examples to track the changes introduced by the PR

Code formatting

Black

  • Make sure a stable release of Black is used
  • Run Black with default options (we can bikeshed on the line length later)
python -m pip install black=22.1.0
black path/to/dir

Commits with black

  • bdf074f41a07efbe13559d1a7b6c629d3e1971b0 (PR #759)
  • 5ff6a842d8550e31b3a13f797f8a1680eba81fdb (PR #766)
  • 6b9181244449d41adb3266ece9cc88ab5f858b1a (PR #773)
  • 8300c28d8b70d1cc4517b32cc4c79b96bf355b2b (PR #773)
  • 04d782572013a427cf8231207d7a85508eb93b09 (PR #775)
  • b71d335f558d852a50c02a60e66b485f05404c63 (PR #790)
  • 096f2225882004716f1c368f29ac1fe45b51c2a8 (PR #802)
  • 1e16549083f116a7b6484ea58252de745e7a9c71 (PR #808)

pylint

  • pylint should be installed already as part of requirements-dev.txt
  • pylint behavior can change dramatically between even micro releases of pylint and astroid (the underlying package used by pylint to parse Python syntax), so it's important that the supported version is the same (requirements-dev.txt specifies the right versions)
pylint --rcfile=./.pylint/pylintrc --disable=W,C,R,I --output-format=idaes_reporters.MultiReporter path/to/dir
Clone this wiki locally