Skip to content

Upgrade to Snakemake version 9 #191

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

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open

Upgrade to Snakemake version 9 #191

wants to merge 4 commits into from

Conversation

fgypas
Copy link
Member

@fgypas fgypas commented Jul 13, 2025

Description

Upgrade Snakemake version 9

Fixes #190

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation updated

Conventional Commits guidelines

Changes to workflow inputs (sample table and/or configs)

  • major (add BREAKING CHANGE: in the beginning of the PR title)
    • more fields/properties are required
    • existing ones are dropped entirely
  • minor (add feat: in the beginning of the PR title)
    • optional fields/properties are added
    • required ones are made optional

Changes to workflow outputs

  • major (add BREAKING CHANGE: in the beginning of the PR title)
    • changes lead to removal/change of existing outputs (format or location)
  • minor (add feat: in the beginning of the PR title)
    • additional outputs are generated
    • content (but not format or location) of existing outputs changes

Everything else: patch
(add any other conventional commit in the beginning of the PR title)

Checklist:

  • My code changes follow the style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • I have updated the project's documentation

Summary by Sourcery

Upgrade Snakemake requirement to version 9.3.3 and standardize core dependencies on the conda-forge channel in both development and production environment files.

Enhancements:

  • Bump Snakemake requirement to >=9.3.3 in environment.yml and environment.dev.yml
  • Switch biopython, conda, graphviz, pyopenssl, python, and unzip dependencies to conda-forge channel in both environment files

Copy link

sourcery-ai bot commented Jul 13, 2025

Reviewer's Guide

The PR upgrades the Snakemake dependency to version 9.3.3 and standardizes all environment YAML dependencies to the conda-forge channel, including adding an explicit conda package in both development and production config files.

File-Level Changes

Change Details Files
Bump Snakemake to version >=9.3.3
  • Updated Snakemake constraint in environment.yml
  • Updated Snakemake constraint in environment.dev.yml
install/environment.yml
install/environment.dev.yml
Migrate dependencies to conda-forge channel
  • Prefixed biopython, graphviz, pyopenssl, python, and unzip with conda-forge
  • Ensured consistent channel usage across both YAMLs
install/environment.yml
install/environment.dev.yml
Add explicit conda package
  • Inserted conda-forge::conda entry into environment.yml
  • Inserted conda-forge::conda entry into environment.dev.yml
install/environment.yml
install/environment.dev.yml

Assessment against linked issues

Issue Objective Addressed Explanation
#190 Upgrade the Snakemake version to version 9 or higher.
#190 Update the yaml files to reflect the Snakemake version upgrade.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @fgypas - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `install/environment.dev.yml:7` </location>
<code_context>
-  - graphviz
-  - unzip
+  - conda-forge::biopython
+  - conda-forge::conda
+  - conda-forge::graphviz
+  - conda-forge::pyopenssl>=23.2.0
</code_context>

<issue_to_address>
Including 'conda' as a dependency may be redundant within a conda environment.

Including 'conda' as a dependency can lead to conflicts since the environment is already managed by conda. Please verify if this is necessary.
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
  - conda-forge::conda
=======
>>>>>>> REPLACE

</suggested_fix>

### Comment 2
<location> `install/environment.yml:4` </location>
<code_context>
-  - graphviz
-  - unzip
+  - conda-forge::biopython
+  - conda-forge::conda
+  - conda-forge::graphviz
+  - conda-forge::pyopenssl>=23.2.0
</code_context>

<issue_to_address>
Adding 'conda' to the environment may introduce unnecessary complexity.

Only include the conda CLI if it's strictly needed to avoid potential version or path conflicts.
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
  - conda-forge::conda
  - conda-forge::graphviz
=======
  - conda-forge::graphviz
>>>>>>> REPLACE

</suggested_fix>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Collaborator

@ninsch3000 ninsch3000 left a comment

Choose a reason for hiding this comment

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

Thanks for the version update @fgypas. The zarp conda environment builds successfully, however, running tests with slurm fails as since version 8, Snakemake requires the use of executor plugins for cluster submission. Could you update slurm execution and corresponding docs?

@fgypas
Copy link
Member Author

fgypas commented Jul 20, 2025

Hi @ninsch3000 Thank very much for looking into it. I made an update to use the general executor plugin and updated the corresponding profiles. Can you please give it a try in the cluster? Thank you in advance for your help.

@fgypas fgypas requested a review from ninsch3000 July 21, 2025 08:34
Copy link
Collaborator

@ninsch3000 ninsch3000 left a comment

Choose a reason for hiding this comment

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

Hi @fgypas
Thanks for implementing this.
I ran all the tests for which we have a test.slurm.sh script and they all finished successfully.
As you're using the generic cluster plugin together with our old slurm*.py scripts - instead of using the snakemake slurm plugin - I assume this is because we have a highly customized setup for our HPC. Is that true? Do you assume this is portable to be used on other slurm clusters? Could you otherwise provide some comments on possible limitations in the README.
Thanks a lot again.

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.

feat: upgrade to Snakemake version 9
2 participants