Skip to content

Add pixi support#22

Open
lguerard wants to merge 4 commits into
trackmate-sc:masterfrom
imcf:pixi-support
Open

Add pixi support#22
lguerard wants to merge 4 commits into
trackmate-sc:masterfrom
imcf:pixi-support

Conversation

@lguerard

Copy link
Copy Markdown

This pull request refactors the Cellpose and Cellpose-SAM CLI integration in TrackMate to improve extensibility and support both Conda and Pixi environments. The main changes include introducing new interfaces for CLI configurators, updating class hierarchies, and improving process management and user documentation.

CLI Refactoring and Extensibility

  • Introduced new interfaces ICellposeCLI and ICellposeSAMCLI to abstract CLI configuration, making it easier to support multiple launchers and extend functionality. (src/main/java/fiji/plugin/trackmate/cellpose/ICellposeCLI.java [1] src/main/java/fiji/plugin/trackmate/cellpose/sam/ICellposeSAMCLI.java [2]
  • Refactored CellposeCLIBase to extend EnvCLIConfigurator (instead of CondaCLIConfigurator) and implement ICellposeCLI, allowing runtime selection between Conda and Pixi launchers. (src/main/java/fiji/plugin/trackmate/cellpose/CellposeCLIBase.java [1] [2] [3]
  • Updated CellposeSAMCLI to implement ICellposeSAMCLI for consistency with the new interface-based design. (src/main/java/fiji/plugin/trackmate/cellpose/sam/CellposeSAMCLI.java src/main/java/fiji/plugin/trackmate/cellpose/sam/CellposeSAMCLI.javaL30-R30)

Detector and Factory Updates

  • Modified CellposeDetector and CellposeSAMDetector to depend on the new CLI interfaces, improving decoupling and flexibility. (src/main/java/fiji/plugin/trackmate/cellpose/CellposeDetector.java [1] src/main/java/fiji/plugin/trackmate/cellpose/sam/CellposeSAMDetector.java [2]
  • Updated corresponding factory classes and usage to work with the new configurator interfaces. (src/main/java/fiji/plugin/trackmate/cellpose/advanced/AdvancedCellposeDetectorFactory.java src/main/java/fiji/plugin/trackmate/cellpose/advanced/AdvancedCellposeDetectorFactory.javaL87-R88)

Process Management and Logging

  • Improved process execution in CellposeDetector to redirect stdout to a log file (for live output) and capture stderr in a background thread, enabling better error reporting and avoiding buffer blocking. (src/main/java/fiji/plugin/trackmate/cellpose/CellposeDetector.java [1] [2]

User Documentation

  • Updated user-facing messages to instruct users to configure either Conda or Pixi for TrackMate, reflecting the new launcher support. (src/main/java/fiji/plugin/trackmate/cellpose/CellposeDetectorFactory.java [1] src/main/java/fiji/plugin/trackmate/cellpose/sam/CellposeSAMDetectorFactory.java [2] src/main/java/fiji/plugin/trackmate/omnipose/OmniposeDetectorFactory.java [3]

Dependency Management

  • Bumped the TrackMate.version to 8.1.7-SNAPSHOT and added a property to skip reproducible-builds enforcement during development with SNAPSHOT dependencies. (pom.xml pom.xmlL96-R99)

lguerard and others added 4 commits June 18, 2026 13:00
CellposeCLIBase now extends EnvCLIConfigurator instead of
CondaCLIConfigurator, giving all cellpose/omnipose detectors a
dual-mode conda/pixi launcher selector in the config panel.

ICellposeCLI and ICellposeSAMCLI interfaces are extracted so
CellposeDetector and CellposeSAMDetector can accept both the
original concrete class and future pixi-aware subclasses without
casting. CommandBuilder.build() is called with an explicit
(CLIConfigurator) cast since the interface no longer extends
CLIConfigurator directly.

Info text in all detector factories updated to mention pixi setup.
TrackMate dependency bumped to 8.1.7-SNAPSHOT (adds EnvCLIConfigurator).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previously the non-omnipose cellpose process (i.e. the pixi/conda
execution path) redirected both stdout and stderr to INHERIT and
ignored the exit code, so a failed run silently reported 0 spots.

Fixes:
- stdout is now redirected to the cellpose log file (already tailed
  to the TrackMate logger for live progress output)
- stderr is drained in a background thread to prevent pipe-buffer
  blocking
- non-zero exit code causes detection to fail with an error message
  that includes the captured stderr, making the cause visible in the
  TrackMate info window

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ound

Aligns with upstream 8.1.7: bump pom-scijava 43→44, replace enforcer.skip
with legacyMode workaround for JPMS javadoc failure, fix contributor
indentation and trailing whitespace.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
RequireReproducibleBuilds blocks builds with SNAPSHOT deps. Skip enforcer
while developing against TrackMate 8.1.7-SNAPSHOT; remove once 8.1.7 releases.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant