Skip to content

feat: Modernize package configuration using Pixi#3369

Merged
johanneskoester merged 31 commits intosnakemake:mainfrom
jjjermiah:jjjermiah/3347-modernize-project-config
Mar 12, 2025
Merged

feat: Modernize package configuration using Pixi#3369
johanneskoester merged 31 commits intosnakemake:mainfrom
jjjermiah:jjjermiah/3347-modernize-project-config

Conversation

@jjjermiah
Copy link
Copy Markdown
Contributor

@jjjermiah jjjermiah commented Mar 11, 2025

resolves #3347

This PR is the first step in modernizing the project configuration by moving the setup.cfg sections to pyproject.toml, and defining environments using pixi.

pixi info
Project
------------
               Name: snakemake
            Version: 8.30.0
      Manifest file: /Users/bhklab/dev/snakemake-dev/snakemake/pyproject.toml
       Last updated: 12-03-2025 11:39:46

Environments
------------
        Environment: default
           Features: default
           Channels: conda-forge, bioconda
   Dependency count: 1
       Dependencies: python
  PyPI Dependencies: snakemake, appdirs, immutables, configargparse, connection-pool, docutils, gitpython, humanfriendly, jinja2, jsonschema, nbformat, packaging, psutil, pulp, pyyaml, requests, reretry, smart-open, snakemake-interface-executor-plugins, snakemake-interface-common, snakemake-interface-storage-plugins, snakemake-interface-report-plugins, tabulate, throttler, wrapt, yte, dpath, conda-inject
   Target platforms: linux-aarch64, osx-64, win-64, linux-64, osx-arm64

        Environment: dev
           Features: test, docs, style, default
           Channels: conda-forge, bioconda
   Dependency count: 41
       Dependencies: pytest, pytest-mock, pytest-cov, pytest-split, graphviz, oauth2client, numpy, glpk, pulp, boto3, responses, pytools, pandoc, crc32c, filelock, humanfriendly, pandas, pygments, pysftp, yte, ftputil, httpretty, polars, requests-mock, docutils, snakemake-storage-plugin-http, snakemake-storage-plugin-s3, snakemake-storage-plugin-fs, snakemake-executor-plugin-cluster-generic, conda, pip, sphinx, sphinx-argparse, sphinx_rtd_theme, sphinxawesome-theme, recommonmark, commonmark, myst-parser, sphinxcontrib-napoleon, black, python
  PyPI Dependencies: snakemake, appdirs, immutables, configargparse, connection-pool, docutils, gitpython, humanfriendly, jinja2, jsonschema, nbformat, packaging, psutil, pulp, pyyaml, requests, reretry, smart-open, snakemake-interface-executor-plugins, snakemake-interface-common, snakemake-interface-storage-plugins, snakemake-interface-report-plugins, tabulate, throttler, wrapt, yte, dpath, conda-inject
   Target platforms: linux-aarch64, osx-arm64, osx-64, linux-64, win-64
              Tasks: test-complex, test-all, format, test-simple, docs, build-docs

        Environment: py311
           Features: py311, test, default
           Channels: conda-forge, bioconda
   Dependency count: 32
       Dependencies: python, pytest, pytest-mock, pytest-cov, pytest-split, graphviz, oauth2client, numpy, glpk, pulp, boto3, responses, pytools, pandoc, crc32c, filelock, humanfriendly, pandas, pygments, pysftp, yte, ftputil, httpretty, polars, requests-mock, docutils, snakemake-storage-plugin-http, snakemake-storage-plugin-s3, snakemake-storage-plugin-fs, snakemake-executor-plugin-cluster-generic, conda, pip
  PyPI Dependencies: snakemake, appdirs, immutables, configargparse, connection-pool, docutils, gitpython, humanfriendly, jinja2, jsonschema, nbformat, packaging, psutil, pulp, pyyaml, requests, reretry, smart-open, snakemake-interface-executor-plugins, snakemake-interface-common, snakemake-interface-storage-plugins, snakemake-interface-report-plugins, tabulate, throttler, wrapt, yte, dpath, conda-inject
   Target platforms: osx-64, linux-aarch64, linux-64, osx-arm64, win-64
              Tasks: test-all, test-simple, test-complex

        Environment: py312
           Features: py312, test, default
           Channels: conda-forge, bioconda
   Dependency count: 32
       Dependencies: python, pytest, pytest-mock, pytest-cov, pytest-split, graphviz, oauth2client, numpy, glpk, pulp, boto3, responses, pytools, pandoc, crc32c, filelock, humanfriendly, pandas, pygments, pysftp, yte, ftputil, httpretty, polars, requests-mock, docutils, snakemake-storage-plugin-http, snakemake-storage-plugin-s3, snakemake-storage-plugin-fs, snakemake-executor-plugin-cluster-generic, conda, pip
  PyPI Dependencies: snakemake, appdirs, immutables, configargparse, connection-pool, docutils, gitpython, humanfriendly, jinja2, jsonschema, nbformat, packaging, psutil, pulp, pyyaml, requests, reretry, smart-open, snakemake-interface-executor-plugins, snakemake-interface-common, snakemake-interface-storage-plugins, snakemake-interface-report-plugins, tabulate, throttler, wrapt, yte, dpath, conda-inject
   Target platforms: win-64, osx-64, osx-arm64, linux-aarch64, linux-64
              Tasks: test-complex, test-all, test-simple

        Environment: docs
           Features: docs, default
           Channels: conda-forge, bioconda
   Dependency count: 9
       Dependencies: sphinx, sphinx-argparse, sphinx_rtd_theme, sphinxawesome-theme, recommonmark, commonmark, myst-parser, sphinxcontrib-napoleon, python
  PyPI Dependencies: snakemake, appdirs, immutables, configargparse, connection-pool, docutils, gitpython, humanfriendly, jinja2, jsonschema, nbformat, packaging, psutil, pulp, pyyaml, requests, reretry, smart-open, snakemake-interface-executor-plugins, snakemake-interface-common, snakemake-interface-storage-plugins, snakemake-interface-report-plugins, tabulate, throttler, wrapt, yte, dpath, conda-inject
   Target platforms: osx-arm64, win-64, linux-64, linux-aarch64, osx-64
              Tasks: docs, build-docs

        Environment: quality
           Features: style, default
           Channels: conda-forge, bioconda
   Dependency count: 2
       Dependencies: black, python
  PyPI Dependencies: snakemake, appdirs, immutables, configargparse, connection-pool, docutils, gitpython, humanfriendly, jinja2, jsonschema, nbformat, packaging, psutil, pulp, pyyaml, requests, reretry, smart-open, snakemake-interface-executor-plugins, snakemake-interface-common, snakemake-interface-storage-plugins, snakemake-interface-report-plugins, tabulate, throttler, wrapt, yte, dpath, conda-inject
   Target platforms: linux-aarch64, linux-64, win-64, osx-64, osx-arm64
              Tasks: format

        Environment: publish
           Features: publish, default
           Channels: conda-forge, bioconda
   Dependency count: 4
       Dependencies: setuptools, twine, python-build, python
  PyPI Dependencies: snakemake, appdirs, immutables, configargparse, connection-pool, docutils, gitpython, humanfriendly, jinja2, jsonschema, nbformat, packaging, psutil, pulp, pyyaml, requests, reretry, smart-open, snakemake-interface-executor-plugins, snakemake-interface-common, snakemake-interface-storage-plugins, snakemake-interface-report-plugins, tabulate, throttler, wrapt, yte, dpath, conda-inject
   Target platforms: osx-arm64, win-64, linux-aarch64, linux-64, osx-64
              Tasks: check-build, build


pixi task ls
pixi task ls       
Tasks that can run on this machine:
-----------------------------------
build, build-docs, check-build, docs, format, test-all, test-complex, test-simple

 - build           Build the package into the dist/ directory
 - build-docs      Build the documentation in the docs/ directory
 - check-build     Check that the package can be uploaded
 - docs            Serve the documentation on http://localhost:8000
 - format          Format the code
 - test-all        Runs both simple and complex tests
 - test-complex    Run all tests in the tests directory except tests.py
 - test-simple     Run tests only for tests/tests.pypixi task ls -s
Tasks per environment:
----------------------
py312: test-all, test-complex, test-simple
quality: format
publish: build, check-build
docs: build-docs, docs
py311: test-all, test-complex, test-simple
default: 
dev: build-docs, docs, format, test-all, test-complex, test-simple

Based on the github actions workflow which uses the old test-environment.yaml to install dependencies, which modify the yaml on-the-fly for windows testing, I also tried to define the linux specific test dependencies in the [tool.pixi.feature.test.target.linux-64.dependencies]

For the most part I've tried to split up dependencies into re-usable features, otherwise, which can be better utilized across duplicated dependencies in the test and docs env

Notes

  1. I am not sure why the old pyproject.toml specified requiring python < 3.11 for setuptools,

    requires = [
    "setuptools>=42",
    'tomli; python_version < "3.11"',
    ]

    Should this be added back?

  2. As explained in feat: Modernize package configuration using Pixi #3369 (comment)
    We ignore the lock file in library development to ensure tests reflect user environments while allowing developers to generate their own.

  3. I was getting this error in the test suite which I managed to fix with 71163c8, not sure if there is a different reason for this though.

Next Steps

  • verify that the tests work in the test environment as expected
  • verify the dependencies across the old and new configurations

Summary by CodeRabbit

Summary by CodeRabbit

  • Chores

    • Improved file handling by adding new entries to .gitattributes and .gitignore for better management of the pixi.lock file.
    • Updated GitHub Actions workflows to utilize Pixi for formatting checks and testing, introducing a new job for testing with Pixi.
    • Removed the setup.cfg configuration file.
  • Style

    • Enhanced code formatting in file handling routines for improved maintainability.
  • Tests

    • Added decorators to test functions to indicate dependencies on specific environment modules.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 11, 2025

📝 Walkthrough

Walkthrough

The pull request introduces updates to several configuration files and code style. The .gitattributes and .gitignore files now include new entries for the pixi.lock file to enforce binary merging and ignoring, respectively. The setup.cfg file, which housed metadata and dependencies for the Snakemake project, has been removed. Additionally, the file handling syntax in the YteRenderer.render method of snakemake/template_rendering/yte.py has been reformatted for clarity. Lastly, the GitHub Actions workflow (.github/workflows/main.yml) has been updated to utilize Pixi for formatting checks and testing, along with the addition of a new testing job.

Changes

File(s) Change Summary
.gitattributes, .gitignore Added new entries/patterns for pixi.lock to mark it as binary for merges and to have Git ignore it.
setup.cfg Removed the configuration file containing Snakemake project metadata, dependencies, and console script definitions.
snakemake/template_rendering/yte.py Reformatted the context manager in the YteRenderer.render method for improved clarity without changing functionality.
.github/workflows/main.yml Replaced micromamba setup with Pixi, added a new job tests, and updated existing jobs for testing and formatting checks.
tests/tests.py, tests/tests_using_conda.py Added @pytest.mark.needs_envmodules decorator to test_env_modules and test_archive functions, indicating they require specific environment modules.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer/PR
    participant GA as GitHub Actions
    participant Job as Jobs

    Dev->>GA: Push PR update
    GA->>GA: Evaluate conditions (PR merged? branch == main?)
    alt Conditions Met
        GA->>Job: Execute formatting, tests, build-container-image jobs
        Job-->>GA: Return job results
        GA->>GA: Execute testing-done job ("All tests passed")
    else Conditions Not Met
        GA-->>Dev: Skip conditional jobs
    end
