Skip to content

feat: allow to use custom snakemake branch instead of conda version#53

Merged
johanneskoester merged 3 commits intomasterfrom
feat/custom-branch
Mar 26, 2026
Merged

feat: allow to use custom snakemake branch instead of conda version#53
johanneskoester merged 3 commits intomasterfrom
feat/custom-branch

Conversation

@johanneskoester
Copy link
Copy Markdown
Contributor

@johanneskoester johanneskoester commented Mar 26, 2026

Summary by CodeRabbit

  • New Features

    • Added configurable Snakemake version selection from conda channels
    • Added support for installing Snakemake from a specific git branch, with precedence over version selection
  • Documentation

    • Updated documentation with new input parameters and usage examples
  • Chores

    • Enhanced CI testing with branch-targeted test execution
    • Updated conda environment configuration defaults

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 26, 2026

📝 Walkthrough

Walkthrough

The PR adds support for installing Snakemake from a git branch via a new snakemake-branch input parameter. When specified, this input overrides snakemake-version and installs Snakemake directly from source. The changes include action input configuration, documentation updates, and a new CI test step demonstrating the feature.

Changes

Cohort / File(s) Summary
Action Configuration
action.yml
Added snakemake-branch input to support git-based Snakemake installation. When set, environment preparation installs python and pip instead of pinned snakemake, then executes conditional pip install step. Updated boolean input defaults from unquoted to string format ("false"); reformatted snakemake-version description; updated miniforge-version to latest.
Documentation
README.md
Documented new inputs snakemake-version (conda version, default *) and snakemake-branch (git branch, optional). Specified precedence where snakemake-branch overrides snakemake-version. Added example workflow step demonstrating snakemake-branch: main usage.
CI Workflow
.github/workflows/main.yml
Added "Test run branch" workflow step that executes the action against .test directory with snakemake-branch: "main" input before the existing "Test containerize" step.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately describes the main change: adding the ability to use a custom Snakemake branch as an alternative to the conda version.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/custom-branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
action.yml (1)

102-106: Consider pinning Snakemake's dependencies or adding installation verification.

The pip install from git works, but a few observations:

  1. If the branch name doesn't exist, pip will fail with an error message that may not be immediately clear to users.
  2. Snakemake has many dependencies that will be resolved by pip rather than conda, which could lead to different behavior than the conda-installed version.

These are acceptable trade-offs for a feature explicitly designed for testing custom branches, but you might want to add a brief echo statement before the install to clarify what's happening.

💡 Optional: Add informative message before install
     - name: Install snakemake from git branch
       if: ${{ inputs.snakemake-branch != '' }}
       shell: bash -el {0}
       run: |
+        echo "Installing Snakemake from branch: ${{ inputs.snakemake-branch }}"
         python -m pip install "git+https://github.com/snakemake/snakemake@${{ inputs.snakemake-branch }}"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@action.yml` around lines 102 - 106, The "Install snakemake from git branch"
step that installs via python -m pip install
"git+https://github.com/snakemake/snakemake@${{ inputs.snakemake-branch }}"
should be made more transparent and resilient: add an echo or printf before the
install indicating which branch is being installed (referencing the step name
and inputs.snakemake-branch), then after the pip install run a quick
verification such as checking the exit code and running python -m pip show
snakemake or snakemake --version to confirm installation succeeded; optionally,
if you want stricter reproducibility, consider adding pinned dependency
constraints or a requirements file reference to the pip install command to avoid
unexpected dependency resolution differences from the conda build.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@action.yml`:
- Around line 102-106: The "Install snakemake from git branch" step that
installs via python -m pip install
"git+https://github.com/snakemake/snakemake@${{ inputs.snakemake-branch }}"
should be made more transparent and resilient: add an echo or printf before the
install indicating which branch is being installed (referencing the step name
and inputs.snakemake-branch), then after the pip install run a quick
verification such as checking the exit code and running python -m pip show
snakemake or snakemake --version to confirm installation succeeded; optionally,
if you want stricter reproducibility, consider adding pinned dependency
constraints or a requirements file reference to the pip install command to avoid
unexpected dependency resolution differences from the conda build.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3824ff98-159b-4367-8b0b-64a759f0cf60

📥 Commits

Reviewing files that changed from the base of the PR and between ae3c4be and 7712655.

📒 Files selected for processing (3)
  • .github/workflows/main.yml
  • README.md
  • action.yml

@johanneskoester johanneskoester merged commit 6c5b9f2 into master Mar 26, 2026
4 checks passed
@johanneskoester johanneskoester deleted the feat/custom-branch branch March 26, 2026 13:04
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