Code Monkey home page Code Monkey logo

Comments (16)

koxudaxi avatar koxudaxi commented on May 23, 2024 6

@yu-ichiro @mLewisLogic @abn
I have changed behavior to use RunConfiguration.
This feature creates RunConfiguration and executes one.
Also, If there isn't a script in bin, then show error dialog with a message. Users can know they have to execute poetry install before doing this feature.
It's published after JetBrains approval. we need to wait for about two days.

Peek 2020-09-03 03-33

from poetry-pycharm-plugin.

koxudaxi avatar koxudaxi commented on May 23, 2024 4

I however have a problem. I can't access the stdin for the program, so I can't stop a script with Ctrl-C or something. I would like it to bind stdin also πŸ˜€

@yu-ichiro

Yes, The console is read-only view console which is not terminal with stdin 😿
However, I guess I change view console to terminal very hard.

I have forgotten about a run configuration. I feel that It is better than view console.

I don't know how do I add the run configuration to run scripts. πŸ€”
I will find a way and implement it. πŸš€

from poetry-pycharm-plugin.

abn avatar abn commented on May 23, 2024 4

@koxudaxi if poetry install was run first, this would mean that the script is already available at <virtual env>/bin/<script>. In theory; this means that if PyCharm already has the environment activated (as it normally does) you should not have to do anything special; just treat is a normal run (ie. without poetry run). The poetry run usage is more for cases where the virtualenv is not activated and you want poetry to handle the activation prior to execution. The SDK injection happens thanks to PyCharm when it does its env activation for the python interpreter it uses for "run". Hope this helps.

Additional note; if a user changes pyproject.toml to include a new script or updarte an existing one for the project being developed/managed, poetry install must be run after the change to make it available. Not sure how you would want to hook into the changes done via the IDE etc.

Further note, with 1.1.z releases a few things regarding script configuration, editable installation (root project) etc. have some significant changes incoming. Might be good to verify all works without modification at your end too. Feel free to raise any issues you encounter on python-poetry/poetry and tag me. :)

from poetry-pycharm-plugin.

abn avatar abn commented on May 23, 2024 3

Glad I could help. Feel free to tag me if you require input. :)

from poetry-pycharm-plugin.

koxudaxi avatar koxudaxi commented on May 23, 2024 2

@yu-ichiro
Thank you for your suggestion.
OK, I will try it.

from poetry-pycharm-plugin.

yu-ichiro avatar yu-ichiro commented on May 23, 2024 2

Wow that was fast 😳
I'll look into it tomorrow! Thank you very much!

from poetry-pycharm-plugin.

mLewisLogic avatar mLewisLogic commented on May 23, 2024 2

That's beautiful! Thank you @koxudaxi!

from poetry-pycharm-plugin.

yu-ichiro avatar yu-ichiro commented on May 23, 2024 2

This is mind-blowing!!! It works perfectly! Thank you for the beautiful work @koxudaxi

from poetry-pycharm-plugin.

koxudaxi avatar koxudaxi commented on May 23, 2024 1

@yu-ichiro
I have released a new version as 0.1.1
Would you please check it?

Screenshot_2020-08-06_01-48-00

from poetry-pycharm-plugin.

koxudaxi avatar koxudaxi commented on May 23, 2024 1

@mLewisLogic
I am very happy that you were glad!!

@yu-ichiro
Thank you for sponsoring me!!
Also, Your suggest improves the plugin πŸ˜„

I believe the community grows up software.
Welcome PRs and comments πŸ€“

from poetry-pycharm-plugin.

yu-ichiro avatar yu-ichiro commented on May 23, 2024

@koxudaxi
Sorry for not being in touch. I got it to test it, and it's working pretty well!
I however have a problem. I can't access the stdin for the program, so I can't stop a script with Ctrl-C or something. I would like it to bind stdin alsoπŸ˜€

I would also really appreciate if it created&bind to a run configuration that I can run/stop from the toolbar, and asked me when I quit PyCharm if I wanted to detach the running script and make it keep running in the background even after PyCharm is killed, or make it die with the PyCharm process.

Thanks for your awesome work!

from poetry-pycharm-plugin.

mLewisLogic avatar mLewisLogic commented on May 23, 2024

Thanks! A run config would be great. That would make supporting args very simple.

from poetry-pycharm-plugin.

mLewisLogic avatar mLewisLogic commented on May 23, 2024

(Also wondering if a run configuration might also make debug breakpoints possible?)

from poetry-pycharm-plugin.

koxudaxi avatar koxudaxi commented on May 23, 2024

@mLewisLogic

(Also wondering if a run configuration might also make debug breakpoints possible?)

Sorry, I don't know about it.
I will learn it this weekend. πŸ“–
First, I will read this document for a plugin developer.
https://jetbrains.org/intellij/sdk/docs/basics/run_configurations.html

Currently, the plugin calls poetry run script.
But, I guess the plugin has to execute a python interpreter directly to connect debugger.

I don't understand inside poetry. I may ask poetry teams about detail.

from poetry-pycharm-plugin.

koxudaxi avatar koxudaxi commented on May 23, 2024

@abn
Hi Arun,
I ask about poetry's script to you who are member of poetry teams.

We want to use a run configuration to execute script.
PyCharm have to know conditions (arguments, sdk, environments) to run scripts in directly.

I guess poetry creates commands dynamically.
Can we get commands to execute script ?

from poetry-pycharm-plugin.

koxudaxi avatar koxudaxi commented on May 23, 2024

@abn

Thank you for explaining the detail of the behavior. πŸ˜€

@koxudaxi if poetry install was run first, this would mean that the script is already available at <virtual env>/bin/<script>.

It's a good news!! I will be able to implement the feature easy πŸ‘

OK, I will decide how does the plugin works. Example : the plugin should notify it when a user run a script before poetry install is called.

I will ask you questions when I don't know the behavior and specifics on poetry .

Thank you very much.

from poetry-pycharm-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.