Commit Graph

45 Commits

Author SHA1 Message Date
Gleb Marin
dc3c5730ea JBAI-5408 Release ML Imports Ranking in 2024.3
[ml tools] Fix build issue

[ml tools] Fix build issue

[ml tools] Fix build issue

[ml tools] Replace task object with service

[ml tools] Fix rebase issues

Add session duration metric

[ml imports ranking] Log fully only during EAP

[ml imports ranking] Set up FUS logs

[ml tools] Add dependency on ml api library


Merge-request: IJ-MR-142857
Merged-by: Gleb Marin <Gleb.Marin@jetbrains.com>

GitOrigin-RevId: 69be00b4b8f38ec71208c3b17cd6566a34508859
2024-08-20 06:16:36 +00:00
Ilya.Kazakevich
d74ffab3ba Python, DS: Use the new interpreter configuration UI to unify it between DS and PyCharm.
GitOrigin-RevId: 9faec46e4265e4a085c8f6acabee78551360c6a4
2024-08-14 17:47:00 +00:00
Mikhail Golubev
dc5c78e7f9 PY-73780 [fus] Collect Python version enabled for the compatibility inspection
GitOrigin-RevId: 8882995fa43bce79ec85fd3d8bbf4312b5d05076
2024-08-13 11:42:18 +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
Nikita Katkov
aacd74b83b [json] IJPL-159354 Add explicit dependencies on JSON plugin in PyCharm Community
GitOrigin-RevId: 02afec0731cc1c71b812a44023b01d92bd091503
2024-08-06 21:52:25 +00:00
Yuriy Artamonov
40ee9543ab [icons] Eliminate CrossModuleIcons.json
All icons reside in the corresponding modules now

GitOrigin-RevId: c5fe0b11a37256d1cae4d2067f17c6802a7721b8
2024-08-03 10:12:40 +00:00
Andrey Lisin
664c8ef4e8 PY-73432 Introduce registry key to enable single port communication between PyCharm and debugger
GitOrigin-RevId: a3a5199b1f343d1c3423c433fa636a6d1a657b4f
2024-07-31 19:41:40 +00:00
Andrey Lisin
638dce38d7 PY-71930 Restore reStructuredText plugin
This commit partially reverts changes from 4da3e7da. While the consolidation of reStructuredText support into a single module is retained, it needs to be available as a plugin since some IDEs do not include it by default but can still benefit from its capabilities.


Merge-request: IJ-MR-139650
Merged-by: Andrey Lisin <andrey.lisin@jetbrains.com>

GitOrigin-RevId: bc5cde2970a0760e32ceaee61ceef8427e8f8fe5
2024-07-31 12:47:03 +00:00
Egor Eliseev
994775243f PY-71926 Refine test detection criteria
Add a new setting Python Integrated Tools: Detect tests in Jupyter Notebooks.
Exclude Jupyter Notebook files from the scope for test detection by default.
Add tests


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

GitOrigin-RevId: 0bee082bde4fa608cb1907b8fbd64b97bb9755a0
2024-07-26 17:24:30 +00:00
Aleksei Kniazev
7e95d1c688 [python] initial step of python interpreter creation unification (PY-73396)
- refactored NPW to use target-specific model
- creating interpreter through widget reuses the same UI (can be turned off by python.unified.interpreter.configuration)
- interpreter discovery and virtualenv creation using Targets API
- no more PyDetectedSdk in dialog


(cherry picked from commit 581b2d40254d26f02eb3aa61bc2e842854b87a3e)

IJ-MR-140986

GitOrigin-RevId: be29188304882ef5f0fb88bb60c538714a2d8746
2024-07-25 18:01:45 +00:00
Yann Cébron
6e1285e760 plugin descriptors: remove obsolete suppression comments for 'PluginXmlValidity' inspection
GitOrigin-RevId: 25a17cf82be4c35d4e12472e392aea15b55ea105
2024-07-16 18:55:00 +00:00
Vladimir Koshelev
2ca8342b13 [python] restore pep8 information level after plugin split PY-73129
GitOrigin-RevId: 53fb0cf4c7efe139694d34f1707cdb8305881e03
2024-07-02 18:12:23 +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
d47bd34358 PY-58497 Refactor parameter info logic for Python
Show type hints only for the highlighted parameter

GitOrigin-RevId: f55d8ecc27dcbca5e6c24c5ca347ea3995e69ca8
2024-07-02 09:57:32 +00:00
Aleksandr Sorotskii
b71858d628 PY-73001 Log popular tools and build system requirements mentioned in pyproject.toml
GitOrigin-RevId: 8a54afcc73246ff4d2667229345aa1778dc6a2af
2024-06-25 19:53:37 +00:00
Vladimir Koshelev
2c8d9f7ca1 [python] fix jumps on backspace when lines start with a lot of indents
GitOrigin-RevId: 3ee4005dc0b85f007d4b895367af7efcdf5fbaab
2024-06-25 12:24:22 +00:00
Egor.Eliseev
56241ab394 PY-73411 Pycharm performance tests failed
Merge-request: IJ-MR-137368
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

GitOrigin-RevId: 23a7e9d443606b1a9a028c5e3275c6c408c0d796
2024-06-20 21:51:17 +00:00
Egor.Eliseev
0c73c9eff9 PY-72274 separating content for python core/pro plugins
1. Delete `intellij.python.community.impl.xml` (move content to `PythonCore` plugin). It is necessary to fix incorrect dependencies: `PythonCore`, `Pythonid` include the same module.
2. Fixed dependencies: if some plugin/module needs Python core functionality, then it should depend on `PythonCore`.


Co-authored-by: Vladimir Koshelev <Vladimir.Koshelev@jetbrains.com>

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

GitOrigin-RevId: ce9ed4c17f601ee1ca2b6cf608f4e30fdac1d879
2024-06-19 21:39:24 +00:00
Vladimir Krivosheev
4d288109b4 IJPL-149476 PythonPsi.xml expected in the main plugin
GitOrigin-RevId: 7f532cc471c7b7b0253cbde9f73fa1db45738ddf
2024-05-15 21:10:53 +00:00
Ilya.Kazakevich
d7c00ac3da PY-70729: Move com.jetbrains.extensions deprecated package to the separate module.
This package is only used by third party plugins. We can't leave it inside another v2 module due to package inconsistency.

See errors like https://youtrack.jetbrains.com/issue/PY-70729/Class-com.jetbrains.python.psi.PyElementType-must-not-be-requested-from-main-classloader-of-Pythonid-plugin#focus=Comments-27-9494155.0-0

So we move it to the separate v2 module which will be removed soon

GitOrigin-RevId: 418ef1a59bb5e63dbc368a936437408c6510cc23
2024-03-19 00:34:37 +00:00
Ilya.Kazakevich
30aafec791 [python]: rename module python rider to move it out of community.impl since this name is already used and might lead to clash.
GitOrigin-RevId: 44de4d39d098845235e079171a78e78d2f4f3209
2024-03-07 22:34:34 +00:00
Ilya.Kazakevich
37c7118b1a [python]: rename module to move it out of community.impl since this name is already used and might lead to clash.
`intellij.python.community.impl.community_only` -> `intellij.python.community.communityOnly`

GitOrigin-RevId: 070222708f66ba5f58b9716040186ec11d984e5d
2024-03-07 19:20:06 +00:00
Ilya.Kazakevich
763c2e8597 [python] only share content between Community, Prof and Fleet. dependencies must be copied.
`dependencies` tag join is not supported, hence `plugin.xml` must declare all its dependencies in one file

GitOrigin-RevId: c1347feb7f995b211522c3f1408f9f576215f784
2024-02-28 16:12:03 +00:00
Ilya.Kazakevich
71467fb86a [python]: Make org.toml.lang requirement for Python plugin.
Python support depends on TOML (see `intellij.python.community.impl.xml` `<dependencies>`), and a Python plugin is useless without this module.

GitOrigin-RevId: 979376338c699c24e34b76f2084a8c8cc8065371
2024-02-27 22:29:45 +00:00
Ilya.Kazakevich
9d4751f238 [python, ds, jupyter]: Migrate Python support to V2
Layout:

  JPS modules
  `intellij.python.community`
  `intellij.python.community.impl`
  `intellij.python.parser`
  `intellij.python.psi`
  `intellij.python.psi.impl`
  `intellij.python.ast`
  use package `com.jetbrains.python`
  and go to `intellij.python.community.impl` v2 module

  JPS module
  `intellij.python`
  uses package `com.intellij.python.pro`
  and goes to `intellij.python/pro` v2 module

  Both v2 modules (along with lots of others) come with
  `PythonId` (prof) or `PythonCore` (community) plugins

  DS bundles  `intellij.python.community.impl`

  Idea and other Mini IDEs get `PythonCore` or `PythonId` plugin that bundle modules for Idea and mini IDEs

GitOrigin-RevId: 98f418c52d90d51b9adf3250c561f2c36c767e2d
2024-01-22 20:26:58 +00:00
Ilya.Kazakevich
b533e29ce0 [python] get rid of classes registered in wrong modules
You must register class in the same v2 module class sits

GitOrigin-RevId: c7fcccd27c2fcaa3d9391d1173f61ad43fe2b076
2024-01-17 04:59:01 +00:00
Ilya.Kazakevich
3aa9e0f5f5 FL-24174: NCDFE JavaPsiFacade thrown from PyJavaImportResolver on Fleet backend.
`PyJavaImportResolver` is a v1 module which is included only if `com.intellij.modules.idea`.
The comment says:

> Java-specific dependencies are actually IntelliJ IDEA specific dependencies

But this is *NOT* true.

`JavaPsiFacade` is only guaranteed to be available if `com.intellij.java` module is set.

Hence, we change dependency

GitOrigin-RevId: 7c39e37f3a023e747e40cffabff848138e7b9394
2024-01-13 01:34:17 +00:00
Ilya.Kazakevich
f7f85f7c3a Remove python-core-plugin.xml: it consists of only one line and can be embedded
GitOrigin-RevId: fcfcfab10f544ea4bf786e4e49c28cf7e86d7ae5
2024-01-05 21:41:34 +00:00
Ilya.Kazakevich
ab9ea210a6 Merge ReST plugin with ReST Python module, convert module to v2
Nobody uses it except Python

GitOrigin-RevId: 4da3e7da0dcd86d454972b2ef68d2581c7fe5cdb
2024-01-03 16:35:59 +00:00
Ilya.Kazakevich
6a308b21a0 Migrate python copyright to v2
GitOrigin-RevId: bb3d02627319556681d4a192d83df4a2bfed21e1
2023-12-21 23:10:56 +00:00
Ilya.Kazakevich
19ed89fec2 Migrate python intelliLang to v2
GitOrigin-RevId: ffcac639cf73ac332731101939b5bdc906f47372
2023-12-21 21:23:27 +00:00
Ilya.Kazakevich
5903ec85c4 Migrate python terminal to v2
GitOrigin-RevId: 690d4ead522e2153b89d1ab09ed2026237173160
2023-12-21 21:23:23 +00:00
Ilya.Kazakevich
28372d5d89 Migrate python grazie to v2
GitOrigin-RevId: 945df1be286e054a763039b7e6ccf647ef753a84
2023-12-21 21:23:20 +00:00
Ilya.Kazakevich
a0ff363aab Migrate python markdown to v2
GitOrigin-RevId: fb7cc9c3ae6cd79d4d71e94e98ad1a1ae3c03bc5
2023-12-21 19:59:43 +00:00
Ilya.Kazakevich
50f0e2820c Migrate python feature trainer to v2
GitOrigin-RevId: 369e795edac8f6b04634fc7ede78dff431d0bc21
2023-12-21 19:50:08 +00:00
Vladislav
bbc7164ab9 RUST-11915 Show python interpreter settings in RustRover
Similar to d05cbf7f49
 + c78b497938044009238095bdbf8fba913215d1d2

GitOrigin-RevId: cd86586528e084650db78f4d19e28eec76c5dc34
2023-09-19 03:45:16 +00:00
Dmitriy.Panov
be237eccff IJI-1023 plugins validation with org.jetbrains.intellij.plugins:structure-intellij library
GitOrigin-RevId: f81477dcc2f57a032181fd7eb9ea3085e1f6b579
2023-02-07 11:00:50 +00:00
Tatiana Tulupenko
2ba71d4533 Move iconMapper to the correct xml
GitOrigin-RevId: b168aaa7d366f3e5f40398ee2902c161159578f2
2022-06-16 12:08:20 +00:00
Tatiana Tulupenko
4b94b45212 Cleanup: remove empty body
GitOrigin-RevId: f90c99fe0790013579e2aa6bf1e2552efee6d22d
2022-06-15 10:57:19 +00:00
Tatiana Tulupenko
8bba03620d [ExpUI] Add Python console tool window icon
GitOrigin-RevId: 97626ec87bdbaec5bfe1509648d7e69f06a19dc3
2022-06-14 20:43:06 +00:00
Andrey Vlasovskikh
eaefde3c09 PY-46321 Added Markdown code fence aliases for PyDocstring and Python
* PyDocstring: "pycon", "python-repl"
* Python: "py", "python3"

I've added the links to the documents describing popular references to `PyCodeFenceLanguageProvider`.

GitOrigin-RevId: 6cafb15c9655434f5d69aa47eb7472b634364377
2021-04-27 17:31:57 +00:00
Mikhail Golubev
d7b6d55cf6 Move the dependency on IFT from python-core-common.xml to specific IDE plugins
Otherwise, it prevented launching tests with "intellij.python.community.tests"
module. Why exactly the core plugins such as "IDEA CORE" were absent in this
case remains to be further investigates, though.

GitOrigin-RevId: 4f0ce0270cdcf83c860eb0bed12c446648f288c9
2020-12-08 20:37:27 +00:00
Mikhail Golubev
8e6b628d12 PY-41923 Turn PythonConsoleRunnerFactory and its implementations into services
GitOrigin-RevId: 2811efc57958aa9a8598e2e7d801c97fed71a991
2020-04-29 22:04:28 +00:00
Mikhail Golubev
17ed1d40a1 PY-40470 Move Python support from the bundled Grazie plugin to PyCharm core
First of all, it's easier to maintain the corresponding extensions this way as
the language evolves.

Also, it will help to extract remaining language-specific logic from Grazie to
other language plugins, as existing direction of optional dependencies (Grazie -> Python)
prevented doing the same for JavaScript because of an introduced plugin dependency
(JavaScript -> Grazie -> Python -> JavaScriptDebugger).

GitOrigin-RevId: a1e5a3d8121daf4f949abd0a602eb79c8a6f6dd9
2020-02-21 18:15:52 +00:00
Andrey Vlasovskikh
543ca840b7 Extracted "impl" modules from Python Community and PyCharm Community Customization to use them in other Python plugins for builds and runs
The non-impl modules for these plugins now contain more or less just their plugin.xml files
that declare corresponding dependencies.

GitOrigin-RevId: 84fc4761a595912d676cff1e2ab58fba03a8cd22
2019-11-18 19:07:46 +00:00