Add pixi support#348
Open
lguerard wants to merge 4 commits into
Open
Conversation
…port Introduces EnvCLIConfigurator, a new base class for CLI configurators that run a Python tool in a managed environment. It supports both conda and pixi launchers via a SelectableArguments group keyed "LAUNCHER", letting the user choose at runtime in the config panel. Key additions: - EnvCLIConfigurator: dual-mode base (conda + pixi). Automatically defaults to pixi when a pixi projects root is configured. Contains CondaEnvironmentCommand and PixiEnvironmentCommand inner classes. PixiEnvironmentCommand scans a pixi project directory for available environments (.pixi/envs/). - CondaCLIConfigurator: refactored to a thin wrapper extending EnvCLIConfigurator(Launcher.CONDA) for backward compatibility. - CLIUtils: added pixi utilities — getPixiPath(), getPixiProjectsRoot(), getPixiManifestPath(), findPixiProjectsInRoot(), getPixiModuleVersion(), runInPixiEnv(). - pixipath/PixiPathConfigCommand: SciJava command for the "Configure TrackMate Pixi path…" menu entry. - pixipath/PixiDetector: detects pixi installations and lists available project environments. - CommandBuilder: updated to handle pixi translator lambdas. - Configurator: minor API additions needed by PixiEnvironmentCommand. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…panel ConfigGuiBuilder.visit(PixiEnvironmentCommand) now builds a full pixi launcher UI inside the detector configuration panel. When the pixi projects root contains multiple projects a combobox lets the user pick the project; a second combobox shows the available environments discovered by scanning .pixi/envs/ inside that project. When only one project exists a path text field with Browse/Find/Refresh buttons is shown instead. In dual-mode panels (conda + pixi) both launchers appear in a row of labeled radio buttons separated from the conda section by a titled separator, keeping the panel compact and scrollable. State management: - pathElement.onSet hook re-syncs the project combobox and env list whenever panel.refresh() is called (e.g. from setSettings()), so the saved project path and environment are correctly restored after wizard navigation. - refreshEnvCombo() preserves the currently-selected environment when reloading the env list; falls back to the first env only when the saved value is absent or no longer valid for the project. - PixiEnvironmentCommand.set() no longer validates the value against the cached env list, which may be empty or stale at deserialization time. refreshEnvCombo() is responsible for correcting invalid values after the env list is reloaded from the file system. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
DetectionPreview previously logged all output exclusively to a JLabelLogger — a single-line status label inside the detector configuration panel. Users looking at the TrackMate info window (opened via the info button) saw no output after clicking Preview. A new optional extraLogger field (set via Builder.extraLogger()) receives only the final summary: "Found N spots." on success or the error message on failure. GenericDetectionConfigurationPanel wires model.getLogger() as the extra logger so preview results appear in the info window. Verbose detection output (command args, progress lines) stays in the in-panel label only to avoid polluting the main log. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move conda/pixi visit methods (~390 lines) into a new package-private LauncherEnvGuiSection class. ConfigGuiBuilder delegates via two-line stubs. Result: ConfigGuiBuilder 800 lines, LauncherEnvGuiSection 465 lines. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements and new utilities for handling logging and environment management in the TrackMate plugin, with a particular focus on enhancing support for Pixi environments and improving robustness around Conda environment detection. The most significant changes are grouped below by theme.
Pixi Environment Support:
CLIUtilsfor Pixi support, including detection of Pixi projects, manifest files, user configuration of Pixi paths, and querying Python module versions within Pixi environments. This allows TrackMate to better integrate with Pixi-managed environments. [1] [2]Logging Improvements:
extraLoggertoDetectionPreviewand its builder, allowing final preview summaries or errors to be surfaced in a secondary logger (e.g., the main TrackMate log) even when the primary logger is an in-panel widget. [1] [2] [3] [4] [5] [6] [7]Conda Environment Handling Robustness:
These changes collectively make environment management more flexible and robust, and improve user feedback during detection previews.
References:
Pixi support [1] [2] [3] [4] [5] [6]
Logging improvements [1] [2] [3] [4] [5] [6] [7]
Conda robustness [1] [2] [3] [4] [5]