Loading

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@jjjermiah
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 11, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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.

Actionable comments posted: 0

🧹 Nitpick comments (3)
snakemake/template_rendering/yte.py (2)

10-13: Enhanced Readability with Multi-line Context Manager

The refactor using a multi-line parenthesized with statement improves readability by clearly separating the file opening operations. This change preserves the functionality while making the code easier to maintain.


15-16: Consider Exception Chaining for Better Tracebacks

Currently, the exception is raised with raise WorkflowError("Failed to render yte template.", e). For improved traceback clarity, consider using Python’s exception chaining (e.g., raise WorkflowError("Failed to render yte template.") from e) if the WorkflowError class supports it.

🧰 Tools
🪛 Ruff (0.8.2)

16-16: Within an except clause, raise exceptions with raise ... from err or raise ... from None to distinguish them from errors in exception handling

(B904)

.gitignore (1)

34-37: Clarify and Validate New Ignore Patterns for Pixi Environments
The additions under the "# pixi environments" section correctly introduce ignoring for the .pixi directory and for *.egg-info files. Note that an ignore pattern for *.egg-info/ already exists on an earlier line. If the intent is to ignore both directories (with a trailing slash) and standalone files without the slash, a brief inline comment explaining this differentiation could help future maintainers.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d1c369b and 69f7620.

⛔ Files ignored due to path filters (2)
  • pixi.lock is excluded by !**/*.lock
  • pyproject.toml is excluded by !pyproject.toml
📒 Files selected for processing (4)
  • .gitattributes (1 hunks)
  • .gitignore (1 hunks)
  • setup.cfg (0 hunks)
  • snakemake/template_rendering/yte.py (1 hunks)
💤 Files with no reviewable changes (1)
  • setup.cfg
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.py`: Do not try to improve formatting. Do not suggest ...

**/*.py: Do not try to improve formatting.
Do not suggest type annotations for functions that are defined inside of functions or methods.
Do not suggest type annotation of the self argument of methods.
Do not suggest type annotation of the cls argument of classmethods.
Do not suggest return type annotation if a function or method does not contain a return statement.

  • snakemake/template_rendering/yte.py
🔇 Additional comments (1)
.gitattributes (1)

9-10: Enhanced Configuration for pixi.lock
The new lines configuring pixi.lock to use binary merges, with YAML syntax highlighting and a generated flag, are well implemented. This setup helps prevent merge conflicts and ensures proper treatment by GitHub’s linguist.

@jjjermiah jjjermiah marked this pull request as ready for review March 11, 2025 09:26
Copy link
Copy Markdown
Member

@matthewfeickert matthewfeickert left a comment

Choose a reason for hiding this comment

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

I think this looks good overall. Just some high level comments.

Copy link
Copy Markdown
Member

@matthewfeickert matthewfeickert left a comment

Choose a reason for hiding this comment

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

LGTM. This is a super nice improvement. 👍

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.

Actionable comments posted: 0

🧹 Nitpick comments (2)
test-environment.yml (2)

7-7: Add setuptools as a top-level dependency
The inclusion of setuptools at the top level streamlines the environment setup and aligns with modern packaging practices. Consider whether you need to pin a specific version to ensure compatibility with your project.


61-62: Refactor cwl dependencies for improved clarity
Moving cwltool and cwl-utils from the nested pip section to the top-level dependencies simplifies dependency management and makes these packages first-class citizens in the environment specification. Please verify that these packages are available from your listed channels (or that an alternative installation method is available) to avoid potential resolution issues.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b9f87b3 and 1115505.

⛔ Files ignored due to path filters (17)
  • pixi.lock is excluded by !**/*.lock
  • pyproject.toml is excluded by !pyproject.toml
  • pyproject.toml is excluded by !pyproject.toml
  • pyproject.toml is excluded by !pyproject.toml
  • pyproject.toml is excluded by !pyproject.toml
  • pixi.lock is excluded by !**/*.lock
  • pyproject.toml is excluded by !pyproject.toml
  • pyproject.toml is excluded by !pyproject.toml
  • pyproject.toml is excluded by !pyproject.toml
  • pixi.lock is excluded by !**/*.lock
  • pyproject.toml is excluded by !pyproject.toml
  • pyproject.toml is excluded by !pyproject.toml
  • pyproject.toml is excluded by !pyproject.toml
  • pixi.lock is excluded by !**/*.lock
  • pyproject.toml is excluded by !pyproject.toml
  • pyproject.toml is excluded by !pyproject.toml
  • pyproject.toml is excluded by !pyproject.toml
📒 Files selected for processing (11)
  • .gitattributes (1 hunks)
  • .gitignore (1 hunks)
  • setup.cfg (0 hunks)
  • snakemake/template_rendering/yte.py (1 hunks)
  • .gitignore (1 hunks)
  • test-environment.yml (2 hunks)
  • .gitattributes (1 hunks)
  • .gitignore (1 hunks)
  • setup.cfg (0 hunks)
  • snakemake/template_rendering/yte.py (1 hunks)
  • .gitignore (1 hunks)
💤 Files with no reviewable changes (2)
  • setup.cfg
  • setup.cfg
🚧 Files skipped from review as they are similar to previous changes (8)
  • .gitignore
  • snakemake/template_rendering/yte.py
  • .gitignore
  • snakemake/template_rendering/yte.py
  • .gitattributes
  • .gitignore
  • .gitignore
  • .gitattributes
⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: testing-windows (10)
  • GitHub Check: testing-windows (9)
  • GitHub Check: testing-windows (8)
  • GitHub Check: testing-windows (7)
  • GitHub Check: testing-windows (6)
  • GitHub Check: testing-windows (5)
  • GitHub Check: testing-windows (4)
  • GitHub Check: testing-windows (3)
  • GitHub Check: testing-windows (2)
  • GitHub Check: testing-windows (1)

@jjjermiah jjjermiah changed the title feat: Modernize package configuration and versioning feat: Modernize package configuration using Pixi Mar 11, 2025
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.

Actionable comments posted: 0

🔭 Outside diff range comments (1)
snakemake/ioutils/input.py (1)

30-31: ⚠️ Potential issue

Import missing WorkflowError and improve exception handling.

The WorkflowError needs to be imported, and exception handling should preserve the original error context.

+from snakemake.exceptions import WorkflowError

def extract_checksum(infile, **kwargs):
    try:
        import pandas as pd
        ...
-        raise WorkflowError("Pandas is required to extract checksum from file.")
+        raise WorkflowError("Pandas is required to extract checksum from file.") from err
🧰 Tools
🪛 Ruff (0.8.2)

30-30: Within an except clause, raise exceptions with raise ... from err or raise ... from None to distinguish them from errors in exception handling

(B904)


30-30: Undefined name WorkflowError

(F821)

🧹 Nitpick comments (5)
.github/workflows/main.yml (3)

41-55: Testing Job: Conditional Execution and Matrix Configuration
The added condition on line 42 ensures tests run only when the PR is not merged to main. Note that the exclude: [] block (lines 52–54) is currently empty and has been flagged by static analysis. If no exclusions are needed, consider removing that block entirely to clean up the configuration.

🧰 Tools
🪛 actionlint (1.7.4)

52-52: "exclude" section should not be empty

(syntax-check)

🪛 YAMLlint (1.35.1)

[error] 53-53: trailing spaces

(trailing-spaces)


211-218: Testing-Done Job: New Job and File Termination
The addition of the testing-done job provides a clear final notification when tests pass. However, static analysis indicates that there is no newline at the end of the file (line 218). Please add a newline at the end of the file.

Below is an example diff to add the missing newline:

@@ -217,3 +217,4 @@
       - run: echo "All tests passed."
- 
\ No newline at end of file
+ 
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 218-218: no new line character at the end of file

(new-line-at-end-of-file)


53-53: Clean Up Trailing Spaces
Static analysis flagged trailing spaces on line 53. Please remove these extra spaces to conform with YAML linting standards.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 53-53: trailing spaces

(trailing-spaces)

snakemake/ioutils/input.py (2)

12-28: Replace lambda with a proper function definition.

Using a lambda function for fix_file_name reduces code readability. Consider using a proper function definition instead.

-    fix_file_name = lambda x: x.removeprefix("./")
+    def fix_file_name(x):
+        return x.removeprefix("./")
🧰 Tools
🪛 Ruff (0.8.2)

16-16: Do not assign a lambda expression, use a def

Rewrite fix_file_name as a def

(E731)


12-31: Add docstrings to improve function documentation.

The functions would benefit from docstrings explaining their purpose, parameters, and return values, especially given their integration into the Snakemake documentation.

 def extract_checksum(infile, **kwargs):
+    """
+    Extract checksum for a file from a checksum file.
+    
+    Parameters:
+        infile (str): Path to the checksum file
+        **kwargs: Additional arguments including 'file' - the filename to find checksum for
+    
+    Returns:
+        str: The extracted checksum
+        
+    Raises:
+        WorkflowError: If pandas is not available
+    """
     try:
         import pandas as pd
🧰 Tools
🪛 Ruff (0.8.2)

16-16: Do not assign a lambda expression, use a def

Rewrite fix_file_name as a def

(E731)


30-30: Within an except clause, raise exceptions with raise ... from err or raise ... from None to distinguish them from errors in exception handling

(B904)


30-30: Undefined name WorkflowError

(F821)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 71163c8 and db75fb9.

⛔ Files ignored due to path filters (1)
  • CHANGELOG.md is excluded by !CHANGELOG.md
📒 Files selected for processing (14)
  • .github/workflows/main.yml (1 hunks)
  • .github/workflows/codespell.yml (1 hunks)
  • .github/workflows/docs.yml (2 hunks)
  • .github/workflows/main.yml (6 hunks)
  • docs/snakefiles/rules.rst (2 hunks)
  • setup.py (1 hunks)
  • snakemake/cli.py (1 hunks)
  • snakemake/ioutils/__init__.py (2 hunks)
  • snakemake/ioutils/input.py (1 hunks)
  • snakemake/workflow.py (1 hunks)
  • tests/test_ioutils/Snakefile (4 hunks)
  • tests/test_ioutils/expected-results/c/1.txt (1 hunks)
  • tests/test_ioutils/expected-results/results/switch~someswitch.column~sample.txt (1 hunks)
  • tests/test_ioutils/samples.md5 (1 hunks)
