-
Notifications
You must be signed in to change notification settings - Fork 722
Package directive #6342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Package directive #6342
Conversation
✅ Deploy Preview for nextflow-docs-staging canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done, seems going in the right direction. need to look more in deep for some low level details
The conda provider supports: | ||
- Package specifications with version constraints | ||
- Custom channels | ||
- Environment files (`.yml`, `.yaml`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm tempted to get rid of env files with the new directive. Tool requirements should be strictly the ones required by the task, not bloated env files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which part of env files do you not like?
- The extra file
- The separation of the packages from the process
People having bloated Nextflow processes is just a part of migrating old scripts to Nextflow. Because their scripts, prior the "business" logic, was mixed with the actual implementation logic, it can be a pain to separate out.
Task batching or grouping would help people organize the logic; sometimes, it's a performance concern, like piping BWA into Samtools.
I personally like the environment.yamls, and I find once you get over three packages(which happens in an R script) and add in the channels, you can't read the conda
directive. 😅
So, compromise, what if we made the environment.yml magically picked up like Dockerfiles are with wave? I just want to get rid of the conda "${moduleDir/environment.yml}"
line.
31ca478
to
89f69bc
Compare
- Introduced PixiConfig and PixiCache classes for managing Pixi environments. - Updated Session class to include PixiConfig retrieval. - Enhanced CmdRun with options to enable/disable Pixi environments. - Modified ConfigBuilder to apply Pixi environment settings based on command-line options. - Updated BashWrapperBuilder to include Pixi activation in the execution script. - Added pixiEnv property to TaskBean and methods in TaskRun for Pixi environment handling. - Updated ProcessConfig to include 'pixi' in process configuration options. This commit integrates Pixi environment management into the Nextflow framework, allowing users to specify and control Pixi environments during execution. Signed-off-by: Edmund Miller <edmund.miller@seqera.io>
- Introduced PixiCacheTest and PixiConfigTest classes to validate Pixi environment functionality. - Added tests for TOML and lock file detection, environment prefix path creation, and command execution handling. - Implemented checks for configuration options and cache directory retrieval in PixiConfig. This commit enhances the test coverage for Pixi environment management, ensuring robust functionality within the Nextflow framework. Signed-off-by: Edmund Miller <edmund.miller@seqera.io>
- Introduced PixiCacheIntegrationTest class to validate PixiCache behavior with various environment specifications. - Implemented tests for creating environments from package specifications, TOML files, and lock files. - Added checks for handling custom cache directories and validating TOML and lock file detection. - Enhanced coverage for existing prefix directory handling and environment variable cache directory usage. This commit strengthens the testing framework for PixiCache, ensuring reliable environment management within the Nextflow ecosystem. Signed-off-by: Edmund Miller <edmund.miller@seqera.io>
- Changed the environment specification from 'python=3.8' to 'cowpy'. - Updated the script to utilize cowpy for output instead of a Python command. This modification enhances the testing of Pixi environments by leveraging cowpy for greeting functionality. Signed-off-by: Edmund Miller <edmund.miller@seqera.io>
Introduces the `nextflow.preview.package` feature flag to enable the unified package management system. This allows users to opt-in to the new `package` directive while maintaining backward compatibility with existing `conda` and `pixi` directives. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Edmund Miller <edmund.miller@seqera.io>
Creates the foundation for unified package management with: - PackageSpec: Unified specification for packages across providers - PackageProvider: Interface for package manager implementations - PackageManager: Central coordinator for package providers - PackageProviderExtension: Plugin extension point for providers This abstraction layer enables consistent package management across different tools (conda, pixi, mamba, etc.) while supporting both simple and advanced configuration patterns. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Edmund Miller <edmund.miller@seqera.io>
Extends process configuration to support the unified package directive: - ProcessConfig: Adds 'package' to the list of valid directives - TaskRun: Implements getPackageSpec() method with caching - TaskBean: Adds packageSpec field for task execution Also adds deprecation warnings when conda/pixi directives are used with the preview.package feature enabled, encouraging migration to the new unified syntax. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Edmund Miller <edmund.miller@seqera.io>
Enhances the bash wrapper system to support the new package directive: - BashWrapperBuilder: Adds getPackageActivateSnippet() method that creates package environments using the PackageManager - command-run.txt: Adds {{package_activate}} template variable for package environment activation The new system works alongside existing conda/pixi activation, enabling gradual migration while maintaining backward compatibility. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Edmund Miller <edmund.miller@seqera.io>
Creates the nf-conda plugin that implements conda support for the unified package management system: - CondaPlugin: Main plugin class - CondaPackageProvider: Implements PackageProvider interface - CondaProviderExtension: Registers the provider with Nextflow - Includes existing CondaCache and CondaConfig implementations This plugin enables conda package management through the new unified 'package' directive while maintaining all existing conda functionality and configuration options. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Edmund Miller <edmund.miller@seqera.io>
Creates the nf-pixi plugin that implements pixi support for the unified package management system: - PixiPlugin: Main plugin class - PixiPackageProvider: Implements PackageProvider interface - PixiProviderExtension: Registers the provider with Nextflow - Includes existing PixiCache and PixiConfig implementations This plugin enables pixi package management through the new unified 'package' directive, providing fast conda-compatible package resolution with lockfile support. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Edmund Miller <edmund.miller@seqera.io>
89f69bc
to
ee856fc
Compare
Integrates the unified package management system with Wave for container building: - Add PackageSpec to Wave PackagesSpec conversion in WaveClient - Support provider mapping (conda/mamba/pixi -> CONDA type in Wave) - Enable package directive processing through Wave container builds - Use HxClient API for HTTP requests (aligned with lib-httpx refactor) - Add comprehensive package management documentation - Remove deprecated Pixi implementation in favor of unified system - Add integration tests for package management workflows This enables the `package` directive to work seamlessly with Wave for building containers with the specified package dependencies. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
ee856fc
to
ed16697
Compare
PoC of a package directive.
Moved conda into a plugin, and the Pixi code from #6157. Hoping that by making them plugins, we can support things like #1526 in the community, etc.
I also wanted to keep
conda
for now(it might throw a deprecation, but it shouldn't yet) and tried to gate it behind a feature flag.