-
Notifications
You must be signed in to change notification settings - Fork 695
Add pixi support #6157
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?
Add pixi support #6157
Conversation
- 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 <[email protected]>
- 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 <[email protected]>
- 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 <[email protected]>
- 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.
✅ Deploy Preview for nextflow-docs-staging ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
b4b321e
to
069653d
Compare
if( pixiFile.exists() ) { | ||
// Read the project directory path | ||
final projectDir = pixiFile.text.trim() | ||
result += "cd ${Escape.path(projectDir as String)} && " | ||
result += "eval \"\$(pixi shell-hook --shell bash)\" && " | ||
result += "cd \"\$OLDPWD\"\n" | ||
} | ||
else { | ||
// Direct activation from environment directory | ||
result += "cd ${Escape.path(pixiEnv)} && " | ||
result += "eval \"\$(pixi shell-hook --shell bash)\" && " | ||
result += "cd \"\$OLDPWD\"\n" | ||
} | ||
return result |
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.
Where is OLDPWD defined? Doesn't this change to the projectDir? Should we overwrite projectDir with the pixiFile contents?
While it's uncessary duplication, I prefer copying the pixi lock file into the working dir and using it at source, so we have a record. This has the additional advantage of making the code more simple and supporting a .pixi
or pixi.lock
file (psuedocode):
if( pixiFile.exists() ) { | |
// Read the project directory path | |
final projectDir = pixiFile.text.trim() | |
result += "cd ${Escape.path(projectDir as String)} && " | |
result += "eval \"\$(pixi shell-hook --shell bash)\" && " | |
result += "cd \"\$OLDPWD\"\n" | |
} | |
else { | |
// Direct activation from environment directory | |
result += "cd ${Escape.path(pixiEnv)} && " | |
result += "eval \"\$(pixi shell-hook --shell bash)\" && " | |
result += "cd \"\$OLDPWD\"\n" | |
} | |
return result | |
// assuming you have copied the pixi file to working dir | |
if( pixiFile.exists() ) { | |
result += "[ -d .pixi ] && [ -f pixi.lock ] || pixi install" | |
result += "eval \"\$(pixi shell-hook --shell bash)\"" | |
} | |
return result |
Downside - massive duplication of text files in every work dir.
Hi! Thanks for contributing to Nextflow.
When submitting a Pull Request, please sign-off the DCO [1] to certify that you are the author of the contribution and you adhere to Nextflow's open source license [2] by adding a
Signed-off-by
line to the contribution commit message. See [3] for more details.