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:
- Create your application, either new or from Git, in Akumen.
- Set up your research inputs for at least one scenario.
- Execute the scenario.
- Right-click on the scenario and select
Artifacts
to download the model artifact zip. - Extract the zipfile onto your local computer.
- Open PyCharm and open the extracted zip folder.
- Click
Add New Configuration
and add a new Python execution configuration. - Set the
Script Path
toakumen.py
and theParameters
tomain.py
. - Set the
Working Directory
to the extracted zip folder. - Set a breakpoint on a line within the
akumen()
function. - Hit
Debug
to begin a debugging session, and explore as desired. - 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: