With the latest version of PyCharm, every time I make a change, PyCharm automatically runs my unit tests for me. Much of the time, this is very convenient. Sometimes, however, I need to turn this feature off, so that my tests only run when I explicitly invoke them. How can I do that?
There was similar questions asked before: PyCharm - run a corresponding unit test each time a file is saved
Simply, turn off feature below green arrow on the left side.
From https://www.jetbrains.com/pycharm/help/test-runner-tab.html
"AutoTest Toggle auto-test If this button is pressed, the autotest-like runner is turned on. It means that the test in the current run configuration tab will automatically rerun on changing its source code. Otherwise, to rerun such test, you have to click the rerun button"
Related
So I think the Sagemaker UI was updated very recently this week, and now I can't find any of my previous "runs" / "trials" / "jobs"...
When I go to home - Experiments, I can see the names of two experiments I have done in the past, but when I click on it, it just says "No runs / You don't have any runs". Not only did I have a bunch of runs / jobs (not sure if the term changed), but when I try to launch another one with my previously working script, it runs well (and saves itself well on S3) but doesn't show.
Anyone has the same problem ? Where should I turn to help ?
As part of those changes, automatically generated runs (previously called "trial components") are hidden by default.
On the "Runs" table for your experiment, click the cog icon in the upper right and enable "Show jobs". This will display any automatically generated runs in the table.
This answer on Stack Overflow offers a solution I am trying to implement. In particular, see the sections "Installation Instructions" and "How to Use".
Can anyone tell me the steps required to "restart" IDLE?
New Information:
Just as people have suggested I thought this simply meant closing the program and opening it back up again...but I already tried that.
The other twist to my situation is that I'm working on a virtual machine so I was unable to do the installation of IDLE2HTML.py myself. My work's Help Desk had to do it so I cannot speak for the accuracy of their work. For now I'm assuming they did it correctly, but when I go to the "Options" menu there is no option to "Save as HTML".
My only guess at this point is that I still need to "restart IDLE".
Just wanted to double check if there was something else I could do before going back to my Help Desk department.
IDLE reads the idlelib/config-xyz.def files, including config-extensions.def, just once, when it starts. So any changes to config-extensions.def only takes effect the next time you start IDLE.
If you do not see 'Save as HTML' after starting IDLE, the extension is not installed properly.
It means you need to close the IDLE so that any changes made by the script can affect the IDLE
Simply close the IDLE either via the X, Ctrl+Q or File>Exit, then open the IDLE again.
If you are using idlelib module from a Python program then close your program and run it again.
Sometime I look back at my terminal when there is a python script running and the console output has frozen, then I right-click on the terminal and the console output (printing to screen) beings again.
Its a bit disconcerting because sometimes I think my script has broken.
Do others also experience this? Anybody know a fix?
Thanks in advance for any responses
If it's intermittent with all other factors being unchanged, it sounds like you've inadvertently selected some text in the PowerShell console and it's halted updating output so that you can do something with it.
Next time, be careful to look to see if you have something selected before clicking.
I agree with #alroc's suggestion; i.e. the cause could be accidentally clicking on the console.
A solution to prevent this is to right click on the powershell console window's title bar, select properties, uncheck Quick Edit Mode, then click OK. This disables some features (i.e. copy by select & enter, paste by right click), but means if you accidentally click on the screen it does no harm.
Another solution's to simply press escape (or right click in the script's window) if the script's taking a while - generally that'll do no harm (i.e. it won't terminate your script), but it will exit the edit session, allowing the script to resume if it had been paused due to edit mode.
To play with these, run the below script, then click on the screen whilst it's running (this script just outputs a bunch of numbers).
1..99999999
To terminate the script completely, press ctrl+c.
Two actions that I perform on a regular basis are "run my tests" and "run my application". Unfortunately, PyCharm uses the same keystroke (Shift+F10, i.e., "Run") for both, and that keystroke uses my "current" run/debug configuration. I have to do a separate step to change configurations, and that step involves finding and selecting the right option from a longish list -- and it also requires taking the time to think about whether I need to switch configurations.
With as frequently as I run both the tests and the app (I'm still relatively new to Python, so I want to check frequently to make sure I haven't broken anything), this is pretty cumbersome -- especially since my usual pattern is "run the tests, and if they pass, then run the app", so I'm switching configurations all the time.
Is there an easier way to run a given configuration? Ideally I'd like to be able to bind a single keystroke to "select and run my 'main.py' configuration", and another single keystroke to "select and run my 'py.test' configuration" -- but anything that means I'm not constantly hunting through a list of configurations would be helpful.
I've tried recording a macro that switches configurations and then runs, but the macro recorder doesn't actually record the "change configurations" step -- all that ends up in the macro is "run". And there doesn't appear to be a macro editor that would let me manually add that step.
I also know about the pop-up "select configuration and run" list (F9), but that still requires me to read which configuration is selected in the list, decide whether it's the one I want, and cursor up or down in the list before hitting Enter. It's not all that complicated, but it still interrupts my train of thought pretty thoroughly every time I do it. Running -- both the tests and the app -- should be simpler than this.
I know this question is super old, but to anybody with the same problem.. here it is.
I had the same problem, because I had lots and lots of scripts on the same project, and I wanted to run a script individually.
What you need to do is, open up the script (by double-clicking), and then once it is open, right-click on anything, and you will see "run [the script]" with a green play button.
here is the photo
I've got 2 problems with Eric4 IDE.
Can't find an option in preferences to autosave my changed files before running script. It's very annoying that I have to save my file and then run script.
Second problem is running a script. I can't find any button to run a script/project instantly. 'Run Script' button always opens a setting window.
One way to get around this, as it seems there is no built in way is to bind a key to save the file (ctrl+s), then run the script (F2), and finally hit enter (to close the settings window and run the code).
This bothered me a lot too, and I know this is 2 years late but it might help some else who comes here looking for this very solution, like I did. Here are the actual answers, ERIC v4.4:
Press F4 instead of F2.
The first time you have to use F2 to 'Start' the script, so dismiss the settings window. After that you can use F4 'Restart' and it will run with the settings you chose initially.
The Autosave option is well hidden unfortunately:
Settings-->Preferences-->Debugger-->General-->!Scroll down to!-->Start Debugging-->Autosave changed scripts
And you were spot on - these two things do have a huge impact on productivity.