Commit Graph

404 Commits

Author SHA1 Message Date
Ilya.Kazakevich
8457d2ae09 Python NPW: Heavy refactoring:
1. lots of funs now `suspend`
2. errors reported to `ErrorSink`
3. validation improved (yet, still not perfect)
4. tests added

GitOrigin-RevId: 5cbf674a70ad0e0b40180dd358398bf498d6f76d
2024-09-12 05:36:51 +00:00
Ilya Kazakevich
7bd141a993 PyCharm: Rewrite NPW API: See com.jetbrains.python.newProjectWizard
This package (aka PyV3) fixes several issues, including
1. Lots of `DirectoryProjectGenerator` misuses: We now create UI and settings with `ProjectGeneratorPeer`: no more manuals casts in callback
2. Decouples project generation from UI: Settings aren't aware of UI but generate a project instead. Settings are mapped to the UI using Kotlin DSL UI
3. Kotlin DSL UI panel enables validation
4. `PySdkCreator` (an interface implemented by all "v2" SDK panels) now accepts `Module`, so we can provide it Poetry

The whole machinery of `PythonGenerateProjectCallback` (a pack of manual casts only mother could love) is completely deprecated and will be removed soon.

Lots of small changes towards `suspend` functions, Kotlin DSL UI and `Flow` decrease the technical debt.


Merge-request: IJ-MR-144503
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>

GitOrigin-RevId: 21963e843b0ae67c71a6fc5ea1229cb0f57915a9
2024-09-10 19:50:12 +00:00
Egor Eliseev
a54292035d PY-65295 Poetry installation
Try to install Poetry and Pipenv if they are not found


Merge-request: IJ-MR-141839
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

GitOrigin-RevId: 535426090df23b358ba61a9e21c2f0954c201945
2024-09-10 10:40:05 +00:00
Nikita.Ashihmin
4cbda9f67a PY-75685 Packages(fix): Small remarks for the packaging tool window
GitOrigin-RevId: a9ac807144830b4deca1654f4d791ee09044b167
2024-09-04 17:38:45 +00:00
Nikita.Ashihmin
fcfbe773b9 PY-49854 Packaging(fix): hide add package under gear
GitOrigin-RevId: 7e32a2db8dd987086b2bb2bce695271c94ca6f7a
2024-09-02 12:09:21 +00:00
Nikita.Ashihmin
8364098c4a PY-75464 PyPackages(refactor): Add PyPackageInfoPanel
GitOrigin-RevId: 34c671548086aae59833c0f6223bf7b2053ed432
2024-08-30 16:39:16 +00:00
Nikita.Ashihmin
e66c52bd22 PY-49929 Packages(fix): Allow selecting multiple packages simultaneously for a quick uninstall \ upgrade
GitOrigin-RevId: df8b02713955006061411b92cb89f40dc25046be
2024-08-24 18:21:16 +00:00
Nikita.Ashihmin
c3d76fcc00 PY-72994 Packages(refactor): Add install with option
GitOrigin-RevId: 64e7823def799c144be06213fe26198f74537775
2024-08-24 13:43:56 +00:00
Nikita.Ashihmin
b9ada91b76 PY-72994 Packages(refactor): Add progress indicator
GitOrigin-RevId: 9f6d2d17ffd67a10e73726417d05351bade5ca20
2024-08-24 13:43:56 +00:00
Nikita.Ashihmin
6996d81468 PY-72994 Packages(refactor): Fix bugs
GitOrigin-RevId: 49055bb50807cb0509cb4958cf37517e5e2ca698
2024-08-24 13:43:56 +00:00
Nikita.Ashihmin
9fde169b6a PY-72994 Packages(refactor, feat): Update package actions
GitOrigin-RevId: 12d6e92f838717817b6b3a69ae7b844ba1724be3
2024-08-24 13:43:55 +00:00
Nikita.Ashihmin
134376878d PY-72994 Packages(refactor, feat): Rename Delete package andd Update package
GitOrigin-RevId: 56ddaade343cb5eeb3240fd1090f68b72e42ed86
2024-08-24 13:43:55 +00:00
Aleksandr Sorotskii
81e490cd6f cleanup sdk validation api
GitOrigin-RevId: 33747cf0cfada370181b43d02f203b8401740c5c
2024-08-22 19:03:41 +00:00
Daniil Kalinin
abb3db3cbb PY-73906 Implement a new PyCharm Pro editor advertising notification using a plugin suggestion mechanism
GitOrigin-RevId: 1bbdad77006dfb4fe383ff21790f6aa55bdfb9bc
2024-08-08 09:20:09 +00:00
Ilya.Kazakevich
01228fba20 PyCharm: remove supportsPython3 check as any modern framework support it (all impls return true)
GitOrigin-RevId: 06f939ac73ae864a04ee6bdfd09be1e54b5bda5d
2024-08-01 19:52:34 +00:00
Yuriy Artamonov
4dac328bf4 [i18n] IJPL-158521 Fix more ellipsis problems in plugins
GitOrigin-RevId: 981393c6f975e303847ca598b650fec8fe65d9bf
2024-07-30 16:35:51 +00:00
lada.gagina
1605af64c4 [python] packaging: add an update button to the context menu (PY-72994)
GitOrigin-RevId: fbd6258369c199d3325166d9431467531c2b88ab
2024-07-30 09:29:01 +00:00
lada.gagina
0cd4aae5f5 [python] packaging: add a quickfix to install all missing packages in a file (PY-71152)
GitOrigin-RevId: 6d87758b7551df057160cfb12420064baae13b21
2024-07-18 20:53:48 +00:00
lada.gagina
19cf766f45 [python] requirements.txt: add a confirmation window for installing several packages (PY-71152)
GitOrigin-RevId: f6af85f16fa69280f56ac58c681e7c755a999cdf
2024-07-18 20:53:44 +00:00
Bogdan.Kirilenko
a6ed117460 [PyCharm] PY-35897 python scientific mode - ctrl+enter does not move the caret, shift+enter moves caret to the next cell
GitOrigin-RevId: c16f3d549b49284e709203548fe598c6cf2f639f
2024-07-18 14:20:43 +00:00
Pavel Karateev
8f2402e698 PY-57769 Fix the wrong command to install pydevd-pycharm
(cherry picked from commit 839e4aac1d72dcf2c57af66b69a06268cff19050)

IJ-MR-139749

GitOrigin-RevId: 7eecd813750d4e014ec691d764fe31eaa0c0d564
2024-07-12 14:25:11 +00:00
Mikhail Golubev
52850e21d8 PY-62208 Include importable names in basic completion results
Previously, such names were visible only on so-called "extended" completion,
activated when the hotkey for the basic completion was hit twice. The main reason
was that collecting such variants from indexes was a slow process, and we
didn't want to harm the responsiveness of completion for basic names.
Now it becomes possible thanks to a number of performance optimizations:

* Instead of using three separate indexes for classes, functions and variables,
we use one -- PyExportedModuleAttributeIndex. By definition, it includes only top-level
"importable" names, so we additionally save time by not filtering out irrelevant
entries. Also, it doesn't contain private definitions starting with an underscore.
It might bother some users, but given that the previous completion was used
extremely rarely, and the new one is going to be visible everywhere, it seems
that pruning unlikely entries as much as possible is a fare tradeoff. In the future,
we might enable them back on the "extended" completion if there is a demand.
Also, this index binds its keys to the project (`traceKeyHashToVirtualFileMapping`),
further eliminating useless index lookups.

* Thanks to the recent fixes in the platform (IJPL-265), it's now possible to
simultaneously iterate over all keys in an index and request values for a given key
without deadlocks, which is much faster than eagerly fetching all keys first.

* While scanning through all matching entries from indexes, we terminate
the lookup if the number of items exceeds the size of the lookup list.
We can further reduce this number by adjusting the "ide.completion.variant.limit"
registry value.

* Calculating expensive "canonical" import paths (e.g. "pkg.private.Name" is importable as
"pkg.Name") is offloaded to a background thread thanks to the `withExpensiveRenderer` API.
We still calculate these paths synchronously, though, for names whose raw qualified names
contain components starting with an underscore to decide whether these private names are
publicly re-exported and, hence, should be displayed.

The rest of the work has been put into reducing the number of entries on the list, e.g.

* The prefix under caret is now matched from the beginning of a name, e.g. `Bar<caret>`
matches `BarBaz`, but not `FooBar`.
* We don't suggest imported names clashing with those already available in scope.
* Some kinds of definitions are not suggested in specific contexts, e.g.
functions and variables are not suggested inside patterns and type hints.
* Nothing is suggested at the top-level of a class body, where dangling
reference expressions or calls are not normally expected.

Additionally, we don't suggest names from .pyi stubs at the moment, because
it pollutes the suggestion list with entries coming from the stubs for
third-party packages in Typeshed. We should probably enable them back once
we are able to properly disable Typeshed entries for not installed packages.

Some legacy forms of completion are left in the extended mode. In particular,
qualified names of classes are offered inside string literals only in this mode.
Also, module and package names are suggested only in the extended mode, because
top-level packages and modules are already suggested for the basic completion
by PyModuleNameCompletionContributor.

A few tests in PyClassNameCompletionTest were updated or removed entirely because
* we no longer suggest private names
* we no longer suggest names from private modules not re-exported in a public module
* we no longer suggest names clashing with those already available in scope
* prefix matching policy was changed to start at the beginning of an identifier

The whole feature can be disabled with the option "Suggest importable classes,
functions and variables in basic completion" in settings.

GitOrigin-RevId: 0787d42ce337b73b01a60f0bb7aa434fee43e659
2024-07-02 14:08:48 +00:00
Daniil Kalinin
35aa2b43b4 PY-58497 Add a custom bottom component for Python Parameter Info window.
Make it possible to expand/collapse overloads by clicking the action link in the bottom component or calling Parameter Info window on the same place for the second time.

GitOrigin-RevId: a65de4124b4530dd9cc5f16b0a709e3a6489071c
2024-07-02 09:57:32 +00:00
ekaterina.itsenko
d4e3fbb089 [pycharm] PY-72059 Add an error displaying when numpy is not installed
GitOrigin-RevId: 082917ec37b99955c9538ddf2154618f0a07fdaa
2024-06-19 22:11:34 +00:00
Nikita Pavlenko
5fbfd19134 [pycharm] PackageManager (fix): "Delete Package", "Reload All Repositories" and "Manage Repositories" actions will not be disabled duting indexing. #PY-49280 Fixed
GitOrigin-RevId: d1f1cf553dd4c01fc3fe900bd55a228ec599db90
2024-05-30 15:16:09 +00:00
Vitaly Legchilkin
9a56930105 Use BinaryInstaller for CPython, update sdks registry, remove os field from FUS (PY-71414)
* os field is a reserved field, it is an autofilled field, no need to add it manually.

GitOrigin-RevId: 9506335e17c6e049adce9ebf17352c609739022a
2024-05-11 17:40:47 +00:00
Aleksei Kniazev
fee1db1cf8 [python] link to install Miniconda from NPW if executable is not detected (PY-63084)
(cherry picked from commit 8efbd2a0aace3f0dcf139f6ac429cbfb78b818da)

IJ-MR-129618

GitOrigin-RevId: 46f434a93518f53463f590f55bfb21865f4ba629
2024-03-21 19:02:24 +00:00
Vitaly Legchilkin
a3a2a5db18 Add Conda (Miniconda/Anaconda) install manager (PY-63084)
Make project optional (PY-63084)

Fix BinaryInstallerUsagesCollector(PY-63084)

* align eventIds according to naming convention
* fix version regex (allow only digits dots and dashes)

Add Conda (Miniconda/Anaconda) install manager (PY-63084)

* refactor python installers
* add conda updater
* create conda sdks registry


Merge-request: IJ-MR-128404
Merged-by: Vitaly Legchilkin <Vitaly.Legchilkin@jetbrains.com>

GitOrigin-RevId: 1e73d1bd32fced94901c4c9a2c1260fca8aca9e2
2024-03-19 00:50:15 +00:00
Ilya.Kazakevich
194aad4c00 PY-64402: WIP
GitOrigin-RevId: e65a0aad259f51ce7216b9e94114453e7a04e4a9
2024-03-18 13:35:45 +00:00
Dmitry Avdeev
dcd7792c72 PY-61665 i18n:Preference/Settings: Editor: Live Template: Python and flask template descriptions are hardcoded
setting live.template prefix

GitOrigin-RevId: a80b46521dbceef018f0c56e3c6ed61f4f826469
2024-03-17 16:57:48 +00:00
Dmitry Avdeev
ff42f80fea PY-61665 i18n:Preference/Settings: Editor: Live Template: Python and flask template descriptions are hardcoded
GitOrigin-RevId: f89f81e4a37de4ce7d1c2a0a1f3161c6fd68226d
2024-03-15 12:27:42 +00:00
lada.gagina
92e8282dea [python] requirements.txt: Add tests for missing packages inspection (PY-65403)
GitOrigin-RevId: 5183d3b00b640510325c96a6c996cb308fe5b188
2024-02-26 03:26:38 +00:00
lada.gagina
04bfda48d3 [python] requirements.txt: Add a quickfix to install missing packages (PY-65403, PY-70139)
GitOrigin-RevId: 2501161e7f217070b17871089a1f11be44247938
2024-02-26 03:26:34 +00:00
lada.gagina
e97eeace5c [python] requirements.txt: Add an in-place inspection for not installed packages (PY-65403)
GitOrigin-RevId: 29d5b17ce5946c807afa635ac11ea9bdaf200999
2024-02-26 03:26:30 +00:00
Vladimir Koshelev
8b918211ba [python] move keys for forms from PyBundle.properties to PySyntaxBundle.properties
GitOrigin-RevId: 24bd35ffdb0f4c97721aaeac632db3aadc95ffbe
2024-02-16 15:53:26 +00:00
Petr
da4a4b066b PY-61639 Move PyLanguageCodeStyleSettingsProvider to python.syntax
GitOrigin-RevId: 547f75fe15a4164ee317fe16b693233ca620a558
2024-02-16 15:52:17 +00:00
Denis Mashutin
2614f76475 PY-63877 Implement a simpler UI for editing pytest run configuration
* decapitalized and removed CamelCase for pytest

(cherry picked from commit ca898978f81986f67539a66b39737d9e8de419a2)

IJ-CR-126190

GitOrigin-RevId: 3f3e79be0a598f2f0750143507435bca576267a7
2024-02-15 14:25:19 +00:00
Bogdan Kirilenko
374091c98b [pycharm] PY-63877 added new UI for autodetected python tests configuration
GitOrigin-RevId: b956cfa2273c0c13a689dbb36dfd4d57f63fff14
2024-02-02 15:32:14 +00:00
Bogdan Kirilenko
5fa5eb29f6 [pycharm] PY-63877 new UI for PyTest run configurations
GitOrigin-RevId: 0189a4f83fc9b57117a7fff2f71dae1d81c5ebd3
2024-01-31 21:48:20 +00:00
Mikhail Golubev
aed444e6f4 [python] Fix color attribute names capitalization
GitOrigin-RevId: b5a537d9b7b5de792fcd1e53f4ca28fa6970022f
2024-01-12 11:52:38 +00:00
Bogdan Kirilenko
a5dd2a61ba [python-flask] PY-63876 fixing texts in the configuration editor UI
GitOrigin-RevId: 8cedca71fe4434914b0bc72c6599b9d9321a1d13
2024-01-09 12:56:57 +00:00
Denis Mashutin
e095c1b72a PY-64420 NPE when Python download fails
* updated notification header

(cherry picked from commit 02fd1774a1359a78d59d35c8ab7201de5a4ec8e4)

IJ-MR-123213

GitOrigin-RevId: 44561b40668581975c921d38ba986fe7fef5b0c2
2024-01-09 00:23:49 +00:00
Denis Mashutin
e77896dfd8 PY-64420 NPE when Python download fails
* corrected notification text
* changed help id for more precise linking

(cherry picked from commit b466ce466ce6d878e71862646f6088c631f2fde5)

IJ-MR-123213

GitOrigin-RevId: 09336eaa1f20a799b40d38c66e60cb53a5a1fc85
2024-01-09 00:23:42 +00:00
Ilya.Kazakevich
e95af7e141 Move commandInterface to the separate module: towards v2 refactoring
GitOrigin-RevId: 18dcc57922878c8ad1fe0bb6be85097d4d81cc34
2024-01-08 22:40:10 +00:00
Aleksei Kniazev
4bfaca1108 [python] fixed wording for interpreter selection fix (PY-65406)
GitOrigin-RevId: 47b88f91bd1d95e287f859538823096a7fbf6af4
2024-01-08 12:13:42 +00:00
Nikita Pavlenko
de90d01ac8 [python] PY-64570, PY-64553 Rework of DataView/PlotView which are used to preview data on debug.
- DataView and PlotView are now separate toolwindows, new icon for DataView
- DataView in PyCharm opens in ToolWindow, in DataSpell in Editor
- In PyCharm DataView we have 2 view options (new and old tables)
- Old tables got new color schema
- New tables got coloring possibility and the same color schema
- A number of UI related classes are new on Kotlin DSL
- A number of actions properly registered in xml
- Code in this commit are not perfect and a lot of things should be refactored and the first thing - ds-tables and python-scientific modules should be rearranged, a number of useless extension points should be removed.
- fixed a number of Disposable problems
- Small UI fixes in toolbars

GitOrigin-RevId: c924338acc52420d44cc4cdad647fff19121332a
2024-01-02 15:35:16 +00:00
Aleksei Kniazev
a3d25a3436 [python] show error notification after failed python installation from NPW (PY-64420)
GitOrigin-RevId: b687f3861218eafd1b5eeaec98a285283ce653b1
2023-12-05 21:17:00 +00:00
Vitaly Legchilkin
34384accce Replace python download/install error dialogs to more user-friendly (PY-64420)
GitOrigin-RevId: 85bb5e403bd79a5d43aa075620b4619bc03c7fb6
2023-12-01 16:27:44 +00:00
Aleksei Kniazev
2222b97280 [python] install python from NPW (PY-60214, PY-63083)
- python distributions are available for selection as base interpreter
- sdks are installed and registered with modal progress after creating base dir for project
- new ui for sdk combobox, supporting path selection and custom rendering
- same combobox used for all python environment selection

GitOrigin-RevId: de2ea95247eab93f17f94cc580a41b13471bb49f
2023-11-29 03:20:14 +00:00
Vitaly Legchilkin
34f3828f5a Redesign of download python sdk (PY-63083)
+ Installer for pkg (MacOS packages)
+ Installer for exe (Windows executable)
- get rid of XCodeSelect installer (command line tools)
* Split PySdkToInstall

(cherry picked from commit c1a0becc70c6e421c48dd03bb80f31b8b7509dfe)

IJ-MR-120874

GitOrigin-RevId: 4fdcaa18c41bcdd0c004fed76de3054683b9ffbd
2023-11-28 09:58:50 +00:00