Code Monkey home page Code Monkey logo

Comments (19)

vlasovskikh avatar vlasovskikh commented on May 23, 2024 19

@koxudaxi We've been working on the new API for interpreters and packaging and we've discovered more things we want to change in this API (e.g. add the ability to create Python environments on remote hosts). It seems reasonable to split the work on the interpreter and packaging extension points into two stages:

  • For 2020.2.x releases: Introduce a simple (and non-stable) API that just moves all the mentions of "Pipenv" into this extension point. It will allow poetry-pycharm-plugin to continue with what's already there for Pipenv and use it for Poetry
  • For 2020.3 EAP builds: Switch to the new API that introduces more configurability and allows to implement all other interpreter and packaging types on top of it

We're too close to the 2020.2 release to introduce any changes to this version, so for this simple API I'll target 2020.2.2. Sorry @koxudaxi we keep you waiting for these extension points.

from poetry-pycharm-plugin.

vlasovskikh avatar vlasovskikh commented on May 23, 2024 5

Here's the list I got so far. It's still a work in progress. My next steps will be:

  • Come up with a possible API (extension points) to accommodate these features for Pipenv, Poetry, and potentially other package managers and Python interpreter types
  • Start adding bits of this API into PyCharm 2020.2 EAP

The list of places I had to customise to enable Pipenv support (Poetry is somewhat similar here, but there will be things that are different like several possible environments per project):

Hard-coded:

  • Set up a new project
    • PythonSdkConfigurator
      • Detect and set up a per-project interpreter with Pipenv as the package
        manager
    • PyAddNewEnvironmentPanel
      • New Pipenv environment panel for a new project
  • Settings
    • PyIntegratedToolsConfigurable
      • Path to the Pipenv executable (there is no need to put all the tools
        into this configurable)
  • Inspections
    • PyInterpreterInspection (SDK)
      • Check if the Pipenv interpter is valid
      • A quick-fix action to use or fix the interpreter
    • PyPackageRequirementsInspection (Packaging)
      • A quick-fix action to install the requirements from Pipfile.lock
  • Packaging
    • PyPackageManagersImpl
      • Get a Pipenv package manager for the SDK (list / install / remove)
      • Get a Pipenv package management service (browse package repositories) for the SDK
  • SDK
    • PythonSdkType
      • Load SDK additional data from jdk.table.xml (to know that it is a Pipenv, not just a regular virtualenv, not sure if it's really that necessary)
    • PySdkRendering
      • Get the presentable name for the Pipenv interpreter
      • Get the icon for the Pipenv interpreter
    • PyStatisticTools
      • Collect the stats about the SDK type

Extension points:

  • PyAddSdkProvider
    • A panel for adding an SDK
  • PythonFlavorProvider
    • Get SDK "flavor": customize things like detecting paths, Python version,
      if the path is valid, etc.

from poetry-pycharm-plugin.

vlasovskikh avatar vlasovskikh commented on May 23, 2024 3

@koxudaxi Cool! Thanks for switching to the new API! If you have any feedback about the API we've got so far (anything that is still missing, or not convenient), please don't hesitate to discuss it here. As I've mentioned in my comment above, the next step for the PyCharm team regarding this API will be make environment management available for remote hosts. I'll be sharing the status updates about this feature.

from poetry-pycharm-plugin.

koxudaxi avatar koxudaxi commented on May 23, 2024 2

@vlasovskikh
Would you please share a list of extension points to support the plugin in PyCharm?
these extension points would not exist yet.

from poetry-pycharm-plugin.

vlasovskikh avatar vlasovskikh commented on May 23, 2024 2

@koxudaxi Sorry, I had to switch to other tasks, but now I'm back :) Our team will have a meeting about interpreters and API changes this week, I'll post updates here in this issue at the end of the week. I hope I don't block your progress on the plugin too much. I'm glad the plugin has been getting good reviews so far :)

from poetry-pycharm-plugin.

vlasovskikh avatar vlasovskikh commented on May 23, 2024 2

@Vozf The API will be based on the concept of execution targets, see TargetEnvironment and other interfaces in com.intellij.execution.target. The API is still in progress: it's not complete and not documented yet. We've marked it with @ApiStatus.Experimental. We might release creating environments on remote hosts in 2020.3, but I cannot make any promises at this moment.

from poetry-pycharm-plugin.

koxudaxi avatar koxudaxi commented on May 23, 2024 2

@vlasovskikh @jwiede
I have released a new version as 0.5.0
the version supports the new APIs on PyCharm 2020.2.2 that are below.

  • PySdkProvider
  • PyPackageManagerProvider

from poetry-pycharm-plugin.

vlasovskikh avatar vlasovskikh commented on May 23, 2024 1

@koxudaxi Meanwhile, I've begun switching some of my personal projects to Poetry as an experiment and I've installed your plugin to get a hands-on experience with it.

See a PR to my own repository vlasovskikh/funcparserlib/pull/61. Feel free to review it if you're interested :)

from poetry-pycharm-plugin.

vlasovskikh avatar vlasovskikh commented on May 23, 2024 1

@koxudaxi Could you please set me as the assignee for this issue? It would be easier for me to track it in my list of assigned and pending issues. I will look into the extension points we need and into our PyCharm API around environments and package management in general. I hope I'll do it by the next weekend, but I don't make any promises.

from poetry-pycharm-plugin.

koxudaxi avatar koxudaxi commented on May 23, 2024 1

@vlasovskikh
I agree. I use this plugin for private projects.
I think this version covers basic features.
I close this issue.
Thank you very much.

from poetry-pycharm-plugin.

vlasovskikh avatar vlasovskikh commented on May 23, 2024

@koxudaxi Thank you!

from poetry-pycharm-plugin.

koxudaxi avatar koxudaxi commented on May 23, 2024

@vlasovskikh
How is progress implementing extension points?
Where do I check the status? tracker? PR? I can't find it šŸ˜•
Iā€™m sorry I didn't mean to rush you.

I use the plugin for some projects. It works fine.
The plugin was downloaded over 2.2k.
And, I got good feedback šŸŽ‰

I want to proper next stage.

If you don't have time to implement an extension point then I may be able to write it or follow you.
Please feel free to contact me.

from poetry-pycharm-plugin.

koxudaxi avatar koxudaxi commented on May 23, 2024

@vlasovskikh
Iā€™m sorry for the late reply.
No problem. I'm happy your good answer šŸ˜„

from poetry-pycharm-plugin.

jwiede avatar jwiede commented on May 23, 2024

@vlasovskikh another month has passed. Can you please provide interested customers with concrete scheduling info on the plans you mentioned, associated trackers/PR's and so forth? The continued lack of tangible development progress towards Poetry support is quite disappointing.

from poetry-pycharm-plugin.

vlasovskikh avatar vlasovskikh commented on May 23, 2024

@jwiede We will release the extension points I've mentioned above in PyCharm 2020.2.2 in about a month. The updates will appear in 2020.2.2 RC which we will release in about 3 weeks. I'll post the links to the corresponding commits we've made to update the packaging and interpreters API.

from poetry-pycharm-plugin.

vlasovskikh avatar vlasovskikh commented on May 23, 2024

@koxudaxi We've implemented PY-44304 about extracting Pipenv support into reusable extension points for PyCharm 2020.2.x (step 1 from my list above). It will appear soon in 2020.2.2 RC.

Check out these interfaces:

and their implementations for Pipenv.

from poetry-pycharm-plugin.

koxudaxi avatar koxudaxi commented on May 23, 2024

@vlasovskikh
Thank you for creating extension points.
I will check it and try to change the plugin for the extension points.

from poetry-pycharm-plugin.

Vozf avatar Vozf commented on May 23, 2024

@vlasovskikh Is there any new info for the new API for 2020.3 you mentioned? I'm particularly interested in the remote hosts env creation with poetry.
This issue unfortunately doesn't have any new info https://youtrack.jetbrains.com/issue/PY-29642
Should we expect remote host env creation in 2020.3?

from poetry-pycharm-plugin.

vlasovskikh avatar vlasovskikh commented on May 23, 2024

The API for remote hosts is not ready for 2020.3. Other than that, @koxudaxi do you have ideas about any other extension points at the moment? If most features are covered I would suggest creating issues about individual features and closing this one.

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.