fix: Flatten conda pip dependencies for report rule info#3085
fix: Flatten conda pip dependencies for report rule info#3085johanneskoester merged 2 commits intosnakemake:mainfrom
Conversation
Currenlty pip dependencies specified in conda environments break the rule_info of the snakemake report. This flattens the pip secion as: pip: <dependency 1> pip: <dependency 2> before displaying which fixes this issue. Fixes: Issue snakemake#3084
WalkthroughThe pull request introduces a new function, Changes
Possibly related issues
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
Outside diff range and nitpick comments (1)
snakemake/report/html_reporter/template/components/rule_info.js (1)
54-54: Improve consistency of therenderSoftwaremethod.The
renderSoftwaremethod returns an empty array if the rule has no conda environment, which is not consistent with the other render methods.Apply this diff to improve the method:
- } else { - return []; + } else { + return null; }
I manually testest that this still work and but have to trust the AI that it is really better Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
|
🤖 I have created a release *beep* *boop* --- ## [8.20.4](v8.20.3...v8.20.4) (2024-09-20) ### Bug Fixes * cache conda envs to fix performance regression introduced in #1300 ([#3093](#3093)) ([66600c4](66600c4)) * Flatten conda pip dependencies for report rule info ([#3085](#3085)) ([56a1f20](56a1f20)) * improve runtime complexity of post-job checkpoint handling ([#3096](#3096)) ([ba30781](ba30781)) ### Documentation * Clarify the lookup function docstring ([#3091](#3091)) ([94177d5](94177d5)) * Update lookup signature ([#3090](#3090)) ([655d6a1](655d6a1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>



Currently pip dependencies specified in conda environments break the rule_info of the snakemake html report as reported in #3084
This works around this issue by flattening the pip secion as:
pip: <dependency 1>
pip: <dependency 2>
before displaying which fixes this issue.
QC
docs/) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake).Additional considerations
report.htmlworking, so any alternative/better solution would be very welcome as wellpipsection of the conda envrionment:will be rendered as:
Potentially one could do this nicer with indenting.
Example rendering:

Summary by CodeRabbit
Summary by CodeRabbit