Skip to content

Conversation

@uniqueg
Copy link
Member

@uniqueg uniqueg commented Apr 22, 2025

Fixes #94
Further fixes additional issues addressed in zavolanlab/zarp#181

Type of change

  • Breaking change (fix or feature that would cause existing functionality
    to not work as expected)
  • Build update

Checklist

  • I have performed a self-review of my own code
  • My code follows the existing coding style, lints and generates no new
    warnings
  • I have added type annotations to all function/method signatures, and I
    have added type annotations for any local variables that are non-trivial,
    potentially ambiguous or might otherwise benefit from explicit typing.
  • I have commented my code in hard-to-understand areas
  • I have added Google-style
    docstrings

    to all new modules, classes,
    methods/functions or updated previously existing ones
  • I have added tests that prove my fix is effective or that my feature
    works
  • New and existing unit tests pass locally with my changes and I have not
    reduced the code coverage relative to the previous state
  • I have updated any sections of the app's documentation that are affected
    by the proposed changes

Breaking changes

  • Enumerator for dependency embedding strategy requires APPTAINER instead of SINGULARITY

Summary by Sourcery

Update project dependencies, CI workflows, and replace Singularity with Apptainer for container management

New Features:

  • Replace Singularity with Apptainer as the container management system

Enhancements:

  • Update dependency versions
  • Modify Snakemake executor to support Apptainer
  • Remove Singularity-specific references in documentation

Build:

  • Update Python version support to 3.11
  • Update Conda and environment configuration
  • Remove root-specific environment files
  • Update project classifiers to reflect Python version support

CI:

  • Upgrade GitHub Actions workflows to latest versions
  • Update Conda setup to use Miniforge
  • Add Apptainer installation step in CI workflows
  • Modify test and documentation workflow configurations

@sourcery-ai
Copy link

sourcery-ai bot commented Apr 22, 2025

Reviewer's Guide by Sourcery

This pull request updates the project's dependencies and build configurations. It migrates from Singularity to Apptainer, updates Conda environment configurations, and adjusts CI workflows to use Miniforge. The changes also include updating dependency embedding strategies and supported Python versions.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Updated CI workflow configurations to use Miniforge, Conda, and Apptainer for setting up the environment and running tests.
  • Replaced conda-incubator/setup-miniconda@v2 with conda-incubator/setup-miniconda@v3 to set up Miniforge.
  • Configured Conda with environment.dev.yml, miniforge-version, conda-remove-defaults, channel-priority, auto-update-conda, and activate-environment.
  • Added a step to install Apptainer using eWaterCycle/setup-apptainer@v2 with a specified version.
  • Removed Python version and Mamba version specifications from the setup.
  • Removed matrix strategy for unit and integration tests.
  • Updated actions/checkout to v4.
.github/workflows/tests.yml
.github/workflows/docs.yml
Updated dependency specifications in environment.yml and environment.dev.yml to include specific versions and remove unnecessary channels.
  • Added bioconda::genomepy >=0.15.0 and bioconda::snakemake >=8 as dependencies.
  • Removed the channels section.
  • Updated python version to >=3.11.
  • Removed types-PyYAML >=6.0.11 and added types-pyyaml >=6.0.11.
  • Removed upper bound for pandas version.
install/environment.dev.yml
install/environment.yml
Renamed SINGULARITY to APPTAINER in code and documentation to reflect the change in container technology.
  • Replaced --use-singularity with --use-apptainer in the Snakemake command compilation.
  • Replaced --singularity-args with --apptainer-args in the Snakemake command compilation.
  • Changed SINGULARITY to APPTAINER in the DependencyEmbeddingStrategies enum.
  • Updated documentation to refer to Apptainer instead of Singularity.
zarp/snakemake/run.py
tests/snakemake/test_run.py
zarp/config/enums.py
docs/includes/references.md
docs/guides/initialization.md
docs/guides/installation.md
tests/config/test_args.py
Removed root environment files.
  • Deleted environment.dev.root.yml.
  • Deleted environment.root.yml.
install/environment.dev.root.yml
install/environment.root.yml
Updated setup.py to reflect changes in supported Python versions.
  • Removed specific Python versions 3.9 and 3.10 and replaced them with a general Python 3 specification.
setup.py

Assessment against linked issues

Issue Objective Addressed Explanation
#94 Fix the bug where ZARP-cli fails when conda's channel priority is set to strict due to conflicts with biopython versions.

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!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

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 @uniqueg - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider using a dependabot configuration file to automate dependency updates.
  • The switch from Singularity to Apptainer is a breaking change that should be communicated clearly to users.
Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

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.

@codecov
Copy link

codecov bot commented Apr 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (e9a3887) to head (874bb0d).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev       #97   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           24        24           
  Lines         1263      1263           
=========================================
  Hits          1263      1263           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Strict Conda channel priority not supported

3 participants