Tools

On this page

PyCharm IDE

NOC DevTeam leverages PyCharm IDE gracefully provided by JetBrains under the terms of OpenSource Support Program.

flake8

NOC CI uses flake8 to enforce code style.

To set up flake8 external tool select Preferences > Tools > External Tools. Press + button. Fill the form:

  • Name: flake8
  • Program: /usr/local/bin/docker
  • Arguments: run –rm -w /src -v $ProjectFileDir$:/src registry.getnoc.com/infrastructure/noc-lint:master /usr/local/bin/flake8 $FileDirRelativeToProjectRoot$/$FileName$
  • Working Directory: $ProjectFileDir$
  • Open console for tool output: Check

Press Ok

To check current file select Tools > External Tools > flake8

black

NOC uses black for automatic code formatting and codestyle enforcing.

To set up black external tool select Preferences > Tools > External Tools. Press + button. Fill the form:

  • Name: black format
  • Program: /usr/local/bin/docker
  • run –rm -w /src -v $ProjectFileDir$:/src registry.getnoc.com/infrastructure/black:master /usr/local/bin/black $FileDirRelativeToProjectRoot$/$FileName$
  • Working Directory: $ProjectFileDir$
  • Open console for tool output: Check

Press Ok

To format current file select Tools > External Tools > black format