-
Notifications
You must be signed in to change notification settings - Fork 1
fix: adapt tests to API changes #19
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
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughConverted two abstract methods to async coroutines (PinnableEnvBase.pin, CacheableEnvBase.cache_assets), updated tests to await them, replaced archive-based tests with caching/pinning, and refactored test environment construction to use explicit keyword arguments and new directories. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Tester
participant Tests
participant Env as Env (Cacheable / Pinnable)
Tester->>Tests: run tests
alt Env supports caching
Tests->>+Env: await cache_assets()
Env-->>-Tests: assets cached
end
alt Env supports pinning
Tests->>+Env: await pin()
Env-->>-Tests: pinned
end
Tests->>+Env: deploy()
Env-->>-Tests: deployed
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
✨ 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: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
snakemake_interface_software_deployment_plugins/tests.py (1)
4-4
: Fix CI: remove unused import 'tempfile'Ruff flags this as F401. Safe to delete.
Apply:
-from copy import deepcopy -import tempfile +from copy import deepcopy
📜 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
(3 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 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.
Files:
snakemake_interface_software_deployment_plugins/__init__.py
snakemake_interface_software_deployment_plugins/tests.py
🧠 Learnings (1)
📚 Learning: 2025-09-11T11:26:53.399Z
Learnt from: johanneskoester
PR: snakemake/snakemake-interface-software-deployment-plugins#18
File: snakemake_interface_software_deployment_plugins/__init__.py:278-282
Timestamp: 2025-09-11T11:26:53.399Z
Learning: In snakemake_interface_software_deployment_plugins, the cache_path property in CacheableEnvBase intentionally returns only self._cache_prefix without appending the environment hash, as the cache is meant to be shared across environments for efficiency.
Applied to files:
snakemake_interface_software_deployment_plugins/tests.py
🧬 Code graph analysis (1)
snakemake_interface_software_deployment_plugins/tests.py (1)
snakemake_interface_software_deployment_plugins/__init__.py (7)
CacheableEnvBase
(268-297)DeployableEnvBase
(300-360)EnvBase
(126-241)EnvSpecBase
(34-123)PinnableEnvBase
(244-265)cache_assets
(272-276)pin
(250-255)
🪛 GitHub Actions: CI
snakemake_interface_software_deployment_plugins/tests.py
[error] 4-4: Ruff check failed: Unused import 'tempfile' in tests.py (F401). Remove unused import. 2 fixable with '--fix'.
[error] 11-11: Ruff check failed: Unused import 'ArchiveableEnvBase' imported but unused (F401). Remove unused import. 2 fixable with '--fix'.
🔇 Additional comments (3)
snakemake_interface_software_deployment_plugins/__init__.py (2)
250-255
: Async-ify pin(): API change looks goodSwitching
PinnableEnvBase.pin()
toasync
aligns it with other async operations (e.g., deploy). Tests already await it. No further changes needed here.
272-276
: Async-ify cache_assets(): API change looks goodMaking
CacheableEnvBase.cache_assets()
async is consistent withget_cache_assets()
and the new test usage. Good move.snakemake_interface_software_deployment_plugins/tests.py (1)
134-142
: Env construction via explicit keywords LGTMPassing
deployment_prefix
,cache_prefix
, andpinfile_prefix
explicitly is clear and future-proof.
🤖 I have created a release *beep* *boop* --- ## [0.7.1](v0.7.0...v0.7.1) (2025-09-12) ### Bug Fixes * adapt tests to API changes ([#19](#19)) ([3f37e5f](3f37e5f)) --- 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
Refactor
Tests