Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyCharm run configuration only shows python tests. How to run it a regular run?

I have cloned a git repository and am trying to run the code on PyCharm IDE. When I try to run it, my usual run option is not available and only run nosetests is available. I read that this is a module to help testing the code, but I don't see an import nosetests or anything like that which helps me to understand why my IDE automatically runs nosetests on this particular code.

Question: How can I run this like a normal code and why I'm seeing this run option instead.

I found multiple questions on how people accidentally changed their IDE setting in a way that all the codes are running using nosetest but not my question. I would appreciate if you can share a link that gives more details on this.

like image 546
Blade Avatar asked Sep 06 '25 03:09

Blade


2 Answers

It seems that you do not have a Run Configuration in project that runs the code just tests. In PyCharm go to "Run" -> "Run..." (Shift + Alt + F10) and choose "Edit Configurations..." on the plus sign you can add a new configuration running python code "normally".

It is explained in detail on Jetbrains website: https://www.jetbrains.com/help/pycharm/creating-and-editing-run-debug-configurations.html?keymap=primary_windows

like image 59
LeBavarois Avatar answered Sep 07 '25 16:09

LeBavarois


From what I understand, you are not able to run the py code. You can achieve this easily on the terminal provided within Pycharm, using the commands provided in the project README. Alternatively, if you want to run it using the GUI, you can edit the Run Configuration by clicking the dropdown near the Run icon at the top.

For further information please head out to https://www.jetbrains.com/help/pycharm/creating-and-editing-run-debug-configurations.html?keymap=primary_windows

like image 26
Jey Avatar answered Sep 07 '25 17:09

Jey