-
Notifications
You must be signed in to change notification settings - Fork 13
chore: use Pixi for improved CI/CD and update project configuration #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: use Pixi for improved CI/CD and update project configuration #82
Conversation
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the 📝 WalkthroughWalkthroughThis pull request updates repository configuration and CI workflows. A new entry in the Changes
Sequence Diagram(s)sequenceDiagram
participant Repo as Repository
participant CI as GitHub Actions (Release)
participant PyPI as PyPI Service
Repo->>CI: Trigger Release Event
CI->>CI: Checkout Code (v4)
CI->>CI: Install Pixi (prefix-dev/[email protected])
CI->>CI: Build source and wheel distribution
CI->>CI: Check build with Pixi (pixi run --environment publish check-build)
CI->>PyPI: Publish distribution (pypa/gh-action-pypi-publish)
Note over CI,PyPI: Publish flow completed.
sequenceDiagram
participant Repo as Repository
participant QC as GitHub Actions (Quality-Control)
Repo->>QC: Trigger Quality Control Event
QC->>QC: Checkout Code (v4)
QC->>QC: Install Pixi
QC->>QC: Run Ruff Format & Ruff Lint checks
QC->>QC: Collect QC status message
Note over QC: Quality control job completed.
sequenceDiagram
participant Repo as Repository
participant Test as GitHub Actions (Testing)
Repo->>Test: Trigger Test Event
Test->>Test: Checkout Code (v4)
Test->>Test: Install Pixi
Test->>Test: Run tests (pixi run tests)
Note over Test: Testing job completed.
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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)
10-15
: Review Permissions Block: Verify Least PrivilegeThe newly added permissions section explicitly grants write access to checks, issues, and pull-requests along with read rights for contents. Please confirm that these permissions are strictly required for your workflow. If not, consider tightening them to adhere to the least-privilege principle.
40-43
: Commented Mypy Checks: Future Re-instatementThe mypy type-checking step has been commented out. It would be helpful to include a comment referencing the related PR (e.g., PR 59) or a TODO note so that the rationale and future plan are clear to anyone revisiting this workflow.
44-46
: Collect QC Step: Placeholder or Final Intent?The "Collect QC" step currently echoes a generic message. If this is intended merely as a placeholder, it would be useful to add a TODO or further documentation. Alternatively, consider capturing and summarizing actual QC artifacts if that fits your CI/CD goals.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
pixi.lock
is excluded by!**/*.lock
pyproject.toml
is excluded by!pyproject.toml
📒 Files selected for processing (5)
.gitattributes
(1 hunks).github/workflows/release-please.yml
(1 hunks).github/workflows/test.yml
(1 hunks).gitignore
(1 hunks)snakemake_interface_executor_plugins/executors/base.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 theself
argument of methods.
Do not suggest type annotation of thecls
argument of classmethods.
Do not suggest return type annotation if a function or method does not contain areturn
statement.
snakemake_interface_executor_plugins/executors/base.py
🔇 Additional comments (15)
.gitignore (1)
162-165
: Nice additions to support Pixi integrationThese changes appropriately extend the gitignore file to handle Pixi environments and Python package metadata, which aligns well with the PR objective of setting up Pixi for improved CI/CD.
snakemake_interface_executor_plugins/executors/base.py (1)
49-50
: Clean formatting improvementThe conditional has been split across multiple lines, improving readability without changing functionality. This aligns with the PR description mentioning that changes to
base.py
are solely formatting changes..gitattributes (1)
1-2
: Good configuration for Pixi lock fileThis is a well-configured Git attributes entry that follows best practices for lock files:
- Treating it as binary prevents merge conflicts
- Setting language to YAML ensures proper syntax highlighting
- Marking it as generated excludes it from language statistics and diffs
This supports the Pixi integration objective of the PR.
.github/workflows/release-please.yml (5)
20-20
: More descriptive job nameRenaming from "publish" to "publish-pypi" makes the job's purpose more specific and clear.
25-27
: Good practice to update checkout actionUpdating from v3 to v4 ensures you're using the latest features and security fixes.
28-32
: Clean Pixi setup implementationUsing the official Pixi setup action with specific environment and version is a good approach for CI reliability.
34-37
: Good migration from Poetry to Pixi for build stepThe build command has been appropriately updated to use Pixi, supporting the overall migration objective.
39-40
: Improved approach for PyPI publishingUsing the official PyPA GitHub Action for publishing is an improvement over direct Poetry commands - it's purpose-built for this task and maintained by the Python Packaging Authority.
.github/workflows/test.yml (7)
20-22
: Checkout Action Upgrade: Confirm CompatibilityThe workflow now uses
actions/checkout@v4
, which is a good update and aligns with modern practices. Please verify that this upgrade is compatible with the rest of your workflow steps (especially caching if applicable).
23-29
: Pixi Installation Step: Configuration CheckThis step installs Pixi using the
prefix-dev/[email protected]
action with environment set todev
, pixi-versionv0.42.1
, and caching enabled. Ensure that these parameters correctly reflect your desired environment and versioning.
30-34
: Ruff Format Step: Consistency with Pixi UsageThe formatting check now invokes
pixi run --environment dev format --check
with an unconditional execution (if: always()
). This aligns well with the switch from Poetry. Please confirm that this command reliably fails the workflow if formatting issues are present.
35-39
: Ruff Lint Step: Linting via PixiUpdating this step to use
pixi run --environment dev lint --diff
is a good move. Verify that linting output is clear and that any issues cause the job to fail as expected.
50-51
: Testing Job – Checkout Step: Consistency CheckThe testing job also uses
actions/checkout@v4
, which maintains consistency across jobs. Ensure that any repository state needed for tests is properly captured after checkout.
52-58
: Testing Job – Install Pixi: Consistent Environment SetupThis step mirrors the Pixi installation in the quality-control job, ensuring the test environment is identical. Confirm that the same parameters (environment
dev
, versionv0.42.1
, and caching) are suitable for test execution as well.
59-61
: Run Tests Command: Verify Verbosity and OutcomeThe final testing step now runs
pixi run --environment dev test --show-capture=all -s -vv
. Ensure that these flags provide the intended level of verbosity and capture, and that the test runner integrates smoothly with your reporting mechanism.
There was a problem hiding this 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)
43-44
: Quality Control Summary Step
The "Collect QC" step simply echoes that all quality control checks have passed. Consider adding conditional logic to display this message only if all previous steps have succeeded, to more accurately reflect the state of the workflow.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pyproject.toml
is excluded by!pyproject.toml
📒 Files selected for processing (2)
.github/workflows/test.yml
(1 hunks).gitignore
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- .gitignore
🔇 Additional comments (10)
.github/workflows/test.yml (10)
10-15
: Explicit Permissions Configuration Added
The new permissions block explicitly defines access scopes for contents, checks, issues, and pull-requests. This improves security by enforcing least privilege. Please double-check that these permissions align with your overall project and security policies.
17-17
: Renamed Job Improves Clarity
Renaming the job from a previous identifier (likely "formatting") to "quality-control" clearly communicates its role in the workflow. Ensure that any downstream dependencies or documentation are updated accordingly.
20-21
: Updated Checkout Action Version
Usingactions/checkout@v4
ensures the workflow benefits from the latest fixes and features. Confirm that this version is compatible with other workflow steps and tools used in the project.
23-28
: Integrate Pixi Installation Step
The newly added step installs Pixi usingprefix-dev/[email protected]
with the specified version (v0.42.1
) and environment (dev
). This change replaces previous Poetry-based dependency management. Verify that these settings fulfill your CI/CD requirements and match the target environment expectations.
29-32
: Ruff Format Check Using Pixi
Transitioning the formatting check to use Pixi (withpixi run --environment dev format --check
) is a good modernization step. Theif: always()
directive ensures this check runs regardless of previous step outcomes.
34-37
: Ruff Lint Step Updated
The linting command is now executed via Pixi with the commandpixi run --environment dev lint --diff
and the appropriate condition. This aligns with the overall move from Poetry to Pixi.
38-42
: Mypy Type-Check Temporarily Commented Out
Commenting out the Mypy step is appropriate given the referenced pending type issues (as noted in PR #59). Remember to revisit and re-enable this step after type errors have been resolved.
49-50
: Consistent Checkout in Testing Job
The testing job also utilisesactions/checkout@v4
, ensuring consistency between CI jobs. This is a good practice for aligning workspace setup steps.
51-56
: Replicated Pixi Installation in Testing Job
Re-adding the Pixi installation step in the testing job ensures that both quality control and testing environments are set up identically. Confirm that the parameters match those used in the quality control job to avoid environment discrepancies.
57-58
: Updated Test Runner Command
The testing step now executes tests using Pixi with enhanced verbosity and output capture (--show-capture=all -s -vv
). Verify that these flags provide the desired level of detail for debugging and that they are documented for team members.
Thanks a lot! |
similar to snakemake/snakemake-interface-common#58
This PR: Setup pixi and workspace for now.
Future PRs: Iterate over type issues after the the interface-common mypy issues are addressed
type-check
step in the GHA will be uncommented once the type errors are fixedNote: the modified
base.py
file is just formatSummary by CodeRabbit
Chores
.gitignore
file to exclude Pixi-related files and directories.Tests