Debugging Locally with Pycharm

While models can be developed directly in Akumen’s code editor, we recognise that everybody has their own workflow that they like to follow, and software that they like to use. In this section, we teach you how to set up your model in PyCharm so that it executes in exactly the same manner as Akumen, giving you the interactivity and richness of PyCharm combined with the confidence that your code will run as-expected in Akumen.

The basic steps to enable local debugging in PyCharm is as follows:

  1. Create your application, either new or from Git, in Akumen.
  2. Set up your research inputs for at least one scenario.
  3. Execute the scenario.
  4. Right-click on the scenario and select Artifacts to download the model artifact zip.
  5. Extract the zipfile onto your local computer.
  6. Open PyCharm and open the extracted zip folder.
  7. Click Add New Configuration and add a new Python execution configuration.
  8. Set the Script Path to akumen.py and the Parameters to main.py.
  9. Set the Working Directory to the extracted zip folder.
  10. Set a breakpoint on a line within the akumen() function.
  11. Hit Debug to begin a debugging session, and explore as desired.
  12. If changes are made within the akumen() function or other model code, simply restart the debugger session.

There is a sample video of this process below: