Skip to content

Commit

Permalink
Remove project generator, package manager and SDK-related things (#12,
Browse files Browse the repository at this point in the history
  • Loading branch information
InSyncWithFoo authored Jan 30, 2025
1 parent 47bc496 commit 2cf72c1
Show file tree
Hide file tree
Showing 30 changed files with 13 additions and 1,371 deletions.
Binary file removed docs/assets/uv-new-project-panel.png
Binary file not shown.
20 changes: 3 additions & 17 deletions docs/configurations/uv.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,8 @@ to find one in the following order:
* Any `uv` executable found in the project's virtual environment.


## Use uv for package operations
## Configuration file

If enabled, the <i>Python Packages</i> toolwindow's package operations
will be performed with `uv` instead of the default `pip`.
If specified, this file will be passed to uv on every invocation.

This setting only affects projects generated using [the <i>uv</i> panel][1].

Default: `true`


### Enforce for non-uv project

If enabled, uv will be used for the current project,
even if it is not a uv-generated project.

Default: `false`


[1]: ../uv/generating.md
This corresponds to the `--config-file` command-line option.
82 changes: 0 additions & 82 deletions docs/uv/generating.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/uv/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
[uv][1] is a Python package and project manager.

RyeCharm provides uv integrations via two main functionalities:
[generating new projects][2] and [managing packages][3].


[1]: https://docs.astral.sh/uv
[2]: generating.md
[3]: managing.md
8 changes: 0 additions & 8 deletions docs/uv/managing.md

This file was deleted.

2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pluginVersion = 0.1.0-alpha-7

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 243.23654.100
pluginUntilBuild = 243.*
pluginUntilBuild = 251.*

# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
platformType = PY
Expand Down
2 changes: 0 additions & 2 deletions mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ nav:
- Intentions: ruff/intentions.md
- uv:
- uv integration: uv/index.md
- Generating new projects: uv/generating.md
- Managing packages: uv/managing.md
- Actions: uv/actions.md
- Intentions: uv/intentions.md
- Inspections: uv/inspections.md
Expand Down
5 changes: 0 additions & 5 deletions src/main/kotlin/insyncwithfoo/ryecharm/Sdk.kt
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
package insyncwithfoo.ryecharm

import com.intellij.openapi.projectRoots.Sdk
import insyncwithfoo.ryecharm.uv.sdk.UVSDKAdditionalData
import java.nio.file.Path


internal val Sdk.path: Path?
get() = homePath?.toPathOrNull()


internal val Sdk.isUV: Boolean
get() = sdkAdditionalData is UVSDKAdditionalData
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ internal class UVConfigurations : DisplayableState() {
var executable by string(null)
var configurationFile by string(null)

var packageManaging by property(true)
var packageManagingNonUVProject by property(false)

var retrieveDependenciesInReadAction by property(false)
var dependenciesDataMaxAge by property(5)
}
Expand Down
21 changes: 0 additions & 21 deletions src/main/kotlin/insyncwithfoo/ryecharm/configurations/uv/Panels.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ private fun Row.configurationFileInput(block: Cell<TextFieldWithBrowseButton>.()
singleFileTextField().makeFlexible().apply(block)


private fun Row.packageManagingInput(block: Cell<JBCheckBox>.() -> Unit) =
checkBox(message("configurations.uv.packageManaging.label")).apply(block)


private fun Row.packageManagingNonUVProjectInput(block: Cell<JBCheckBox>.() -> Unit) =
checkBox(message("configurations.uv.packageManagingNonUVProject.label")).apply(block)


private fun Row.retrieveDependenciesInReadActionInput(block: Cell<JBCheckBox>.() -> Unit) =
checkBox(message("configurations.uv.retrieveDependenciesInReadAction.label")).apply(block)

Expand All @@ -69,19 +61,6 @@ private fun UVPanel.makeComponent() = panel {
overrideCheckbox(state::configurationFile)
}

group(message("configurations.uv.groups.packageManagement")) {
row {
packageManagingInput { bindSelected(state::packageManaging) }
overrideCheckbox(state::packageManaging)
}
indent {
row {
packageManagingNonUVProjectInput { bindSelected(state::packageManagingNonUVProject) }
overrideCheckbox(state::packageManagingNonUVProject)
}
}
}

advancedSettingsGroup {
row {
retrieveDependenciesInReadActionInput { bindSelected(state::retrieveDependenciesInReadAction) }
Expand Down
9 changes: 8 additions & 1 deletion src/main/kotlin/insyncwithfoo/ryecharm/uv/commands/UV.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.jetbrains.python.packaging.common.PythonPackageSpecification
import insyncwithfoo.ryecharm.Command
import insyncwithfoo.ryecharm.CommandArguments
import insyncwithfoo.ryecharm.CommandFactory
import insyncwithfoo.ryecharm.Labeled
import insyncwithfoo.ryecharm.configurations.globalUVExecutable
import insyncwithfoo.ryecharm.configurations.uv.uvConfigurations
import insyncwithfoo.ryecharm.configurations.uvExecutable
Expand All @@ -15,13 +16,19 @@ import insyncwithfoo.ryecharm.message
import insyncwithfoo.ryecharm.path
import insyncwithfoo.ryecharm.rye.commands.Rye
import insyncwithfoo.ryecharm.rye.commands.homeDirectory
import insyncwithfoo.ryecharm.uv.generator.ProjectKind
import java.nio.file.Path
import kotlin.io.path.div
import kotlin.io.path.isDirectory
import kotlin.io.path.listDirectoryEntries


internal enum class ProjectKind(override val label: String) : Labeled {
APP(message("newProjectPanel.settings.projectKind.app")),
LIBRARY(message("newProjectPanel.settings.projectKind.library")),
PACKAGED_APP(message("newProjectPanel.settings.projectKind.packagedApp"));
}


internal fun PythonPackageSpecification.toPEP508Format() =
name + versionSpecs.orEmpty()

Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 2cf72c1

Please sign in to comment.