You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use Shift+F8 to run tests with something like python3 -m pytest
Open a JSON file that caused tests to fail
Fix the JSON
Press F8 to run pytest again. This doesn't work because I am currently in a JSON file.
Switch back to any tab that has any Python file opened and then press F8. Now it works.
On the other hand, many other Porcupine users expect F5 to just run the file, no matter what file type it is.
I'm not sure what's the best solution. Maybe Porcupine should consider commands to be project-specific (not filetype-specific) when they don't use the {file_name} or {file_path} substitution?
The text was updated successfully, but these errors were encountered:
The more I think about this, the more I want to make the commands project-specific. I think:
If a command does not use the file name in substitutions, it should be specific to the project. For example, if I run git grep -n some_function_name, I'm probably refactoring all usages of a function in a single project. I want to run that git grep from any file that happens to mention the function within that project, regardless of filetype. I don't want Porcupine to run that specific git grep in other projects.
If a command uses the file name in substitutions, it should be specific to the filetype and the project. For example, I have a project where a Python script creates .pdf files from .txt files. I want to say python3 make-pdf.py {file_name} and have it only affect .txt files.
When typing a command into the "Run command" dialog, Porcupine should offer autocompletions from other projects, even though just pressing F5 wouldn't run commands that were set for other projects. For example, the git grep -n ... pattern could be useful in any project, and I want Porcupine to autocomplete that everywhere. But I don't want it to blindly run git grep -n some_function_name in a totally unrelated project like it does now.
I often do this:
python3 -m pytest
On the other hand, many other Porcupine users expect F5 to just run the file, no matter what file type it is.
I'm not sure what's the best solution. Maybe Porcupine should consider commands to be project-specific (not filetype-specific) when they don't use the
{file_name}
or{file_path}
substitution?The text was updated successfully, but these errors were encountered: