Setup Pycharm IDE

  1. Open pycharm,

    1. Open the peek project, open in new window
    2. Open each of the other projects mentioned above, add to current window
  2. File -> Settings (Ctrl+Alt+S with eclipse keymap)

    1. Editor -> Inspection (use the search bar for finding the inspections)

      1. Disable Python -> “PEP8 Naming Convention Violation”
      2. Change Python -> “Type Checker” from warning to error
      3. Change Python -> “Incorrect Docstring” from warning to error
      4. Change Python -> “Missing type hinting …” from warning to error
      5. Change Python -> “Incorrect call arguments” from warning to error
      6. Change Python -> “Unresolved references” from warning to error
    2. Project -> Project Dependencies

      1. peek_platform depends on -> plugin_base
      2. peek_server depends on -> peek_platform, peek_admin
      3. peek_client depends on -> peek_platform, peek_mobile
      4. peek_agent depends on -> peek_platform
      5. peek_worker depends on -> peek_platform
    3. Project -> Project Structure

      1. peek-mobile -> build-ns -> Excluded (as per the image below)
      2. peek-mobile -> build-web -> Excluded
      3. peek-desktop -> build-web -> Excluded
      4. peek-admin -> build-web -> Excluded
      ../../_images/PyCharmSettingsProjectStructureExclude.jpg
    4. Languages & Frameworks -> Node.js and NPM

      1. Node interpreter -> ~/node-v10.20.0/bin/node
      2. Remove other node interpreters
      ../../_images/settings_nodejs_and_npm.png
    5. Languages & Frameworks -> TypesScript

      1. Node interpreter -> ~/node-v10.16.0/bin/node
      2. Enable TypeScript Compiler -> Checked
      3. Set options manually -> Checked
      4. Command line options -> –target es5 –experimentalDecorators –lib es6,dom –sourcemap –emitDecoratorMetadata
      5. Generate source maps -> Checked
      ../../_images/settings_typescript.png

Configure your developing software to use the virtual environment you wish to use

Here is an example of the setting in PyCharm:

../../_images/PycharmProjectInterpreter.png

Restart the services that use the plugin

Note

The plugins that aren’t being developed should be installed as per deploy_peek_plugins


This is an example of running the server service in debug mode using PyCharm

Under the drop down “Run” then “Edit Configurations…”

  1. Add new configuration, select “Python”
  2. Update the “Name:”
  3. Locate the script you wish to run
  4. Check that the “Python Interpreter” is correct
../../_images/PycharmDebugRunServer.jpg