✅ Files skipped from review due to trivial changes (3)
  • tests/test_ioutils/expected-results/results/switchsomeswitch.columnsample.txt
  • tests/test_ioutils/samples.md5
  • snakemake/cli.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/main.yml
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.py`: Do not try to improve formatting. Do not suggest ...

**/*.py: Do not try to improve formatting.
Do not suggest type annotations for functions that are defined inside of functions or methods.
Do not suggest type annotation of the self argument of methods.
Do not suggest type annotation of the cls argument of classmethods.
Do not suggest return type annotation if a function or method does not contain a return statement.

  • setup.py
  • snakemake/workflow.py
  • snakemake/ioutils/input.py
  • snakemake/ioutils/__init__.py
🪛 Ruff (0.8.2)
snakemake/ioutils/input.py

16-16: Do not assign a lambda expression, use a def

Rewrite fix_file_name as a def

(E731)


30-30: Within an except clause, raise exceptions with raise ... from err or raise ... from None to distinguish them from errors in exception handling

(B904)


30-30: Undefined name WorkflowError

(F821)

🪛 actionlint (1.7.4)
.github/workflows/main.yml

52-52: "exclude" section should not be empty

(syntax-check)

🪛 YAMLlint (1.35.1)
.github/workflows/main.yml

[error] 53-53: trailing spaces

(trailing-spaces)


[error] 218-218: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms (28)
  • GitHub Check: testing (10, 3.12, bash)
  • GitHub Check: testing (10, 3.11, bash)
  • GitHub Check: testing (8, 3.12, bash)
  • GitHub Check: testing (8, 3.11, bash)
  • GitHub Check: testing (7, 3.12, bash)
  • GitHub Check: testing (7, 3.11, bash)
  • GitHub Check: testing (6, 3.12, bash)
  • GitHub Check: testing (6, 3.11, bash)
  • GitHub Check: testing-windows (10)
  • GitHub Check: testing (5, 3.12, bash)
  • GitHub Check: testing-windows (9)
  • GitHub Check: testing (5, 3.11, bash)
  • GitHub Check: testing-windows (8)
  • GitHub Check: testing (4, 3.12, bash)
  • GitHub Check: testing (4, 3.11, bash)
  • GitHub Check: testing-windows (7)
  • GitHub Check: testing-windows (6)
  • GitHub Check: testing (3, 3.12, bash)
  • GitHub Check: testing-windows (5)
  • GitHub Check: testing (3, 3.11, bash)
  • GitHub Check: testing-windows (4)
  • GitHub Check: testing (2, 3.12, bash)
  • GitHub Check: testing-windows (3)
  • GitHub Check: testing (2, 3.11, bash)
  • GitHub Check: testing-windows (2)
  • GitHub Check: testing (1, 3.12, bash)
  • GitHub Check: testing-windows (1)
  • GitHub Check: testing (1, 3.11, bash)
🔇 Additional comments (21)
setup.py (1)

33-33: Addition of unit test templates to package data looks good.

This change includes template files from the unit_tests/templates/ directory in the package distribution, which aligns with the PR objective of modernizing the package configuration. This ensures that necessary test template files are properly packaged and available when needed.

.github/workflows/codespell.yml (1)

16-16: Validate Conditional Execution in Codespell Job
The added condition ensures that the codespell job will only run if the pull request isn’t merged or if the branch isn’t main. This update is consistent with our PR objectives.

.github/workflows/docs.yml (2)

16-16: Docs Job: Apply Conditional Execution
The new condition on line 16 guarantees that the docs job runs only if the pull request is not merged into main, aligning nicely with our overall workflow improvements.


41-41: Apidocs Job: Apply Conditional Execution
The condition on line 41 restricts the apidocs job from running after merge into main, mirroring the conditional logic applied in other workflow files.

.github/workflows/main.yml (3)

15-21: Formatting Job: Conditional Execution Update
The conditional on line 16 now restricts the formatting job to non-merged pull requests or non-main references, which is consistent with our intended CI/CD control flow.


157-165: Build Container Image Job: Conditional Execution
The condition on line 157 properly ensures that this job runs only under the non-merged/non-main conditions. This is consistent with the changes across the workflows.


167-174: Testing-Windows Job: Conditional Execution Update
The condition on line 167 appropriately restricts the Windows tests to non-merged PRs, and the additional steps to remove Unix-only dependencies are clearly implemented.

tests/test_ioutils/expected-results/c/1.txt (1)

1-2: File content updated to match new MD5 checksum expectation

The file content has been updated from a simple 'a' to an MD5 checksum value, which aligns with the newly introduced checksum functionality in the codebase.

snakemake/workflow.py (1)

1294-1295: Added conditional cleanup based on configuration setting

Good enhancement! The cleanup of storage objects is now conditional, based on the keep_storage_local setting. This prevents unnecessary cleanup operations when local storage should be retained, providing better control over the workflow's behavior.

snakemake/ioutils/__init__.py (2)

8-8: Added imports for new utility functions

The new imports for parse_input and extract_checksum functions from the snakemake.ioutils.input module are appropriate and follow the established import pattern in this file.


25-26: Registered new utility functions in global namespace

The new utility functions parse_input and extract_checksum are correctly registered in the global namespace, making them available to Snakemake workflows. This follows the established pattern for exposing functions.

tests/test_ioutils/Snakefile (6)

11-13: Added test assertion for extract_checksum functionality

Good test coverage! This assertion verifies that the newly added extract_checksum function correctly retrieves a specific checksum from the MD5 file.


22-24: Updated rule input to include checksum file

The rule now properly references the checksum file as an input dependency, which is necessary for the new checksum verification functionality.


26-29: Added parameters using new parse_input and extract_checksum functions

The params section uses a lambda function to apply the new utility functions, demonstrating the proper usage pattern for parsing input files and extracting checksums. This is a good example of how to use the new functionality.


31-31: Updated shell command to use extracted checksum

The shell command now uses the dynamically computed checksum from params instead of a static string, properly testing the new functionality.


58-58: Added trailing comma for consistency in input declaration

The addition of a trailing comma after the input declaration improves code style consistency and makes future additions easier.


85-85: Reformatted shell command for consistency

The shell command reformatting improves code style consistency throughout the file, though the functionality remains unchanged.

snakemake/ioutils/input.py (1)

1-9: Well-designed utility function for parsing input files!

The parse_input function provides a flexible way to process input files with custom parsers. The function returns an inner function that follows Snakemake's expected pattern for input processing.

docs/snakefiles/rules.rst (3)

550-571: Clear documentation for the new parse_input function.

The documentation effectively explains the purpose, parameters, and provides a usage example for the parse_input function.


573-593: Well-structured documentation for extract_checksum function.

The documentation for extract_checksum is clear and includes a helpful usage example showing how to integrate with parse_input.


550-593:

Details

✅ Verification successful

Verify consistency between documentation and implementation.

The function signatures in the documentation match the implementations, but it would be helpful to verify that the example code works as expected with the actual implementation.


🏁 Script executed:

#!/bin/bash
# Check if the function parameters in docs match implementation

echo "Implementation in input.py:"
grep -A 2 "def parse_input" snakemake/ioutils/input.py
grep -A 2 "def extract_checksum" snakemake/ioutils/input.py

echo -e "\nDocumentation in rules.rst:"
grep -A 4 "parse_input(" docs/snakefiles/rules.rst
grep -A 4 "extract_checksum(" docs/snakefiles/rules.rst

Length of output: 1490


Documentation and Implementation Signatures Verified and Consistent

The review checks confirmed that:

  • The parse_input function is defined as def parse_input(infile, parser, **kwargs): in the implementation, which aligns with the documentation’s signature (using different parameter names but equivalent semantics).
  • Likewise, the extract_checksum function is implemented as def extract_checksum(infile, **kwargs):, which effectively supports an extra keyword argument (used as file in the documentation) as demonstrated by the example code.

While the names differ slightly (i.e. infile versus input_item and explicit file in the docs), the behavior is consistent. For clarity, consider updating the documentation to explicitly note that both functions accept additional keyword arguments.

* fix: add conda and pip dependencies to pyproject.toml

* fix: remove redundant test environment from pyproject.toml

* fix: update test command in pyproject.toml to include additional test files

* fix: add apt dependencies setup step in GitHub Actions workflow for Linux

* fix: disable fail-fast in testing strategy for improved job execution

* fix: add module check step in GitHub Actions for Linux and update pyproject.toml with conda channels

* fix: remove unnecessary shell option from Linux test job in GitHub Actions

* fix: update test target configuration in pyproject.toml to simplify structure

* fix: add command to locate module in GitHub Actions workflow

* fix: update test command in GitHub Actions to focus on specific test case

* fix: remove unnecessary dependency on formatting job in GitHub Actions workflow

* needs envmodues

* fix: update pytest command syntax in pyproject.toml for clarity

* fix: remove unnecessary module check from GitHub Actions workflow

* fix: add a blank line for improved readability in tests.py

* refactor: streamline GitHub Actions workflow by consolidating testing jobs and removing unnecessary steps

let all tests within a job fail

* fix: restore and reposition build-container-image job in GitHub Actions workflow

* refactor: update test task definitions in pyproject.toml for clarity and organization

* fix: add Windows test job to GitHub Actions workflow for improved cross-platform testing

* fix: simplify command in Windows test job for improved readability

* fix: remove unnecessary apt dependencies setup from GitHub Actions workflow now that its included in test feature

* fix: update pytest command in pyproject.toml to exclude specific tests for improved test accuracy
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.

Actionable comments posted: 0

🧹 Nitpick comments (2)
.github/workflows/main.yml (2)

102-109: Fix trailing whitespace on line 109

There's a trailing whitespace at the end of line 109, which should be removed.

-      
+
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 109-109: trailing spaces

(trailing-spaces)


128-128: Fix trailing whitespace on line 128

There's a trailing whitespace at the end of line 128, which should be removed.

-    needs: tests 
+    needs: tests
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 128-128: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 91325aa and 71dbbb1.

⛔ Files ignored due to path filters (1)
  • pyproject.toml is excluded by !pyproject.toml
📒 Files selected for processing (3)
  • .github/workflows/main.yml (2 hunks)
  • tests/tests.py (1 hunks)
  • tests/tests_using_conda.py (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.py`: Do not try to improve formatting. Do not suggest ...

