feat(template): add conda workspace - #209
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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.
🧹 Nitpick comments (1)
template/src/workspace.rs (1)
47-49: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winAdd a regression test for the conda rendering path.
The current tests cover
render, but notrender_conda. The registry resolves embedded templates by prefix. Verify that the builder createsreadme.pywith the suppliednameandversion. This catches missing asset registration or prefix mismatches. (raw.githubusercontent.com)Suggested regression test
+ #[test] + fn renders_conda_readme() { + let dir = tempfile::tempdir().unwrap(); + let out = dir.path().join("conda"); + WorkspaceTemplate::builder() + .name("My Workspace") + .slug("my-workspace") + .render_conda(&out) + .unwrap(); + let readme = std::fs::read_to_string(out.join("readme.py")).unwrap(); + assert!(readme.contains("# My Workspace v0.0.0")); + }Also applies to: 82-86
🤖 Prompt for 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. In `@template/src/workspace.rs` around lines 47 - 49, Add a regression test alongside the existing Workspace rendering tests that invokes Workspace::render_conda with a temporary output directory, then verifies readme.py exists and contains the supplied name and version. Keep the test focused on the conda_workspace registry prefix so missing asset registration or prefix mismatches are detected.
🤖 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.
Nitpick comments:
In `@template/src/workspace.rs`:
- Around line 47-49: Add a regression test alongside the existing Workspace
rendering tests that invokes Workspace::render_conda with a temporary output
directory, then verifies readme.py exists and contains the supplied name and
version. Keep the test focused on the conda_workspace registry prefix so missing
asset registration or prefix mismatches are detected.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 7c270e75-a275-4f83-9da9-f4e51708281b
📒 Files selected for processing (2)
template/assets/conda_workspace/readme.py.hbstemplate/src/workspace.rs
Summary by CodeRabbit