koxudaxi / poetry-pycharm-plugin

A PyCharm plugin for poetry
https://koxudaxi.github.io/poetry-pycharm-plugin/
Apache License 2.0
180 stars 14 forks source link

Add Run Configuration #272

Open jansenm opened 3 years ago

jansenm commented 3 years ago

If i understand poetry correctly (which shouldn't be taken for granted) i am supposed to use poetry install and poetry run during my development. And i should NOT install poetry into the virtual environment i use to develop my project.

Thats why i can't use the existing Run Configuration options in intellij to add a build, install and run task utilizing existing Intellij run configurations.

The python versions assume whatever i want to run is installed in my project sdk or in another sdk. But the poetry installation is not a valid sdk so i can't configure it as one in intellij.

External Tools can be used to configure poetry but they can't be triggered as simply as Run Configurations. My Workaround for now is to have a python run configuration doing a python -m call to something and add the desired poetry run as a "Before Launch" tool. But it took me some time to come up with this workaround and it means the window with the output will be hidden by the window with the output of the unwanted "python -m ...".

It would be nice to have Run Configuration Type poetry.

If what i write above make no sense i guess this is a wish for better documentation about how to setup a poetry project with this.

koxudaxi commented 3 years ago

@jansenm

I'm sorry for my reply.

And i should NOT install poetry into the virtual environment i use to develop my project.

I expect poetry is in the PATH globally. We can run it via a terminal.

It would be nice to have Run Configuration Type poetry.

I agree that It's good if we can run poetry run and poetry installs easily. But, I don't know Run Configuration is the best.

What do you think about it?