**/*.py: Do not try to improve formatting.
Do not suggest type annotations for functions that are defined inside of functions or methods.
Do not suggest type annotation of the self argument of methods.
Do not suggest type annotation of the cls argument of classmethods.
Do not suggest return type annotation if a function or method does not contain a return statement.

  • tests/tests.py
  • tests/tests_using_conda.py
🪛 YAMLlint (1.35.1)
.github/workflows/main.yml

[error] 109-109: trailing spaces

(trailing-spaces)


[error] 128-128: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (29)
  • GitHub Check: tests (10, windows-latest, py312, bash)
  • GitHub Check: tests (10, windows-latest, py311, bash)
  • GitHub Check: tests (10, ubuntu-latest, py312, bash)
  • GitHub Check: tests (10, ubuntu-latest, py311, bash)
  • GitHub Check: tests (7, ubuntu-latest, py311, bash)
  • GitHub Check: tests (6, windows-latest, py312, bash)
  • GitHub Check: tests (6, windows-latest, py311, bash)
  • GitHub Check: tests (6, ubuntu-latest, py312, bash)
  • GitHub Check: tests (6, ubuntu-latest, py311, bash)
  • GitHub Check: tests (5, windows-latest, py312, bash)
  • GitHub Check: tests (5, windows-latest, py311, bash)
  • GitHub Check: tests (5, ubuntu-latest, py312, bash)
  • GitHub Check: tests (5, ubuntu-latest, py311, bash)
  • GitHub Check: tests (4, windows-latest, py312, bash)
  • GitHub Check: tests (4, windows-latest, py311, bash)
  • GitHub Check: tests (4, ubuntu-latest, py312, bash)
  • GitHub Check: tests (4, ubuntu-latest, py311, bash)
  • GitHub Check: tests (3, windows-latest, py312, bash)
  • GitHub Check: tests (3, windows-latest, py311, bash)
  • GitHub Check: tests (3, ubuntu-latest, py312, bash)
  • GitHub Check: tests (3, ubuntu-latest, py311, bash)
  • GitHub Check: tests (2, windows-latest, py312, bash)
  • GitHub Check: tests (2, windows-latest, py311, bash)
  • GitHub Check: tests (2, ubuntu-latest, py312, bash)
  • GitHub Check: tests (2, ubuntu-latest, py311, bash)
  • GitHub Check: tests (1, windows-latest, py312, bash)
  • GitHub Check: tests (1, windows-latest, py311, bash)
  • GitHub Check: tests (1, ubuntu-latest, py312, bash)
  • GitHub Check: tests (1, ubuntu-latest, py311, bash)
🔇 Additional comments (10)
tests/tests_using_conda.py (1)

170-170: Good addition of the needs_envmodules marker

Adding this decorator properly marks the test as requiring environment modules to be available, which aligns with the PR objective of modernizing the package configuration. This marker will help with test categorization and can be used to skip tests when environment modules aren't available.

tests/tests.py (1)

1358-1358: Good addition of the needs_envmodules marker

Adding this decorator properly marks the test as requiring environment modules to be available, consistent with the similar change in tests_using_conda.py. This helps with test categorization in the new Pixi-based configuration.

.github/workflows/main.yml (8)

24-31: Good implementation of Pixi for the formatting job

The setup correctly installs Pixi using the prefix-dev/setup-pixi action and configures it to use the "quality" environment. The use of cache: false and locked: false is appropriate since there's no pixi.lock file yet.


32-33: Good update to the formatting command

The command has been updated to use Pixi to run the formatting check, replacing the previous black command. This aligns with the PR objective of modernizing the package configuration using Pixi.


42-56: Good implementation of the test matrix strategy

The new test job uses a matrix strategy that covers different test groups, Python versions, and operating systems. The comment about test types referencing the pyproject.toml file is helpful for maintaining the configuration in the future.


70-77: Proper Pixi configuration for test environments

The Pixi setup correctly uses the matrix environment variable to determine which environment to install and configure. Same as with the formatting job, the use of cache: false and locked: false is appropriate.


110-114: Good OS-specific test commands

The workflow correctly uses conditional steps based on the runner OS to execute appropriate test commands. For Windows, it uses the test-simple command which is likely a subset of tests compatible with Windows.


115-124: Good addition of report generation tests

Adding a specific step for report generation tests ensures that this important functionality is tested in the CI pipeline. The step is also conditionally executed only on Linux, where it's likely to be more reliable.


138-139: Good update to workflow dependencies

The testing-done job now correctly depends on the new tests job, ensuring that it only runs after all tests have passed.


52-53:

Details

❓ Verification inconclusive

Verify Windows testing compatibility

The matrix includes Windows, but there might be platform-specific tests that won't run on Windows. Consider validating that the test-simple command on Windows covers all relevant scenarios or adding explicit exclusions for incompatible tests.

You may want to run the following command to check if any test markers in the test files indicate Windows incompatibility:


🏁 Script executed:

#!/bin/bash
# Look for tests that are skipped on Windows
grep -r "skip_on_windows" tests/

Length of output: 6894


Windows Testing Compatibility: Verify Coverage on Windows

The grep output confirms that tests expected to fail on Windows are already tagged with @skip_on_windows (as seen in files like tests/conftest.py, tests/tests.py, and tests/tests_using_conda.py). This explicit exclusion is in line with handling known platform-specific issues.

  • Action Required: Please ensure that the Windows test run (for example, via the test-simple command) still exercises all the platform-independent scenarios. If any critical behavior isn’t covered due to these skips, consider adding additional Windows-specific tests or further refining the exclusion logic.

@jjjermiah
Copy link
Copy Markdown
Contributor Author

jjjermiah commented Mar 12, 2025

Current Status

1. The CI/CD pipeline now uses the pixi test environments for py311 and py312

pixi list -e py311 -x

```console ➜ pixi list -e py311 -x Environment: py311 Package Version Build Size Kind Source appdirs 1.4.4 34.5 KiB pypi appdirs-1.4.4-py2.py3-none-any.whl apptainer 1.3.6 h26d8a74_1 19 MiB conda https://conda.anaconda.org/conda-forge/ boto3 1.37.11 pyhd8ed1ab_0 81 KiB conda https://conda.anaconda.org/conda-forge/ conda 25.1.1 py311h38be061_1 1.1 MiB conda https://conda.anaconda.org/conda-forge/ conda_inject 1.3.2 9.4 KiB pypi conda_inject-1.3.2-py3-none-any.whl configargparse 1.7 pyhd8ed1ab_1 38.7 KiB conda https://conda.anaconda.org/conda-forge/ connection_pool 0.0.3 9.1 KiB pypi connection_pool-0.0.3-py3-none-any.whl crc32c 2.7.1 py311h9ecbd09_1 48.7 KiB conda https://conda.anaconda.org/conda-forge/ cwl-utils 0.37 pyhbbac1ac_0 158.1 KiB conda https://conda.anaconda.org/conda-forge/ cwltool 3.1.20250110105449 py311h7fff9ef_0 2.7 MiB conda https://conda.anaconda.org/conda-forge/ dash 2.18.2 pyhd8ed1ab_2 5.2 MiB conda https://conda.anaconda.org/conda-forge/ docutils 0.21.2 pyhd8ed1ab_1 393.3 KiB conda https://conda.anaconda.org/conda-forge/ dpath 2.2.0 pyha770c72_0 20.8 KiB conda https://conda.anaconda.org/conda-forge/ filelock 3.17.0 pyhd8ed1ab_0 17.1 KiB conda https://conda.anaconda.org/conda-forge/ ftputil 5.1.0 pyhd8ed1ab_0 45.7 KiB conda https://conda.anaconda.org/conda-forge/ git 2.48.1 pl5321h59d505e_0 9.7 MiB conda https://conda.anaconda.org/conda-forge/ gitpython 3.1.44 672.9 KiB pypi gitpython-3.1.44-py3-none-any.whl glpk 5.0 h445213a_0 1022.7 KiB conda https://conda.anaconda.org/conda-forge/ graphviz 12.2.1 h5ae0cbf_1 2.3 MiB conda https://conda.anaconda.org/conda-forge/ httpretty 1.1.4 pyhd8ed1ab_1 27.2 KiB conda https://conda.anaconda.org/conda-forge/ humanfriendly 10.0 pyh707e725_8 71.8 KiB conda https://conda.anaconda.org/conda-forge/ immutables 0.21 301.1 KiB pypi immutables-0.21-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl jinja2 3.1.6 pyhd8ed1ab_0 110.1 KiB conda https://conda.anaconda.org/conda-forge/ jsonschema 4.23.0 460 KiB pypi jsonschema-4.23.0-py3-none-any.whl nbformat 5.10.4 279.1 KiB pypi nbformat-5.10.4-py3-none-any.whl nodejs 22.12.0 hf235a45_0 20.8 MiB conda https://conda.anaconda.org/conda-forge/ numpy 2.2.3 py311h5d046bc_0 8.6 MiB conda https://conda.anaconda.org/conda-forge/ oauth2client 4.1.3 pyhd8ed1ab_1 71.2 KiB conda https://conda.anaconda.org/conda-forge/ openmpi 5.0.7 hb85ec53_100 3.4 MiB conda https://conda.anaconda.org/conda-forge/ packaging 24.2 pyhd8ed1ab_2 58.8 KiB conda https://conda.anaconda.org/conda-forge/ pandas 2.2.3 py311h7db5c69_1 15 MiB conda https://conda.anaconda.org/conda-forge/ pandoc 3.6.3 ha770c72_0 20.3 MiB conda https://conda.anaconda.org/conda-forge/ pip 25.0.1 pyh8b19718_0 1.2 MiB conda https://conda.anaconda.org/conda-forge/ polars 1.24.0 py311h03f6b34_0 24.8 MiB conda https://conda.anaconda.org/conda-forge/ psutil 7.0.0 py311h9ecbd09_0 473.4 KiB conda https://conda.anaconda.org/conda-forge/ pulp 2.8.0 py311h38be061_0 12.7 MiB conda https://conda.anaconda.org/conda-forge/ pygments 2.19.1 pyhd8ed1ab_0 867.8 KiB conda https://conda.anaconda.org/conda-forge/ pysftp 0.2.9 py_1 15.2 KiB conda https://conda.anaconda.org/conda-forge/ pytest 8.3.5 pyhd8ed1ab_0 253.7 KiB conda https://conda.anaconda.org/conda-forge/ pytest-cov 6.0.0 pyhd8ed1ab_1 25.6 KiB conda https://conda.anaconda.org/conda-forge/ pytest-mock 3.14.0 pyhd8ed1ab_1 21.4 KiB conda https://conda.anaconda.org/conda-forge/ pytest-split 0.10.0 pyhff2d567_0 16.5 KiB conda https://conda.anaconda.org/conda-forge/ python 3.11.11 h9e4cc4f_2_cpython 29.2 MiB conda https://conda.anaconda.org/conda-forge/ pytools 2025.1.1 pyhd8ed1ab_0 74.4 KiB conda https://conda.anaconda.org/conda-forge/ pyyaml 6.0.2 py311h2dc5d0c_2 208.1 KiB conda https://conda.anaconda.org/conda-forge/ requests 2.32.3 pyhd8ed1ab_1 57.3 KiB conda https://conda.anaconda.org/conda-forge/ requests-mock 1.12.1 pyhd8ed1ab_1 25.8 KiB conda https://conda.anaconda.org/conda-forge/ reretry 0.11.8 pyhd8ed1ab_1 12.3 KiB conda https://conda.anaconda.org/conda-forge/ responses 0.25.7 pyhd8ed1ab_0 35.6 KiB conda https://conda.anaconda.org/conda-forge/ smart_open 7.1.0 182.6 KiB pypi smart_open-7.1.0-py3-none-any.whl snakemake 8.30.0 pypi (editable) snakemake-executor-plugin-cluster-generic 1.0.9 pyhdfd78af_0 13.6 KiB conda https://conda.anaconda.org/bioconda/ snakemake-storage-plugin-fs 1.0.6 pyhdfd78af_0 12.8 KiB conda https://conda.anaconda.org/bioconda/ snakemake-storage-plugin-http 0.2.3 pyhdfd78af_1 13.3 KiB conda https://conda.anaconda.org/bioconda/ snakemake-storage-plugin-s3 0.3.1 pyhdfd78af_0 13.8 KiB conda https://conda.anaconda.org/bioconda/ snakemake_interface_common 1.17.4 33.8 KiB pypi snakemake_interface_common-1.17.4-py3-none-any.whl snakemake_interface_report_plugins 1.1.0 13.1 KiB pypi snakemake_interface_report_plugins-1.1.0-py3-none-any.whl snakemake_interface_storage_plugins 3.4.0 37.1 KiB pypi snakemake_interface_storage_plugins-3.4.0-py3-none-any.whl squashfuse 0.6.0 hc12fc2f_0 62.6 KiB conda https://conda.anaconda.org/conda-forge/ stress-ng 0.17.03 h2797004_0 2.9 MiB conda https://conda.anaconda.org/conda-forge/ tabulate 0.9.0 128.4 KiB pypi tabulate-0.9.0-py3-none-any.whl throttler 1.2.2 pyhd8ed1ab_0 12.1 KiB conda https://conda.anaconda.org/conda-forge/ wget 1.21.4 hda4d442_0 752.3 KiB conda https://conda.anaconda.org/conda-forge/ wrapt 1.17.2 py311h9ecbd09_0 63.4 KiB conda https://conda.anaconda.org/conda-forge/ xorg-libsm 1.2.5 he73a12e_0 26.6 KiB conda https://conda.anaconda.org/conda-forge/ xorg-libxau 1.0.12 hb9d3cd8_0 14.4 KiB conda https://conda.anaconda.org/conda-forge/ xorg-libxdmcp 1.1.5 hb9d3cd8_0 19.4 KiB conda https://conda.anaconda.org/conda-forge/ xorg-libxext 1.3.6 hb9d3cd8_0 48.9 KiB conda https://conda.anaconda.org/conda-forge/ xorg-libxrender 0.9.12 hb9d3cd8_0 32.2 KiB conda https://conda.anaconda.org/conda-forge/ ```

pixi list -e py312 -x

pixi list -e py312 -x 
Environment: py312
Package                                    Version             Build               Size        Kind   Source
appdirs                                    1.4.4                                   34.5 KiB    pypi   appdirs-1.4.4-py2.py3-none-any.whl
apptainer                                  1.3.6               h26d8a74_1          19 MiB      conda  https://conda.anaconda.org/conda-forge/
boto3                                      1.37.11             pyhd8ed1ab_0        81 KiB      conda  https://conda.anaconda.org/conda-forge/
conda                                      25.1.1              py312h7900ff3_1     1.1 MiB     conda  https://conda.anaconda.org/conda-forge/
conda_inject                               1.3.2                                   9.4 KiB     pypi   conda_inject-1.3.2-py3-none-any.whl
configargparse                             1.7                 pyhd8ed1ab_1        38.7 KiB    conda  https://conda.anaconda.org/conda-forge/
connection_pool                            0.0.3                                   9.1 KiB     pypi   connection_pool-0.0.3-py3-none-any.whl
crc32c                                     2.7.1               py312h66e93f0_1     48.8 KiB    conda  https://conda.anaconda.org/conda-forge/
cwl-utils                                  0.37                pyhbbac1ac_0        158.1 KiB   conda  https://conda.anaconda.org/conda-forge/
cwltool                                    3.1.20250110105449  py312h149e7c3_0     2.9 MiB     conda  https://conda.anaconda.org/conda-forge/
dash                                       2.18.2              pyhd8ed1ab_2        5.2 MiB     conda  https://conda.anaconda.org/conda-forge/
docutils                                   0.21.2              pyhd8ed1ab_1        393.3 KiB   conda  https://conda.anaconda.org/conda-forge/
dpath                                      2.2.0               pyha770c72_0        20.8 KiB    conda  https://conda.anaconda.org/conda-forge/
filelock                                   3.17.0              pyhd8ed1ab_0        17.1 KiB    conda  https://conda.anaconda.org/conda-forge/
ftputil                                    5.1.0               pyhd8ed1ab_0        45.7 KiB    conda  https://conda.anaconda.org/conda-forge/
git                                        2.48.1              pl5321h59d505e_0    9.7 MiB     conda  https://conda.anaconda.org/conda-forge/
gitpython                                  3.1.44                                  672.9 KiB   pypi   gitpython-3.1.44-py3-none-any.whl
glpk                                       5.0                 h445213a_0          1022.7 KiB  conda  https://conda.anaconda.org/conda-forge/
graphviz                                   12.2.1              h5ae0cbf_1          2.3 MiB     conda  https://conda.anaconda.org/conda-forge/
httpretty                                  1.1.4               pyhd8ed1ab_1        27.2 KiB    conda  https://conda.anaconda.org/conda-forge/
humanfriendly                              10.0                pyh707e725_8        71.8 KiB    conda  https://conda.anaconda.org/conda-forge/
immutables                                 0.21                                                pypi   
jinja2                                     3.1.6               pyhd8ed1ab_0        110.1 KiB   conda  https://conda.anaconda.org/conda-forge/
jsonschema                                 4.23.0                                  460 KiB     pypi   jsonschema-4.23.0-py3-none-any.whl
nbformat                                   5.10.4                                  279.1 KiB   pypi   nbformat-5.10.4-py3-none-any.whl
nodejs                                     22.12.0             hf235a45_0          20.8 MiB    conda  https://conda.anaconda.org/conda-forge/
numpy                                      2.2.3               py312h72c5963_0     8.1 MiB     conda  https://conda.anaconda.org/conda-forge/
oauth2client                               4.1.3               pyhd8ed1ab_1        71.2 KiB    conda  https://conda.anaconda.org/conda-forge/
openmpi                                    5.0.7               hb85ec53_100        3.4 MiB     conda  https://conda.anaconda.org/conda-forge/
packaging                                  24.2                pyhd8ed1ab_2        58.8 KiB    conda  https://conda.anaconda.org/conda-forge/
pandas                                     2.2.3               py312hf9745cd_1     14.7 MiB    conda  https://conda.anaconda.org/conda-forge/
pandoc                                     3.6.3               ha770c72_0          20.3 MiB    conda  https://conda.anaconda.org/conda-forge/
pip                                        25.0.1              pyh8b19718_0        1.2 MiB     conda  https://conda.anaconda.org/conda-forge/
polars                                     1.24.0              py312hda0fa55_0     24.8 MiB    conda  https://conda.anaconda.org/conda-forge/
psutil                                     7.0.0               py312h66e93f0_0     455.3 KiB   conda  https://conda.anaconda.org/conda-forge/
pulp                                       2.8.0               py312h7900ff3_0     12.6 MiB    conda  https://conda.anaconda.org/conda-forge/
pygments                                   2.19.1              pyhd8ed1ab_0        867.8 KiB   conda  https://conda.anaconda.org/conda-forge/
pysftp                                     0.2.9               py_1                15.2 KiB    conda  https://conda.anaconda.org/conda-forge/
pytest                                     8.3.5               pyhd8ed1ab_0        253.7 KiB   conda  https://conda.anaconda.org/conda-forge/
pytest-cov                                 6.0.0               pyhd8ed1ab_1        25.6 KiB    conda  https://conda.anaconda.org/conda-forge/
pytest-mock                                3.14.0              pyhd8ed1ab_1        21.4 KiB    conda  https://conda.anaconda.org/conda-forge/
pytest-split                               0.10.0              pyhff2d567_0        16.5 KiB    conda  https://conda.anaconda.org/conda-forge/
python                                     3.12.9              h9e4cc4f_1_cpython  30.2 MiB    conda  https://conda.anaconda.org/conda-forge/
pytools                                    2025.1.1            pyhd8ed1ab_0        74.4 KiB    conda  https://conda.anaconda.org/conda-forge/
pyyaml                                     6.0.2               py312h178313f_2     202.1 KiB   conda  https://conda.anaconda.org/conda-forge/
requests                                   2.32.3              pyhd8ed1ab_1        57.3 KiB    conda  https://conda.anaconda.org/conda-forge/
requests-mock                              1.12.1              pyhd8ed1ab_1        25.8 KiB    conda  https://conda.anaconda.org/conda-forge/
reretry                                    0.11.8              pyhd8ed1ab_1        12.3 KiB    conda  https://conda.anaconda.org/conda-forge/
responses                                  0.25.7              pyhd8ed1ab_0        35.6 KiB    conda  https://conda.anaconda.org/conda-forge/
smart_open                                 7.1.0                                   182.6 KiB   pypi   smart_open-7.1.0-py3-none-any.whl
snakemake                                  8.30.0                                              pypi    (editable)
snakemake-executor-plugin-cluster-generic  1.0.9               pyhdfd78af_0        13.6 KiB    conda  https://conda.anaconda.org/bioconda/
snakemake-storage-plugin-fs                1.0.6               pyhdfd78af_0        12.8 KiB    conda  https://conda.anaconda.org/bioconda/
snakemake-storage-plugin-http              0.2.3               pyhdfd78af_1        13.3 KiB    conda  https://conda.anaconda.org/bioconda/
snakemake-storage-plugin-s3                0.3.1               pyhdfd78af_0        13.8 KiB    conda  https://conda.anaconda.org/bioconda/
snakemake_interface_common                 1.17.4                                  33.8 KiB    pypi   snakemake_interface_common-1.17.4-py3-none-any.whl
snakemake_interface_report_plugins         1.1.0                                   13.1 KiB    pypi   snakemake_interface_report_plugins-1.1.0-py3-none-any.whl
snakemake_interface_storage_plugins        3.4.0                                   37.1 KiB    pypi   snakemake_interface_storage_plugins-3.4.0-py3-none-any.whl
squashfuse                                 0.5.2               hc12fc2f_2          62.8 KiB    conda  https://conda.anaconda.org/conda-forge/
stress-ng                                  0.17.03             h2797004_0          2.9 MiB     conda  https://conda.anaconda.org/conda-forge/
tabulate                                   0.9.0                                   128.4 KiB   pypi   tabulate-0.9.0-py3-none-any.whl
throttler                                  1.2.2               pyhd8ed1ab_0        12.1 KiB    conda  https://conda.anaconda.org/conda-forge/
wget                                       1.21.4              hda4d442_0          752.3 KiB   conda  https://conda.anaconda.org/conda-forge/
wrapt                                      1.17.2              py312h66e93f0_0     62.1 KiB    conda  https://conda.anaconda.org/conda-forge/
xorg-libsm                                 1.2.5               he73a12e_0          26.6 KiB    conda  https://conda.anaconda.org/conda-forge/
xorg-libxau                                1.0.12              hb9d3cd8_0          14.4 KiB    conda  https://conda.anaconda.org/conda-forge/
xorg-libxdmcp                              1.1.5               hb9d3cd8_0          19.4 KiB    conda  https://conda.anaconda.org/conda-forge/
xorg-libxext                               1.3.6               hb9d3cd8_0          48.9 KiB    conda  https://conda.anaconda.org/conda-forge/
xorg-libxrender                            0.9.12              hb9d3cd8_0          32.2 KiB    conda  https://conda.anaconda.org/conda-forge/
yte                                        1.7.0               pyha770c72_1        14.8 KiB    conda  https://conda.anaconda.org/conda-forge/

Actions Page

2. Tasks for tests

pixi task ls          
Tasks that can run on this machine:
-----------------------------------
build, build-docs, check-build, docs, format, test-all, test-simple

 - build           Build the package into the dist/ directory
 - build-docs      Build the documentation in the docs/ directory
 - check-build     Check that the package can be uploaded
 - docs            Serve the documentation on http://localhost:8000
 - format          Format the code
 - test-all        Run all tests in the tests directory
 - test-simple     Run tests only for tests/tests.py

Failing tests and temporary workarounds

  1. issues with environment-modules package and pixi
  • this package requires a few ENV variables to be set (i.e: MODULE_VERSION and BASH_FUNC_module) which happens by sourcing a initialization file when activating the conda environment.
  • I believe this is an issue with the pixi and/or its conda-feedstock as the environment currently hangs when trying to activate it
  • i have temporarily added two @pytest.mark.needs_envmodules to the two tests that use envmodules and currently ignore it with a pytest marker in the pixi tasks.
  1. There is also an odd single failing tests/tests_using_conda.py::test_conda_global
    https://github.com/jjjermiah/snakemake/blob/71dbbb1fc2d0135ade1d6859e4e55a08de3ca2cd/tests/tests_using_conda.py#L283-L290
  • it looks like a separate issue with jsonschema

Im wondering if these 3 tests can be addressed in separate issues to get this merged in?

Copy link
Copy Markdown
Contributor

@johanneskoester johanneskoester left a comment

Choose a reason for hiding this comment

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

Fantastic work!! One final thing: can you please update the testing guidelines here: https://snakemake.readthedocs.io/en/stable/project_info/contributing.html#testing-guidelines (i.e. in the corresponding place under docs/), to explain how to setup and run the tests just using pixi?

@johanneskoester
Copy link
Copy Markdown
Contributor

Fantastic work!! One final thing: can you please update the testing guidelines here: https://snakemake.readthedocs.io/en/stable/project_info/contributing.html#testing-guidelines (i.e. in the corresponding place under docs/), to explain how to setup and run the tests just using pixi?

Let us do that in a separate PR, ok?

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.

Actionable comments posted: 0

🔭 Outside diff range comments (1)
.github/workflows/main.yml (1)

140-147: ⚠️ Potential issue

Critical Conditional Syntax Issue in "testing-done" Job
There is a typo in the conditional for the testing-done job on line 141. The key is written as github.event_pull_request.merged instead of the expected github.event.pull_request.merged. This discrepancy may result in the condition not evaluating as intended.

Suggested Fix:

-    if: github.event_pull_request.merged != true || github.ref != 'refs/heads/main'
+    if: github.event.pull_request.merged != true || github.ref != 'refs/heads/main'
🧹 Nitpick comments (4)
.github/workflows/main.yml (4)

47-56: Matrix Configuration and Docstring Typo
The matrix definition with multiple test groups, OS, and Python environments is well structured. Note that the inline comment references pyprojec.toml—please update it to pyproject.toml for clarity.


102-110: Trailing Whitespace in Linux Test Step
Static analysis has flagged trailing whitespace on line 110. Please remove any extra spaces to conform with YAML formatting best practices.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 110-110: trailing spaces

(trailing-spaces)


111-119: Trailing Whitespace in Windows Test Step
Similarly, trailing whitespace is reported (e.g., on line 116). Please clean up the extra spaces in this step.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 116-116: trailing spaces

(trailing-spaces)


130-133: Remove Trailing Whitespace in Build Container Image Job
Trailing whitespace is detected on line 133 within the build job. Removing these extra spaces will help maintain YAML cleanliness.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 133-133: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 71dbbb1 and e9e9c7d.

⛔ Files ignored due to path filters (1)
  • pyproject.toml is excluded by !pyproject.toml
📒 Files selected for processing (1)
  • .github/workflows/main.yml (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/main.yml

[error] 110-110: trailing spaces

(trailing-spaces)


[error] 116-116: trailing spaces

(trailing-spaces)


[error] 133-133: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (20)
  • GitHub Check: tests (10, windows-latest, py312, bash)
  • GitHub Check: tests (10, windows-latest, py311, bash)
  • GitHub Check: tests (9, windows-latest, py312, bash)
  • GitHub Check: tests (9, windows-latest, py311, bash)
  • GitHub Check: tests (8, windows-latest, py312, bash)
  • GitHub Check: tests (8, windows-latest, py311, bash)
  • GitHub Check: tests (7, windows-latest, py312, bash)
  • GitHub Check: tests (7, windows-latest, py311, bash)
  • GitHub Check: tests (6, windows-latest, py312, bash)
  • GitHub Check: tests (6, windows-latest, py311, bash)
  • GitHub Check: tests (5, windows-latest, py312, bash)
  • GitHub Check: tests (5, windows-latest, py311, bash)
  • GitHub Check: tests (4, windows-latest, py312, bash)
  • GitHub Check: tests (4, windows-latest, py311, bash)
  • GitHub Check: tests (3, windows-latest, py312, bash)
  • GitHub Check: tests (3, windows-latest, py311, bash)
  • GitHub Check: tests (2, windows-latest, py312, bash)
  • GitHub Check: tests (2, windows-latest, py311, bash)
  • GitHub Check: tests (1, windows-latest, py312, bash)
  • GitHub Check: tests (1, windows-latest, py311, bash)
🔇 Additional comments (8)
.github/workflows/main.yml (8)

24-31: Pixi Installation in Formatting Job
The addition of the Pixi installation step using prefix-dev/setup-pixi@v0.8.3 for the "quality" environment looks good. Please just confirm that disabling caching (setting cache: false) is intentional.


32-34: Modernized Formatting Command
Replacing the direct use of Black with the Pixi formatting command (pixi run -e quality format --check --diff .) correctly reflects the PR’s modernization intent.


42-45: Informative Comment Block for Testing Job
The clearly delimited comment section for the testing job improves readability. No issues here.


70-77: Pixi Installation in Testing Job
The step that installs Pixi for each test environment mirrors the formatting job and is consistent.


78-85: AppArmor Namespace Adjustment for Linux
Disabling AppArmor namespace restrictions on Linux runners is appropriately conditional and necessary for the subsequent steps.


86-93: MinIO Setup for AWS S3 Testing
The configuration for setting up MinIO using comfuture/minio-action@v1 is implemented correctly with the expected parameters.


94-101: MinIO Testing Step
The commands for testing the MinIO setup under a Linux environment are succinct and clear.


120-129: Report Generation Test Setup
The Report Generation Tests step is well configured, appropriately changing directory and invoking Pixi with the intended options.

@sonarqubecloud
Copy link
Copy Markdown

@johanneskoester johanneskoester enabled auto-merge (squash) March 12, 2025 21:08
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.

Actionable comments posted: 0

🧹 Nitpick comments (5)
.github/workflows/main.yml (5)

32-33: Switch Formatting Check from Black to Pixi
The formatting check now uses the Pixi command (pixi run -e quality format --check --diff .) instead of invoking Black directly. Please verify that any associated documentation or PR comment messages (see later “Comment PR” step) are updated accordingly for consistency.


47-54: Matrix Configuration and Comment Accuracy
The matrix strategy is well defined with a comprehensive list of test groups, operating systems, and Python environments. Please note a minor typo in the comment on line 51—consider updating "pyprojec.toml" to "pyproject.toml". Also, ensure that including windows-latest aligns with your intended testing scope given some steps are Linux-specific.


102-109: Trailing Whitespace in Linux Test Step
The Linux test step command for running tests is correct overall. However, a trailing whitespace is detected on line 109. Removing this will help maintain YAML cleanliness.

-          --splitting-algorithm=least_duration␣
+          --splitting-algorithm=least_duration
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 109-109: trailing spaces

(trailing-spaces)


118-127: Report Generation Tests and Shell Parameter Syntax
The report generation step is configured for Linux, and the sequence of commands is clear. One minor point: the shell parameter "bash -el {0}" is a bit unconventional. Consider verifying if the intended effect is achieved or if a more explicit format (for example using separate flags like bash -e -l {0}) would improve clarity.


128-132: Trailing Whitespace in Build-Container-Image Job
In the build-container-image job, line 131 shows trailing whitespace. Please remove this to adhere to YAML best practices.

-    needs: tests␣
+    needs: tests
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 131-131: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e9e9c7d and 1b1c9cc.

📒 Files selected for processing (1)
  • .github/workflows/main.yml (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/main.yml

[error] 109-109: trailing spaces

(trailing-spaces)


[error] 131-131: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (38)
  • GitHub Check: tests (10, windows-latest, py312, bash)
  • GitHub Check: tests (10, windows-latest, py311, bash)
  • GitHub Check: tests (10, ubuntu-latest, py312, bash)
  • GitHub Check: tests (10, ubuntu-latest, py311, bash)
  • GitHub Check: tests (9, windows-latest, py312, bash)
  • GitHub Check: tests (9, windows-latest, py311, bash)
  • GitHub Check: tests (9, ubuntu-latest, py312, bash)
  • GitHub Check: tests (9, ubuntu-latest, py311, bash)
  • GitHub Check: tests (8, windows-latest, py311, bash)
  • GitHub Check: tests (8, ubuntu-latest, py312, bash)
  • GitHub Check: tests (8, ubuntu-latest, py311, bash)
  • GitHub Check: tests (7, windows-latest, py311, bash)
  • GitHub Check: tests (7, ubuntu-latest, py312, bash)
  • GitHub Check: tests (7, ubuntu-latest, py311, bash)
  • GitHub Check: tests (6, windows-latest, py312, bash)
  • GitHub Check: tests (6, windows-latest, py311, bash)
  • GitHub Check: tests (6, ubuntu-latest, py312, bash)
  • GitHub Check: tests (6, ubuntu-latest, py311, bash)
  • GitHub Check: tests (5, windows-latest, py312, bash)
  • GitHub Check: tests (5, windows-latest, py311, bash)
  • GitHub Check: tests (5, ubuntu-latest, py312, bash)
  • GitHub Check: tests (5, ubuntu-latest, py311, bash)
  • GitHub Check: tests (4, windows-latest, py312, bash)
  • GitHub Check: tests (4, windows-latest, py311, bash)
  • GitHub Check: tests (4, ubuntu-latest, py312, bash)
  • GitHub Check: tests (4, ubuntu-latest, py311, bash)
  • GitHub Check: tests (3, windows-latest, py312, bash)
  • GitHub Check: tests (3, windows-latest, py311, bash)
  • GitHub Check: tests (3, ubuntu-latest, py312, bash)
  • GitHub Check: tests (3, ubuntu-latest, py311, bash)
  • GitHub Check: tests (2, windows-latest, py312, bash)
  • GitHub Check: tests (2, windows-latest, py311, bash)
  • GitHub Check: tests (2, ubuntu-latest, py312, bash)
  • GitHub Check: tests (2, ubuntu-latest, py311, bash)
  • GitHub Check: tests (1, windows-latest, py312, bash)
  • GitHub Check: tests (1, windows-latest, py311, bash)
  • GitHub Check: tests (1, ubuntu-latest, py312, bash)
  • GitHub Check: tests (1, ubuntu-latest, py311, bash)
🔇 Additional comments (9)
.github/workflows/main.yml (9)

24-31: Install Pixi in Formatting Job
The Pixi installation step is well configured with the correct version and parameters. The use of cache: false and locked: false appears intentional (to avoid using a pixi.lock file).


42-44: Enhanced Section Separation for Testing Job
The added section header clearly marks the start of the testing configuration using Pixi. This improves readability and helps contextualize the subsequent job definitions.


57-64: Runner and Environment Variables Setup
The runs-on: ${{ matrix.os }} directive and environment variable definitions are correctly set up. No issues noted here.


70-76: Pixi Installation in Tests Job
The Pixi installation step for the tests job mirrors the formatting job configuration and is correctly parameterized to deploy the proper environment from the matrix.


79-85: Linux-Specific AppArmor Configuration
The step to disable AppArmor restrictions for Apptainer is appropriately conditioned for Linux. Ensure that this command works as expected on all targeted Linux runners; occasionally, differences in distribution defaults might affect system control commands.


86-93: Setup MinIO for AWS S3 Testing
The MinIO setup step leverages a community action with clear parameters. The configuration appears correct and should suffice for AWS S3 testing.


94-101: MinIO Testing Step
The test step for MinIO appropriately sets the necessary environment variables and executes the command to create an S3 bucket. This implementation is straightforward and clear.


110-116: Windows Test Configuration Review
The Windows test step uses test-simple, which should be confirmed to align with your testing expectations on Windows. Given the mix of Linux-specific steps elsewhere, please double-check that the Windows tests are isolated and correctly configured.


139-145: Testing-Done Job Configuration
The testing-done job is straightforward; it correctly depends on the tests job and echoes a success message. No issues noted in this section.

@johanneskoester johanneskoester merged commit 77992d8 into snakemake:main Mar 12, 2025
30 of 50 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Snakemake Hackathon March 2025 Mar 12, 2025
johanneskoester pushed a commit that referenced this pull request Mar 14, 2025
🤖 I have created a release *beep* *boop*
---


##
[9.0.0](v8.30.0...v9.0.0)
(2025-03-14)


### ⚠ BREAKING CHANGES

* Logging refactor & add LoggerPluginInterface
([#3107](#3107))

### Features

* [#3412](#3412) - keep
shadow folder of failed job if --keep-incomplete flag is set.
([#3430](#3430))
([22978c3](22978c3))
* add flag --report-after-run to automatically generate the report after
a successfull workflow run
([#3428](#3428))
([b0a7f03](b0a7f03))
* add flatten function to IO utils
([#3424](#3424))
([67fa392](67fa392))
* add helper functions to parse input files
([#2918](#2918))
([63e45a7](63e45a7))
* Add option to print redacted file names
([#3089](#3089))
([ba4d264](ba4d264))
* add support for validation of polars dataframe and lazyframe
([#3262](#3262))
([c7473a6](c7473a6))
* added support for rendering dag with mermaid js
([#3409](#3409))
([7bf8381](7bf8381))
* adding --replace-workflow-config to fully replace workflow configs
(from config: directive) with --configfile, instead of merging them
([#3381](#3381))
([47504a0](47504a0))
* Dynamic module name
([#3401](#3401))
([024dc32](024dc32))
* Enable saving and reloading IOCache object
([#3386](#3386))
([c935953](c935953))
* files added in rule params with workflow.source_path will be available
in used containers
([#3385](#3385))
([a6e45bf](a6e45bf))
* Fix keep_local in storage directive and more freedom over remote
retrieval behaviour
([#3410](#3410))
([67b4739](67b4739))
* inherit parameters of use rule and extend/replace individual items
them when using 'with' directive
([#3365](#3365))
([93e4b92](93e4b92))
* Logging refactor & add LoggerPluginInterface
([#3107](#3107))
([86f1d6e](86f1d6e))
* Maximal file size for checksums
([#3368](#3368))
([b039f8a](b039f8a))
* Modernize package configuration using Pixi
([#3369](#3369))
([77992d8](77992d8))
* multiext support for named input/output
([#3372](#3372))
([05e1378](05e1378))
* optionally auto-group jobs via temp files in case of remote execution
([#3378](#3378))
([cc9bba2](cc9bba2))


### Bug Fixes

* `--delete-all-output` ignores `--dry-run`
([#3265](#3265))
([23fef82](23fef82))
* 3342 faster touch runs and warning messages for non-existing files
([#3398](#3398))
([cd9c3c3](cd9c3c3))
* add default value to max-jobs-per-timespan
([#3043](#3043))
([2959abe](2959abe))
* checkpoints inside modules are overwritten
([#3359](#3359))
([fba3ac7](fba3ac7))
* Convert Path to IOFile
([#3405](#3405))
([c58684c](c58684c))
* Do not perform storage object cleanup with --keep-storage-local-copies
set ([#3358](#3358))
([9a6d14b](9a6d14b))
* edgecases of source deployment in case of remote execution
([#3396](#3396))
([5da13be](5da13be))
* enhance error message formatting for strict DAG-building mode
([#3376](#3376))
([a1c39ee](a1c39ee))
* fix bug in checkpoint handling that led to exceptions in case
checkpoint output was missing upon rerun
([#3423](#3423))
([8cf4a2f](8cf4a2f))
* force check all required outputs
([#3341](#3341))
([495a4e7](495a4e7))
* group job formatting
([#3442](#3442))
([f0b10a3](f0b10a3))
* in remote jobs, upload storage in topological order such that
modification dates are preserved (e.g. in case of group jobs)
([#3377](#3377))
([eace08f](eace08f))
* only skip eval when resource depends on input
([#3374](#3374))
([4574c92](4574c92))
* Prevent execution of conda in apptainer when not explicitly requested
in software deployment method
([#3388](#3388))
([c43c5c0](c43c5c0))
* print filenames with quotes around them in RuleException
([#3269](#3269))
([6baeda5](6baeda5))
* Re-evaluation of free resources
([#3399](#3399))
([6371293](6371293))
* ReadTheDocs layout issue due to src directory change
([#3419](#3419))
([695b127](695b127))
* robustly escaping quotes in generated bash scripts (v2)
([#3297](#3297))
([#3389](#3389))
([58720bd](58720bd))
* Show apptainer image URL in snakemake report
([#3407](#3407))
([45f0450](45f0450))
* Update ReadTheDocs configuration for documentation build to use Pixi
([#3433](#3433))
([3f227a6](3f227a6))


### Documentation

* Add pixi setup instructions to general use tutorial
([#3382](#3382))
([115e81b](115e81b))
* fix contribution section heading levels, fix docs testing setup order
([#3360](#3360))
([051dc53](051dc53))
* fix link to github.com/snakemake/poetry-snakemake-plugin
([#3436](#3436))
([ec6d97c](ec6d97c))
* fix quoting
([#3394](#3394))
([b40f599](b40f599))
* fix rerun-triggers default
([#3403](#3403))
([4430e23](4430e23))
* fix typo 'safe' -&gt; 'save'
([#3384](#3384))
([7755861](7755861))
* mention code formatting in the contribution section
([#3431](#3431))
([e8682b7](e8682b7))
* remove duplicated 'functions'.
([#3356](#3356))
([7c595db](7c595db))
* update broken links documentation
([#3437](#3437))
([e3d0d88](e3d0d88))
* Updating contributing guidelines with new pixi dev setup
([#3415](#3415))
([8e95a12](8e95a12))

---
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: snakemake-bot <snakemake-bot-admin@googlegroups.com>
@ASLeonard ASLeonard mentioned this pull request Apr 1, 2025
kjohnsen pushed a commit to kjohnsen/snakemake that referenced this pull request Dec 15, 2025
resolves snakemake#3347 

This PR is the first step in modernizing the project configuration by
moving the `setup.cfg` sections to pyproject.toml, and defining
environments using pixi.

<details>
<summary> pixi info </summary>

```console
Project
------------
               Name: snakemake
            Version: 8.30.0
      Manifest file: /Users/bhklab/dev/snakemake-dev/snakemake/pyproject.toml
       Last updated: 12-03-2025 11:39:46

Environments
------------
        Environment: default
           Features: default
           Channels: conda-forge, bioconda
   Dependency count: 1
       Dependencies: python
  PyPI Dependencies: snakemake, appdirs, immutables, configargparse, connection-pool, docutils, gitpython, humanfriendly, jinja2, jsonschema, nbformat, packaging, psutil, pulp, pyyaml, requests, reretry, smart-open, snakemake-interface-executor-plugins, snakemake-interface-common, snakemake-interface-storage-plugins, snakemake-interface-report-plugins, tabulate, throttler, wrapt, yte, dpath, conda-inject
   Target platforms: linux-aarch64, osx-64, win-64, linux-64, osx-arm64

        Environment: dev
           Features: test, docs, style, default
           Channels: conda-forge, bioconda
   Dependency count: 41
       Dependencies: pytest, pytest-mock, pytest-cov, pytest-split, graphviz, oauth2client, numpy, glpk, pulp, boto3, responses, pytools, pandoc, crc32c, filelock, humanfriendly, pandas, pygments, pysftp, yte, ftputil, httpretty, polars, requests-mock, docutils, snakemake-storage-plugin-http, snakemake-storage-plugin-s3, snakemake-storage-plugin-fs, snakemake-executor-plugin-cluster-generic, conda, pip, sphinx, sphinx-argparse, sphinx_rtd_theme, sphinxawesome-theme, recommonmark, commonmark, myst-parser, sphinxcontrib-napoleon, black, python
  PyPI Dependencies: snakemake, appdirs, immutables, configargparse, connection-pool, docutils, gitpython, humanfriendly, jinja2, jsonschema, nbformat, packaging, psutil, pulp, pyyaml, requests, reretry, smart-open, snakemake-interface-executor-plugins, snakemake-interface-common, snakemake-interface-storage-plugins, snakemake-interface-report-plugins, tabulate, throttler, wrapt, yte, dpath, conda-inject
   Target platforms: linux-aarch64, osx-arm64, osx-64, linux-64, win-64
              Tasks: test-complex, test-all, format, test-simple, docs, build-docs

        Environment: py311
           Features: py311, test, default
           Channels: conda-forge, bioconda
   Dependency count: 32
       Dependencies: python, pytest, pytest-mock, pytest-cov, pytest-split, graphviz, oauth2client, numpy, glpk, pulp, boto3, responses, pytools, pandoc, crc32c, filelock, humanfriendly, pandas, pygments, pysftp, yte, ftputil, httpretty, polars, requests-mock, docutils, snakemake-storage-plugin-http, snakemake-storage-plugin-s3, snakemake-storage-plugin-fs, snakemake-executor-plugin-cluster-generic, conda, pip
  PyPI Dependencies: snakemake, appdirs, immutables, configargparse, connection-pool, docutils, gitpython, humanfriendly, jinja2, jsonschema, nbformat, packaging, psutil, pulp, pyyaml, requests, reretry, smart-open, snakemake-interface-executor-plugins, snakemake-interface-common, snakemake-interface-storage-plugins, snakemake-interface-report-plugins, tabulate, throttler, wrapt, yte, dpath, conda-inject
   Target platforms: osx-64, linux-aarch64, linux-64, osx-arm64, win-64
              Tasks: test-all, test-simple, test-complex

        Environment: py312
           Features: py312, test, default
           Channels: conda-forge, bioconda
   Dependency count: 32
       Dependencies: python, pytest, pytest-mock, pytest-cov, pytest-split, graphviz, oauth2client, numpy, glpk, pulp, boto3, responses, pytools, pandoc, crc32c, filelock, humanfriendly, pandas, pygments, pysftp, yte, ftputil, httpretty, polars, requests-mock, docutils, snakemake-storage-plugin-http, snakemake-storage-plugin-s3, snakemake-storage-plugin-fs, snakemake-executor-plugin-cluster-generic, conda, pip
  PyPI Dependencies: snakemake, appdirs, immutables, configargparse, connection-pool, docutils, gitpython, humanfriendly, jinja2, jsonschema, nbformat, packaging, psutil, pulp, pyyaml, requests, reretry, smart-open, snakemake-interface-executor-plugins, snakemake-interface-common, snakemake-interface-storage-plugins, snakemake-interface-report-plugins, tabulate, throttler, wrapt, yte, dpath, conda-inject
   Target platforms: win-64, osx-64, osx-arm64, linux-aarch64, linux-64
              Tasks: test-complex, test-all, test-simple

        Environment: docs
           Features: docs, default
           Channels: conda-forge, bioconda
   Dependency count: 9
       Dependencies: sphinx, sphinx-argparse, sphinx_rtd_theme, sphinxawesome-theme, recommonmark, commonmark, myst-parser, sphinxcontrib-napoleon, python
  PyPI Dependencies: snakemake, appdirs, immutables, configargparse, connection-pool, docutils, gitpython, humanfriendly, jinja2, jsonschema, nbformat, packaging, psutil, pulp, pyyaml, requests, reretry, smart-open, snakemake-interface-executor-plugins, snakemake-interface-common, snakemake-interface-storage-plugins, snakemake-interface-report-plugins, tabulate, throttler, wrapt, yte, dpath, conda-inject
   Target platforms: osx-arm64, win-64, linux-64, linux-aarch64, osx-64
              Tasks: docs, build-docs

        Environment: quality
           Features: style, default
           Channels: conda-forge, bioconda
   Dependency count: 2
       Dependencies: black, python
  PyPI Dependencies: snakemake, appdirs, immutables, configargparse, connection-pool, docutils, gitpython, humanfriendly, jinja2, jsonschema, nbformat, packaging, psutil, pulp, pyyaml, requests, reretry, smart-open, snakemake-interface-executor-plugins, snakemake-interface-common, snakemake-interface-storage-plugins, snakemake-interface-report-plugins, tabulate, throttler, wrapt, yte, dpath, conda-inject
   Target platforms: linux-aarch64, linux-64, win-64, osx-64, osx-arm64
              Tasks: format

        Environment: publish
           Features: publish, default
           Channels: conda-forge, bioconda
   Dependency count: 4
       Dependencies: setuptools, twine, python-build, python
  PyPI Dependencies: snakemake, appdirs, immutables, configargparse, connection-pool, docutils, gitpython, humanfriendly, jinja2, jsonschema, nbformat, packaging, psutil, pulp, pyyaml, requests, reretry, smart-open, snakemake-interface-executor-plugins, snakemake-interface-common, snakemake-interface-storage-plugins, snakemake-interface-report-plugins, tabulate, throttler, wrapt, yte, dpath, conda-inject
   Target platforms: osx-arm64, win-64, linux-aarch64, linux-64, osx-64
              Tasks: check-build, build



```

</details>

<details>
<summary> pixi task ls </summary>

```console
➜ pixi task ls       
Tasks that can run on this machine:
-----------------------------------
build, build-docs, check-build, docs, format, test-all, test-complex, test-simple

 - build           Build the package into the dist/ directory
 - build-docs      Build the documentation in the docs/ directory
 - check-build     Check that the package can be uploaded
 - docs            Serve the documentation on http://localhost:8000
 - format          Format the code
 - test-all        Runs both simple and complex tests
 - test-complex    Run all tests in the tests directory except tests.py
 - test-simple     Run tests only for tests/tests.py

➜ pixi task ls -s
Tasks per environment:
----------------------
py312: test-all, test-complex, test-simple
quality: format
publish: build, check-build
docs: build-docs, docs
py311: test-all, test-complex, test-simple
default: 
dev: build-docs, docs, format, test-all, test-complex, test-simple
```

</details>

Based on the github actions workflow which uses the old
`test-environment.yaml` to install dependencies, which modify the `yaml`
on-the-fly for windows testing, I also tried to define the `linux`
specific test dependencies in the
`[tool.pixi.feature.test.target.linux-64.dependencies]`

For the most part I've tried to split up dependencies into re-usable
features, otherwise, which can be better utilized across duplicated
dependencies in the `test` and `docs` env

## Notes

1. I am not sure why the old `pyproject.toml` specified requiring
`python < 3.11` for setuptools,
https://github.com/snakemake/snakemake/blob/d1c369bcac77f9818373ca9a7e8940bf5a649c49/pyproject.toml#L3-L6
Should this be added back?

2. As explained in
snakemake#3369 (comment)
We ignore the lock file in library development to ensure tests reflect
user environments while allowing developers to generate their own.

3. I was getting [this error in the test
suite](https://github.com/snakemake/snakemake/actions/runs/13786010103/job/38554140354?pr=3369)
which I managed to fix with 71163c8,
not sure if there is a different reason for this though.

## Next Steps

- [x] verify that the tests work in the test environment as expected
- [x] verify the dependencies across the old and new configurations 



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **Chores**
- Improved file handling by adding new entries to `.gitattributes` and
`.gitignore` for better management of the `pixi.lock` file.
- Updated GitHub Actions workflows to utilize `Pixi` for formatting
checks and testing, introducing a new job for testing with `Pixi`.
  - Removed the `setup.cfg` configuration file.

- **Style**
- Enhanced code formatting in file handling routines for improved
maintainability.

- **Tests**
- Added decorators to test functions to indicate dependencies on
specific environment modules.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Johannes Koester <johannes.koester@uni-due.de>
kjohnsen pushed a commit to kjohnsen/snakemake that referenced this pull request Dec 15, 2025
🤖 I have created a release *beep* *boop*
---


##
[9.0.0](snakemake/snakemake@v8.30.0...v9.0.0)
(2025-03-14)


### ⚠ BREAKING CHANGES

* Logging refactor & add LoggerPluginInterface
([snakemake#3107](snakemake#3107))

### Features

* [snakemake#3412](snakemake#3412) - keep
shadow folder of failed job if --keep-incomplete flag is set.
([snakemake#3430](snakemake#3430))
([22978c3](snakemake@22978c3))
* add flag --report-after-run to automatically generate the report after
a successfull workflow run
([snakemake#3428](snakemake#3428))
([b0a7f03](snakemake@b0a7f03))
* add flatten function to IO utils
([snakemake#3424](snakemake#3424))
([67fa392](snakemake@67fa392))
* add helper functions to parse input files
([snakemake#2918](snakemake#2918))
([63e45a7](snakemake@63e45a7))
* Add option to print redacted file names
([snakemake#3089](snakemake#3089))
([ba4d264](snakemake@ba4d264))
* add support for validation of polars dataframe and lazyframe
([snakemake#3262](snakemake#3262))
([c7473a6](snakemake@c7473a6))
* added support for rendering dag with mermaid js
([snakemake#3409](snakemake#3409))
([7bf8381](snakemake@7bf8381))
* adding --replace-workflow-config to fully replace workflow configs
(from config: directive) with --configfile, instead of merging them
([snakemake#3381](snakemake#3381))
([47504a0](snakemake@47504a0))
* Dynamic module name
([snakemake#3401](snakemake#3401))
([024dc32](snakemake@024dc32))
* Enable saving and reloading IOCache object
([snakemake#3386](snakemake#3386))
([c935953](snakemake@c935953))
* files added in rule params with workflow.source_path will be available
in used containers
([snakemake#3385](snakemake#3385))
([a6e45bf](snakemake@a6e45bf))
* Fix keep_local in storage directive and more freedom over remote
retrieval behaviour
([snakemake#3410](snakemake#3410))
([67b4739](snakemake@67b4739))
* inherit parameters of use rule and extend/replace individual items
them when using 'with' directive
([snakemake#3365](snakemake#3365))
([93e4b92](snakemake@93e4b92))
* Logging refactor & add LoggerPluginInterface
([snakemake#3107](snakemake#3107))
([86f1d6e](snakemake@86f1d6e))
* Maximal file size for checksums
([snakemake#3368](snakemake#3368))
([b039f8a](snakemake@b039f8a))
* Modernize package configuration using Pixi
([snakemake#3369](snakemake#3369))
([77992d8](snakemake@77992d8))
* multiext support for named input/output
([snakemake#3372](snakemake#3372))
([05e1378](snakemake@05e1378))
* optionally auto-group jobs via temp files in case of remote execution
([snakemake#3378](snakemake#3378))
([cc9bba2](snakemake@cc9bba2))


### Bug Fixes

* `--delete-all-output` ignores `--dry-run`
([snakemake#3265](snakemake#3265))
([23fef82](snakemake@23fef82))
* 3342 faster touch runs and warning messages for non-existing files
([snakemake#3398](snakemake#3398))
([cd9c3c3](snakemake@cd9c3c3))
* add default value to max-jobs-per-timespan
([snakemake#3043](snakemake#3043))
([2959abe](snakemake@2959abe))
* checkpoints inside modules are overwritten
([snakemake#3359](snakemake#3359))
([fba3ac7](snakemake@fba3ac7))
* Convert Path to IOFile
([snakemake#3405](snakemake#3405))
([c58684c](snakemake@c58684c))
* Do not perform storage object cleanup with --keep-storage-local-copies
set ([snakemake#3358](snakemake#3358))
([9a6d14b](snakemake@9a6d14b))
* edgecases of source deployment in case of remote execution
([snakemake#3396](snakemake#3396))
([5da13be](snakemake@5da13be))
* enhance error message formatting for strict DAG-building mode
([snakemake#3376](snakemake#3376))
([a1c39ee](snakemake@a1c39ee))
* fix bug in checkpoint handling that led to exceptions in case
checkpoint output was missing upon rerun
([snakemake#3423](snakemake#3423))
([8cf4a2f](snakemake@8cf4a2f))
* force check all required outputs
([snakemake#3341](snakemake#3341))
([495a4e7](snakemake@495a4e7))
* group job formatting
([snakemake#3442](snakemake#3442))
([f0b10a3](snakemake@f0b10a3))
* in remote jobs, upload storage in topological order such that
modification dates are preserved (e.g. in case of group jobs)
([snakemake#3377](snakemake#3377))
([eace08f](snakemake@eace08f))
* only skip eval when resource depends on input
([snakemake#3374](snakemake#3374))
([4574c92](snakemake@4574c92))
* Prevent execution of conda in apptainer when not explicitly requested
in software deployment method
([snakemake#3388](snakemake#3388))
([c43c5c0](snakemake@c43c5c0))
* print filenames with quotes around them in RuleException
([snakemake#3269](snakemake#3269))
([6baeda5](snakemake@6baeda5))
* Re-evaluation of free resources
([snakemake#3399](snakemake#3399))
([6371293](snakemake@6371293))
* ReadTheDocs layout issue due to src directory change
([snakemake#3419](snakemake#3419))
([695b127](snakemake@695b127))
* robustly escaping quotes in generated bash scripts (v2)
([snakemake#3297](snakemake#3297))
([snakemake#3389](snakemake#3389))
([58720bd](snakemake@58720bd))
* Show apptainer image URL in snakemake report
([snakemake#3407](snakemake#3407))
([45f0450](snakemake@45f0450))
* Update ReadTheDocs configuration for documentation build to use Pixi
([snakemake#3433](snakemake#3433))
([3f227a6](snakemake@3f227a6))


### Documentation

* Add pixi setup instructions to general use tutorial
([snakemake#3382](snakemake#3382))
([115e81b](snakemake@115e81b))
* fix contribution section heading levels, fix docs testing setup order
([snakemake#3360](snakemake#3360))
([051dc53](snakemake@051dc53))
* fix link to github.com/snakemake/poetry-snakemake-plugin
([snakemake#3436](snakemake#3436))
([ec6d97c](snakemake@ec6d97c))
* fix quoting
([snakemake#3394](snakemake#3394))
([b40f599](snakemake@b40f599))
* fix rerun-triggers default
([snakemake#3403](snakemake#3403))
([4430e23](snakemake@4430e23))
* fix typo 'safe' -&gt; 'save'
([snakemake#3384](snakemake#3384))
([7755861](snakemake@7755861))
* mention code formatting in the contribution section
([snakemake#3431](snakemake#3431))
([e8682b7](snakemake@e8682b7))
* remove duplicated 'functions'.
([snakemake#3356](snakemake#3356))
([7c595db](snakemake@7c595db))
* update broken links documentation
([snakemake#3437](snakemake#3437))
([e3d0d88](snakemake@e3d0d88))
* Updating contributing guidelines with new pixi dev setup
([snakemake#3415](snakemake#3415))
([8e95a12](snakemake@8e95a12))

---
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: snakemake-bot <snakemake-bot-admin@googlegroups.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request hackathon-2025

Projects

Development

Successfully merging this pull request may close these issues.

Migrate devenv setup and package building from setuptools,versioneer,setup.cfg to plain pyproject.toml in combination with uv or pixi

3 participants