Skip to content

Pycharm setup

nodedge edited this page Jul 6, 2020 · 3 revisions

Pycharm setup

Pycharm is the Python IDE used to develop Nodedge.

You can download it here.

To setup Pycharm, open Nodedge folder:

  • File -> Open... -> Select Nodedge clone folder.
  • Alternatively, in your file browser, right-click on Nodedge folder and select "Open folder as Pycharm project"

To set up the interpreter for Nodedge:

  • In Pycharm, go to File -> Settings... [ctrl+alt+s], then "Project: nodedge" -> Project interpreter -> click on top right wheel -> Add... -> Virtual environment -> New virtual environment -> Base interpreter: 3.6.x -> Click OK

To install the dependencies required to develop Nodedge:

  • open requirements_dev.txt, click on "Install dependencies" in the yellow banners that appears on the top of your screen.
  • Alternatively, open a terminal in Pycharm [alt+f12] -> type "pip install -r requirements_dev.txt"
  • Alternatively, open a terminal and activate your Nodedge virtual environment -> type "pip install -r requirements_dev.txt"

To run the tests in Pycharm:

  • Right click on the tests folder (in Pycharm), and select "run 'pytest in tests'"

To launch an example of Nodedge in Pycharm:

  • Open the example script in Pycharm, then right-click in the text editor and select "Run 'main'"
  • Alternatively, when the file is open in Pycharm, hit [ctrl+shift+F10]

To debug an example of Nodedge in Pycharm:

  • Open the example script in Pycharm, then right-click in the text editor and select "Debug 'main'"
  • Alternatively, when the file is open in Pycharm, hit [shift+F9] if the configuration is already set on your file.

Black is used to autoformat the project. If you get tired of Travis saying you forgot to format a file, consider using this setup for Pycharm:

Clone this wiki locally