-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add source cache path attribute for mounting in e.g. containers #33
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
Conversation
📝 WalkthroughWalkthroughAdds a new source_cache parameter to EnvBase.init and stores it on the instance. Updates tests to create and pass a source_cache directory during environment setup. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
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. Comment |
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: 1
🧹 Nitpick comments (1)
snakemake_interface_software_deployment_plugins/__init__.py (1)
182-182: Consider adding documentation for the new parameter.While the implementation is correct, adding a docstring to the
__init__method or inline comment explaining thatsource_cacheis intended for mounting in containers (per the PR title) would improve maintainability.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
snakemake_interface_software_deployment_plugins/__init__.py(2 hunks)snakemake_interface_software_deployment_plugins/tests.py(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py
⚙️ CodeRabbit configuration file
**/*.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 theselfargument of methods.
Do not suggest type annotation of theclsargument of classmethods.
Do not suggest return type annotation if a function or method does not contain areturnstatement.
Files:
snakemake_interface_software_deployment_plugins/__init__.pysnakemake_interface_software_deployment_plugins/tests.py
🔇 Additional comments (2)
snakemake_interface_software_deployment_plugins/tests.py (2)
155-160: LGTM! Test setup correctly supports the new parameter.The source_cache directory setup follows the same pattern as other test directories (tempdir, deployment_prefix, etc.), ensuring consistency in the test infrastructure.
168-168: LGTM! Constructor call updated correctly.The source_cache parameter is passed in the correct position matching the updated
__init__signature.
| settings: Optional[SoftwareDeploymentSettingsBase], | ||
| shell_executable: ShellExecutable, | ||
| tempdir: Path, | ||
| source_cache: Path, |
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.
🧩 Analysis chain
Verify usage of source_cache across the codebase.
The parameter is added but not visibly used within this file. Confirm that plugins or downstream code will consume this attribute.
🏁 Script executed:
#!/bin/bash
# Search for usages of source_cache in the codebase
rg -n -C3 'source_cache' --type=pyLength of output: 3482
Remove or implement usage of source_cache.
The source_cache parameter is assigned but never referenced elsewhere. Remove it or add the intended functionality and document its purpose.
🤖 Prompt for AI Agents
In snakemake_interface_software_deployment_plugins/__init__.py around line 172,
the function signature includes a source_cache: Path parameter that is assigned
but never used; either remove the parameter from the signature and any callers
and update docs/tests accordingly, or implement its intended behavior by adding
logic to use source_cache for caching downloaded/processed source artifacts
(e.g., check for an existing cached file there, read from it when present, and
write newly fetched sources into it) and add a docstring comment explaining its
purpose and format; update unit tests and call sites to reflect the chosen
change.
🤖 I have created a release *beep* *boop* --- ## [0.9.0](v0.8.0...v0.9.0) (2025-10-01) ### Features * add source cache path attribute for mounting in e.g. containers ([#33](#33)) ([7962913](7962913)) * allow removal of pinfile ([#31](#31)) ([8e453b2](8e453b2)) --- 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>
Summary by CodeRabbit