Skip to content

feat: add pixi config #18

Merged
johanneskoester merged 7 commits intosnakemake:mainfrom
jjjermiah:jjjermiah/setup-pixi
Mar 14, 2025
Merged

feat: add pixi config #18
johanneskoester merged 7 commits intosnakemake:mainfrom
jjjermiah:jjjermiah/setup-pixi

Conversation

@jjjermiah
Copy link
Copy Markdown
Contributor

@jjjermiah jjjermiah commented Mar 14, 2025

Summary by CodeRabbit

  • Chores
    • Improved repository management to prevent merge conflicts by enforcing binary handling for a critical lock file.
    • Enhanced project maintenance by refining ignore settings to automatically exclude specific temporary and build-related files.
    • Updated GitHub Actions workflow for quality control and testing, transitioning from Poetry to Pixi for dependency management and checks.
    • Introduced a new quality control job and updated testing procedures to align with the new dependency management system.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 14, 2025

Warning

Rate limit exceeded

@jjjermiah has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 1 minutes and 37 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 36522db and 34a005a.

⛔ Files ignored due to path filters (2)
  • pixi.lock is excluded by !**/*.lock
  • pyproject.toml is excluded by !pyproject.toml
📒 Files selected for processing (2)
  • .github/workflows/test.yml (1 hunks)
  • src/snakemake_interface_logger_plugins/common.py (1 hunks)
📝 Walkthrough

Walkthrough

The changes update three configuration files. In the .gitattributes file, a new entry is added for the pixi.lock file to treat it as a binary, apply YAML syntax highlighting, and mark it as generated to prevent 3-way merges. The .gitignore file has new entries to ignore files and directories related to pixi environments, specifically for .pixi directories and files with the .egg-info extension. Additionally, the .github/workflows/test.yml file has undergone significant restructuring, transitioning from Poetry to Pixi for code quality and testing processes.

Changes

File Change Summary
.gitattributes Added entry: pixi.lock merge=binary linguist-language=YAML linguist-generated=true to control merge behavior and syntax highlighting.
.gitignore Added entries: .pixi and *.egg-info to ignore files/directories related to pixi environments.
.github/workflows/test.yml Renamed job: formattingquality-control; added job: Collect QC; added job: Run tests; replaced Poetry commands with Pixi commands for quality checks and testing.

🪧 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 jjjermiah requested a review from cademirch March 14, 2025 14:33
Copy link
Copy Markdown

@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 (1)
.github/workflows/test.yml (1)

60-61: Remove Trailing Spaces.
Static analysis flagged trailing spaces (YAMLlint error on line 61). Please remove any extraneous whitespace to adhere to YAML style best practices.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 61-61: 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 aaeae73 and 71b4947.

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

[error] 61-61: trailing spaces

(trailing-spaces)

🔇 Additional comments (10)
.github/workflows/test.yml (10)

10-15: Review Permissions Block.
The permissions block is now explicitly defined with specific rights (contents: read, checks: write, issues: write, pull-requests: write). Please verify these settings align with your repository’s access policies and CI requirements.


17-18: Rename to "quality-control" Job.
The job formerly known as “formatting” is now renamed to “quality-control”, which better reflects its responsibilities. Confirm that internal documentation and any dependent scripts are updated accordingly.


20-21: Code Checkout Step Verification.
The checkout step using actions/checkout@v4 is correctly configured. No changes are needed here.


23-28: Pixi Installation Step.
The new “Install Pixi” step is set up with the expected parameters (environment: dev, pixi-version: v0.42.1, cache: true). Ensure that these version pins and configuration settings meet your project's compatibility and caching requirements.


45-48: "Collect QC" Step Validity.
The new "Collect QC" step will run only on success (using if: success()) and echoes a success message. This is a lightweight way to signal a passed quality control phase, but ensure that any failed checks aren’t inadvertently masked if further reporting is needed.


55-60: Pixi Installation in Testing Job.
Similar to the quality-control job, the testing job installs Pixi with the same parameters. Consistency across jobs is good; please confirm these parameters are adequate for running your tests in the Pixi environment.


62-63: Test Execution Step.
The “Run tests” step invokes pixi run --environment dev test --show-capture=all -s -vv, which appears appropriate for executing tests with verbose output and complete capture logs. Verify that all necessary test configurations are applied.


35-38:

Details

❓ Verification inconclusive

Ruff Lint Step Assessment.
The linting step executes pixi run --environment dev lint --diff and continues on errors. Confirm whether lint errors should be allowed to pass or if they need to halt the quality-control process. Adjust if necessary.


Action Required: Evaluate whether lint errors should block pipeline execution.
The Ruff lint step in .github/workflows/test.yml (lines 35–38) currently sets continue-on-error: true, allowing lint errors to pass without stopping the workflow. Please confirm whether this behavior is intentional. If maintaining strict code quality is desired, update the configuration (for example, by removing or setting continue-on-error to false) so that lint failures halt the process.


40-43:

Details

❓ Verification inconclusive

Mypy Type-Check Configuration.
This step executes type-checking via Pixi (pixi run --environment dev type-check) while continuing on error. Verify that type-check issues should not fail the workflow; if stricter type integrity is desired, consider removing the continue-on-error flag.


Action Required: Revisit Mypy Type-Check Behavior
The workflow step running Pixi’s type-check (pixi run --environment dev type-check) is configured with continue-on-error: true, meaning that type-check errors won’t fail the build. Please verify that this behavior is intentional for your environment. If stronger type integrity is required, consider removing the continue-on-error flag.


30-33:

Details

❓ Verification inconclusive

Ruff Format Check Step.
This step runs the command pixi run --environment dev format --check with continue-on-error enabled. Please review if allowing format check failures should be non-blocking; typically, formatting issues might be enforced strictly to maintain code style consistency.


Confirm non-blocking behavior for Ruff Format step
In .github/workflows/test.yml (lines 30–33), the step running pixi run --environment dev format --check is configured with continue-on-error: true, which means a formatting failure won’t block the workflow. Please verify if this non-blocking behavior is intentional or if formatting issues should instead be treated as errors to enforce strict code style consistency.


🏁 Script executed:

#!/bin/bash
# Verify that the Ruff Format check step exists in the workflow file
rg -n "pixi run --environment dev format --check" .github/workflows/test.yml

Length of output: 133


Action Required: Confirm Intentional Non-Blocking Behavior of Ruff Format Step

The workflow file .github/workflows/test.yml (lines 30–33) runs the command:

- name: Ruff Format
  continue-on-error: true
  run: |
    pixi run --environment dev format --check

This configuration allows format check failures to pass without blocking the workflow. Please review whether this non-blocking behavior is intentional. If formatting issues should enforce strict code style compliance, consider removing continue-on-error: true so the workflow fails when issues are detected.

Copy link
Copy Markdown

@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)
.github/workflows/test.yml (3)

30-33: Ruff Format Command Improvement

The "Ruff Format" step uses the command:

pixi run --environment dev format --check || echo "Ruff Format failed" && false

While this logic will mark the step as failed on error, the combination of || and && may lead to ambiguity due to shell operator precedence. Consider grouping the error message and exit command, for example:

- pixi run --environment dev format --check || echo "Ruff Format failed" && false
+ pixi run --environment dev format --check || { echo "Ruff Format failed"; exit 1; }

This ensures the step fails clearly when the format check does not pass.


34-37: Ruff Lint Command Enhancement

The "Ruff lint" step runs:

pixi run --environment dev lint --diff || echo "Ruff lint failed" && false

For clarity and to avoid unexpected behavior due to operator precedence, consider grouping the error-handling commands similarly:

- pixi run --environment dev lint --diff || echo "Ruff lint failed" && false
+ pixi run --environment dev lint --diff || { echo "Ruff lint failed"; exit 1; }

This change will ensure the step fails cleanly if linting issues are present.


38-41: Type-Check (Mypy) Command Improvement

The type-check step executes:

pixi run --environment dev type-check || echo "Mypy failed" && false

To avoid potential pitfalls with shell operator precedence, it is advisable to group the failure message and exit as follows:

- pixi run --environment dev type-check || echo "Mypy failed" && false
+ pixi run --environment dev type-check || { echo "Mypy failed"; exit 1; }

This adjustment clarifies step failure on type-check errors.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 71b4947 and 36522db.

📒 Files selected for processing (1)
  • .github/workflows/test.yml (1 hunks)
🔇 Additional comments (7)
.github/workflows/test.yml (7)

10-15: Permissions Block Updated

The workflow now explicitly specifies permissions (contents: read, checks: write, issues: write, pull-requests: write) for the job. This clear declaration helps enforce proper access control during job execution.


17-19: Job Renaming to Quality-Control

The job formerly associated with formatting has been renamed to "quality-control." Ensure that any associated documentation or downstream dependencies are updated to reflect this new job name.


20-22: Checkout Step Confirmation

The checkout step uses the standard actions/checkout@v4 action. This step remains unchanged functionally and is correctly set up.


23-29: Pixi Installation Step Added

A new step to install Pixi is introduced using prefix-dev/setup-pixi@v0.8.3 with parameters:

  • Environment set to dev
  • Pixi version specified as v0.42.1
  • Caching enabled

This configuration appears consistent with the transition from Poetry to Pixi. Verify that these version numbers and options meet your CI requirements.


42-44: Collect QC Step Added

A new step titled "Collect QC" has been added, which echoes a success message when all prior quality control checks pass. This provides a clear indicator in the build logs that QC has been met.


50-56: Pixi Installation in Testing Job

The testing job now includes an "Install Pixi" step similar to the one in quality-control. It uses the same setup (prefix-dev/setup-pixi@v0.8.3) with consistent parameters (environment: dev, pixi-version: v0.42.1, cache: true). This consistency helps ensure that both testing and quality-control environments are aligned.


57-59: Run Tests Command Update

The testing job now executes tests with:

pixi run --environment dev test --show-capture=all -s -vv

This verbose command provides detailed test output, which is useful for debugging. Confirm that the verbosity level (-s -vv) meets your team's needs.

@johanneskoester johanneskoester merged commit a365379 into snakemake:main Mar 14, 2025
4 checks passed
@jjjermiah jjjermiah deleted the jjjermiah/setup-pixi branch March 17, 2025 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants