Skip to content

fix: apply modify func on all attributes, not only in case of source path attributes - #62

Merged
johanneskoester merged 3 commits into
mainfrom
fix/source-path-modification-all-attributes
Aug 5, 2026
Merged

fix: apply modify func on all attributes, not only in case of source path attributes#62
johanneskoester merged 3 commits into
mainfrom
fix/source-path-modification-all-attributes

Conversation

@johanneskoester

@johanneskoester johanneskoester commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Improved environment specification handling when applying attribute-based modifications.
    • Preserved original specifications when no attributes require changes.
    • Ensured nested fallback and scoped specifications are processed consistently.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@johanneskoester, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 42 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 93d72c5e-a19f-4fd0-9fc8-b16a60665aa6

📥 Commits

Reviewing files that changed from the base of the PR and between 3ae9389 and b7cae69.

📒 Files selected for processing (1)
  • snakemake_interface_software_deployment_plugins/__init__.py
📝 Walkthrough

Walkthrough

EnvSpecBase._modify_attributes now selects the requested attributes before copying. It preserves unchanged objects and recursively processes nested within and fallback specifications when modifications exist.

Changes

Environment specification updates

Layer / File(s) Summary
Attribute selection and conditional copying
snakemake_interface_software_deployment_plugins/__init__.py
_modify_attributes now copies the specification only when selected attributes exist. It no longer relies on has_source_paths() for this decision.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes applying the modification function to all attributes instead of only source path attributes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/source-path-modification-all-attributes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@snakemake_interface_software_deployment_plugins/__init__.py`:
- Around line 129-135: The attribute-copying logic around self_or_copied must
also copy the parent when a nested within or fallback specification is modified,
even if the current attributes list is empty. Update the relevant
nested-replacement flow to detect descendant changes and preserve the original
parent unchanged, then add regression coverage for a parent with no local
selected attributes and a matching nested within or fallback.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1b2f7669-acce-432d-a47c-766698308b93

📥 Commits

Reviewing files that changed from the base of the PR and between 74eb072 and 3ae9389.

📒 Files selected for processing (1)
  • snakemake_interface_software_deployment_plugins/__init__.py

Comment thread snakemake_interface_software_deployment_plugins/__init__.py
@johanneskoester
johanneskoester merged commit fa1971d into main Aug 5, 2026
5 checks passed
@johanneskoester
johanneskoester deleted the fix/source-path-modification-all-attributes branch August 5, 2026 07:33
johanneskoester pushed a commit that referenced this pull request Aug 5, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.18.5](v0.18.4...v0.18.5)
(2026-08-05)


### Bug Fixes

* apply modify func on all attributes, not only in case of source path
attributes
([#62](#62))
([fa1971d](fa1971d))
* close temp file after creation
([9fa7730](9fa7730))
* do not require spec equality if env hashes are the same
([7ae9c5d](7ae9c5d))

---
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: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant