Comments (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.
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
- Detect and set up a per-project interpreter with Pipenv as the package
- PyAddNewEnvironmentPanel
- New Pipenv environment panel for a new project
- PythonSdkConfigurator
- Settings
- PyIntegratedToolsConfigurable
- Path to the Pipenv executable (there is no need to put all the tools
into this configurable)
- Path to the Pipenv executable (there is no need to put all the tools
- PyIntegratedToolsConfigurable
- 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
- PyInterpreterInspection (SDK)
- 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
- PyPackageManagersImpl
- 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
- PythonSdkType
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.
- Get SDK "flavor": customize things like detecting paths, Python version,
from poetry-pycharm-plugin.
@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.
@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.
@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.
@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.
@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.
@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.
@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.
@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.
@koxudaxi Thank you!
from poetry-pycharm-plugin.
@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.
@vlasovskikh
Iām sorry for the late reply.
No problem. I'm happy your good answer š
from poetry-pycharm-plugin.
@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.
@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.
@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.
@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.
@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.
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)
- Make it work with PyCharm 212.* HOT 4
- Extra dependencies set installation fails when done from the plugin HOT 2
- Creating poetry environment does not use specified version of Python HOT 3
- NoSuchMethodError: PySdkExtKt.getAssociatedModule(Module) in PyCharm 2021.2, update to new API HOT 2
- Explain how to attach the source code during development HOT 2
- Unsupported TomlTableHeader type HOT 1
- Add Run Configuration HOT 1
- Support PyCharm 2021.3 EAP HOT 4
- Add Python Interpreter Failed, missing module. HOT 3
- Update for DataSpell EAP 213 HOT 2
- Plugin error: Plugin 'Poetry' (version '1.1.5-212') is not compatible with the current version of the IDE, because it requires build 212.* or older but the current build is PC-213.4631.9
- 8:39 AM Plugin error: Plugin 'Poetry' (version '1.1.5-212') is not compatible with the current version of the IDE, because it requires build 212.* or older but the current build is PC-213.4631.9 HOT 7
- Invalid virtual environment detected because of escape sequences and colors (ANSICON env variable defined) HOT 2
- Plugin creates separate Poetry environment, although one already exists HOT 2
- Toml-plugin-dependent features not working HOT 1
- IDE Fatal Error after git pull. HOT 1
- Support for latest PyCharm release (build 213.5744.248) HOT 3
- Plugin 'Poetry' (version '1.1.5-212') is not compatible with the current version of the IDE, because it requires build 212.* or older but the current build is IU-213.5744.223 HOT 3
- Plugin Incompatible requires IDE build 212.* or later HOT 3
- Maybe this project should be archived? And pin an issue stating what has happened HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poetry-pycharm-plugin.