- Add PyPackageName.normalizeProjectName() per PEP 503 name normalization spec
- Normalize project names in uv, poetry, and hatch project generators
- Fix hatch createNewProject to use NioFiles.copyRecursively instead of broken EEL move
- Add background progress indicators for module structure creation and SDK setup
- Refresh VFS with markDirtyAndRefresh after module structure creation
- Add TraceContext to project generation and packaging tool window coroutines
(cherry picked from commit b64dfb4ae541e4a220698d804aec3fe95103bdf2)
IJ-MR-194426
GitOrigin-RevId: 0a1212d70d8136e1ba8821b736d09e00d78f310e
This MR cherry picks changes done for PY-87723 and PY-87578
Merge-request: IJ-MR-193482
Merged-by: David Lysenko <david.lysenko@jetbrains.com>
GitOrigin-RevId: c74229ed48ae8702667dda201613a2d0c3f25369
These changes support collecting python project dependencies from PEP
621 standard pyproject.toml locations (including dependency groups).
Also a support for tool specific keys to collect their dependencies was
added as well.
(cherry picked from commit cc376c1696b3ddd435e113cfa39b547d60f0f791)
IJ-MR-193200
GitOrigin-RevId: 6d87d4983755525322ca0a4f2c1aedc4510a817b
[pycharm] PY-87123 Synchronize build files
[pycharm] PY-87123 Add icons for process weight
[pycharm] PY-87123 Extract Pipenv icons/mapper into a pipenv module
[pycharm] PY-87123 Extract Conda icons/mapper into a separate module
[pycharm] PY-87459 Fix process tree autoscroll
Fixes an issue in which the process tree would not automatically scroll up
after new processes are added.
[pycharm] PY-87112 Change the icon of the tool window to a new one
[pycharm] PY-87123 Rename `Styling` object to `OutputSectionStyling`
This is done to match the naming of `TreeSectionStyling`.
[pycharm] PY-87123 Render spinner instead of an icon for running processes
[pycharm] PY-87123 Refactor TreeSection
* Extract tree content into its own composable
* Extract styling values into a styling object
* Remove redundant icons that can be constructed programmatically
[pycharm] PY-87123 Address feedback
[pycharm] PY-87123 Implement custom styling for critical errors
Critical errors are ones that are displayed to the user via the error sink.
[pycharm] PY-87123 Add tool-dependant icons to POTW process tree
[pycharm] PY-87123 Implement ProcessOutputIconMapping extension point
The extension point provides a way for tooling-related modules to define
custom mapping between file extensions and icons that should be used by
the Process Output Tool Window.
Merge-request: IJ-MR-189367
Merged-by: David Lysenko <david.lysenko@jetbrains.com>
GitOrigin-RevId: 0d728779f04f2066e929954681ec7a23741f5f74
`Result` was introduced to attach addition error information. If there is one, and only one possible error, `null` is much cleaner solution.
Just like `Map.get` doesn't return `PyResult` but `null` of no element found, one doesn't use `PyResult` for things like `detectTool` if the only two possible results are either tool or "no tool found".
GitOrigin-RevId: 969c817f84dfc9d61cc3737214deac1bc5c84327
Our tool detection approach varies a lot. We have different logic for
uv, poetry and other tools. Also, uv detection is not suspendable and
doesn't have any explicit thread requirements, even though it performs
I/O operations.
This change makes such detection unified and suspendable (where
possible) and moves it to BGT.
GitOrigin-RevId: 31701e9f0a66a25628f1b5c1e4f1864692e38217
Each tool (uv, poetry) now has `common` and `backend` part. `common` has icons because we need them both on the front and on the back.
We might need to create `front` module also if we wouldn't be able to use icons in compose.
GitOrigin-RevId: b5662fbdf3d23f1ddaa5926469d1cfd2051a0fba
We are slowly moving all tools to the separate modules to register them as EP. On the front we might have `ToolId` only. To map it to an icon we will use EP.
GitOrigin-RevId: 642f4b8d77a0a14b6b61a5192607fbc7984529c7
Before the changes, there wasn't any mechanism to detect that
environment was already created (for example, .venv exists in the
project). In these situations, during SDK creation we could've created
another environment which was not expected by users.
With these changes, it's now possible to detect in the configurator that
environment already exists, and use it when creating SDK.
Merge-request: IJ-MR-177317
Merged-by: Alexey Katsman <alexey.katsman@jetbrains.com>
GitOrigin-RevId: a612a1069ca5275bedbcfa6af9377059dab7c072
This commit enables check only for modules WITH a Kotlin facet
Bazel generator was updated as well
GitOrigin-RevId: 90a3427d4b5a3ebc29e257693cb3748ac09bfc6a
API changes:
Class `Args` is not used to provide arguments for commands. Previous implementation was incompatible with Targets.
Instead of `Path` we now accept `BinaryToExec` which is either Eel or Target based.
Impl:
`ExecServiceImpl` now delegates execution to `com.intellij.python.community.execService.impl.processLaunchers`: there are two functions (Eel and Targets)
Merge-request: IJ-MR-171488
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>
GitOrigin-RevId: 4c4ac7023e6605caaacb1880d60faf145b4160bf
Use `ExecService` `api.kt` to exec any binary and extensions from `execService.python/api.kt` for python-specific things (i.e helpers)
GitOrigin-RevId: bb217798a9d1ee886c4b12220ec1f66a5ef08336
According to feedback, the name `upgrade` confuses people.
We refused `getEelApi` because this call usually implies a getter, and a getter usually implies some lightweight operation.
We refused `make`, `convert`, `get` and other short methods because they're as confusing as `upgrade`.
GitOrigin-RevId: 56adf5362f93bc4f98954db79c039e5e898b4550
It is not convenient to use progress reporting: it is sometimes better to collect it explicitly to customize output
GitOrigin-RevId: 79a68ec8b35540cfdc6aab4fda54245a7a270247
1. `ProcessOutput` is a legacy thing with some redundant flags: replaced with modern `EelProcessExecutionResult`.
2. There was a bug in `ProcessInteractiveHandler`: one could fetch all data from stdout, and we then did that again to get a result. That leads to an empty result. It is now fixed, see `executeInteractive` doc.
GitOrigin-RevId: 7fa57f8110a202a32a3531ff6507d42a270075a3
* PythonPackageManagerJobService.kt added to manage tool jobs
* Base PythonPackageManagerAction.kt was added to cover all python package manager actions
* Implementations for Poetry / Hatch / uv
* Poetry pyproject.toml watcher was removed (replaced with poetry actions)
GitOrigin-RevId: 0bbc5a7802826674140ca1c80be27b6cd7d0f59e
DO:
For upper-level (public) API use `PyResult`.
(Optionally) for low-level APIs inside your modules use python `Result<S, E>`.
Represent errors as `PyError` whenever possible.
Report `PyError` to `ErrorSink` at the top of your code.
DON'T:
Use `kotlin.Result`
Use `PyExecutionException`
Use any exception to represent user errors.
GitOrigin-RevId: 4ecf69e1fae8be9192cd33b90e0147c725a98964