Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module / Package management - pip interface #6

Open
ebresie opened this issue Mar 6, 2022 · 9 comments
Open

Module / Package management - pip interface #6

ebresie opened this issue Mar 6, 2022 · 9 comments

Comments

@ebresie
Copy link
Owner

ebresie commented Mar 6, 2022

Presently as of 0.1, there is no ability to manage or identify Python modules/packages within a given environment and/or project.

This is issue will implement module / package functionality within the IDE.

@ebresie
Copy link
Owner Author

ebresie commented Mar 6, 2022

This may involve integration with package tools like:

@ebresie
Copy link
Owner Author

ebresie commented Jun 5, 2022

As part of this, the Python Platform page has a "Module" tab which currently is not populated.

Will likely need to interface via python - pip list to obtain the currently installed modules for the given platform. The results of this will need to be populated in the list.

@ebresie
Copy link
Owner Author

ebresie commented Jun 5, 2022

For project specific module management, may need to leverage setuptool or equivalent project management to have dependencies available for use in the Python Project. See #20

@ebresie
Copy link
Owner Author

ebresie commented Jun 5, 2022

@ebresie ebresie changed the title Module / Package management Module / Package management - pip interface Nov 5, 2022
@ebresie
Copy link
Owner Author

ebresie commented Nov 5, 2022

Adjusting the scope of this to focus on providing a pip interface. This may further be expanded upon for other Module/Package Management based development which will be captured in a separate issue as applicable.

@ebresie
Copy link
Owner Author

ebresie commented Nov 5, 2022

As of v0.3.0, possible places in the code to focus on pip interfaces which includes

Python Platform - this is from the Tools...Python Platform contexts for a given Python Platform and it's applicable "Modules"

  • PythonPackage - this class is to represent a python projects "python package file".
    -- Much of this code is commented placeholder code for getting PipDependenecies for the package.
    -- This interacts with PythonExecutionable.
    -- During PythonPlatformProvider method "detectPython" logic there is interfaces
    -- PythonSupport

Project Properties Library - this is used as part of the Python Project Properties - Library pane

  • PythonLibraries
  • PythonLibrariesPanel - is used in the python project properties Library contents (not to be confused with the "Platform's Module" pane. This may eventually call to other interfaces to poll for packages elsewhere.
    Some of this code is loosely based on NBPython code and has been commented out to reimplement within the Python4NB plugin. Some of the above-mentioned references may go away in favor of new refactored code,

LSP interface

  • PythonLsp - this is where the Python Language Server interfaces is leverages. It starts up the python LSP server (a python thread) which listens and responses to interaction with the server. Not sure if there is necessarily any true need for pip interface but need to investigate further.

Option Interfaces - this is from Tools...Options...Python

  • PythonOptions - this calls out to PythonUtils.getPip logic. This is leverage in PythonOptionValidator and PythonOptionsPanelController
  • PythonOptionsValidator
  • PythonOptionsPanel
  • PythonOptionPanelController

General Interfaces - These are possible shared utilities classes for use in multiple contexts. I think some of this may still be for use in the Options context but need further investigation

  • PythonUtils - has utility layer with some pip interfaces. This may be a good starting point to interface with pip
  • ValidationUtils

@ebresie
Copy link
Owner Author

ebresie commented Nov 12, 2022

The getPip interface in use in Tools...Option...Python context I believe may have been used previously during logic derived from NBPython as it's called in that context, but the PythonOptionsPanel has nowhere to display any "libraries" as such. Here either need to add a pane to display libraries or look elsehwhere.

@ebresie
Copy link
Owner Author

ebresie commented Nov 12, 2022

I maybe mixing PythonLibraries and PythonPackages in similar intent. I may need to combine some of these or refactor some of this code in some way. Since PIP stands for "Pip Installs Python" or "PIP Installs Packages" I think "package" is more appropriate.

Trying to refactor any "Library" references to "PythonPackage" usage. There appears to be some Node type logic in the PythonPackage context which may be left over from code base.

@ebresie
Copy link
Owner Author

ebresie commented Apr 1, 2023

May want to consider Dependency management as part of the scope here. This may overlap with other tickets such as #42 which has some overlapping coverage with dependency management as well.

For example, dependencies could be captured in a requirements.txt or a setup.cfg or some other similar dependency management file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant