Changes to pixi files to facilitate development on Mac OSX#255
Conversation
|
Warning Review limit reached
More reviews will be available in 24 minutes and 41 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR updates ChangesPixi environment and dependency configuration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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.
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 `@pyproject.toml`:
- Line 88: get_pixi_env() currently returns "boltz" for
StructurePredictor.BOLTZ_1 and BOLTZ_2 but pyproject.toml defines the macOS
feature as "boltz-osx", so macOS runs fail; update get_pixi_env() to return the
platform-appropriate name (detect os via sys.platform or platform.machine) and
return "boltz-osx" on macOS/arm64 and "boltz" otherwise, and update related
user-facing install/error strings in src/sampleworks/utils/imports.py and
README.md to mention both names or show platform-specific instructions so
messages match the selected Pixi env. Ensure references to
StructurePredictor.BOLTZ_1 and BOLTZ_2 still map to the new logic.
🪄 Autofix (Beta)
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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9e037248-0297-4af1-8a8b-4454f3aed3fe
⛔ Files ignored due to path filters (1)
pixi.lockis excluded by!**/*.lock
📒 Files selected for processing (1)
pyproject.toml
| boltz = {features = ["boltz"]} | ||
| boltz-analysis = {features = ["boltz", "analysis"]} | ||
| boltz-dev = {features = ["boltz", "dev"]} | ||
| boltz-osx = {features = ["boltz-osx", "dev", "analysis"]} |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Search for platform detection or OS-specific environment selection logic.
# Search for platform detection patterns
rg -nP --type=py -C3 '\b(platform\.(system|machine)|sys\.platform|os\.name|osx|darwin|mac)\b' | head -50
# Search for environment name logic
rg -nP --type=py -C3 'def get_pixi_env'
# Check if boltz-osx is referenced anywhere in Python code
rg -nP --type=py -l 'boltz-osx'Repository: diff-use/sampleworks
Length of output: 1174
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Find references to boltz-osx and pixi install messaging
rg -n --hidden --glob '!*node_modules/*' -S 'boltz-osx' .
rg -n --hidden --glob '!*node_modules/*' -S 'pixi install -e ' .
# Show get_pixi_env and any related platform/env selection logic
rg -n --hidden --glob '!*node_modules/*' -S 'def get_pixi_env\b' run_grid_search.py
python_files=$(fd -t f -e py src . 2>/dev/null | wc -l || true)
echo "python_files_count=$python_files"
# Print the body of get_pixi_env with line numbers (approx)
python - <<'PY'
import itertools,sys,os,re
path='run_grid_search.py'
start=None
with open(path,'r',encoding='utf-8') as f:
for i,line in enumerate(f,1):
if re.match(r'\s*def get_pixi_env\s*\(', line):
start=i
break
if start is None:
print("get_pixi_env not found")
sys.exit(0)
end=start+60
with open(path,'r',encoding='utf-8') as f:
for i,line in enumerate(f,1):
if start-5 <= i <= end:
print(f"{i:6d}:{line.rstrip()}")
PY
# Print likely messaging block in src/sampleworks/utils/imports.py
if [ -f src/sampleworks/utils/imports.py ]; then
rg -n -S 'pixi install -e ' src/sampleworks/utils/imports.py
python - <<'PY'
import re
path='src/sampleworks/utils/imports.py'
with open(path,'r',encoding='utf-8') as f:
lines=list(f)
for idx,line in enumerate(lines,1):
if 'pixi install -e' in line:
s=max(1,idx-20); e=min(len(lines),idx+20)
for j in range(s,e+1):
print(f"{j:6d}:{lines[j-1].rstrip()}")
print("----")
PY
fiRepository: diff-use/sampleworks
Length of output: 17612
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Find references to boltz-osx and pixi install messaging
rg -n --hidden -S 'boltz-osx' . || true
rg -n --hidden -S 'pixi install -e ' . || true
# Show get_pixi_env and any related platform/env selection logic
rg -n -S 'def get_pixi_env\b' run_grid_search.py || true
# Print the body of get_pixi_env with line numbers (approx)
python - <<'PY'
import re,sys
path='run_grid_search.py'
try:
with open(path,'r',encoding='utf-8') as f:
lines=list(f)
except FileNotFoundError:
print("missing run_grid_search.py")
sys.exit(0)
start=None
for i,line in enumerate(lines,1):
if re.match(r'\s*def get_pixi_env\s*\(', line):
start=i; break
if start is None:
print("get_pixi_env not found")
sys.exit(0)
end=min(len(lines),start+80)
for j in range(start-5,end+1):
if 1<=j<=len(lines):
print(f"{j:6d}:{lines[j-1].rstrip()}")
PY
# Print likely messaging block in src/sampleworks/utils/imports.py
if [ -f src/sampleworks/utils/imports.py ]; then
rg -n -S 'pixi install -e ' src/sampleworks/utils/imports.py || true
python - <<'PY'
import re,sys
path='src/sampleworks/utils/imports.py'
with open(path,'r',encoding='utf-8') as f:
lines=list(f)
hits=[i for i,l in enumerate(lines,1) if 'pixi install -e' in l]
if not hits:
print("no pixi install -e in imports.py")
sys.exit(0)
for idx in hits:
s=max(1,idx-20); e=min(len(lines),idx+20)
print(f"### around line {idx}")
for j in range(s,e+1):
print(f"{j:6d}:{lines[j-1].rstrip()}")
PY
fi
# Print pyproject snippet for boltz-osx env
if [ -f pyproject.toml ]; then
rg -n -S 'boltz-osx\s*=' pyproject.toml || true
python - <<'PY'
path='pyproject.toml'
with open(path,'r',encoding='utf-8') as f:
lines=list(f)
for i,l in enumerate(lines,1):
if 'boltz-osx' in l:
s=max(1,i-5); e=min(len(lines),i+5)
for j in range(s,e+1):
print(f"{j:6d}:{lines[j-1].rstrip()}")
PY
fiRepository: diff-use/sampleworks
Length of output: 19733
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -S 'boltz-osx' . || true
rg -n -S 'pixi install -e ' . || true
rg -n -S 'def get_pixi_env\b' run_grid_search.py || true
python3 - <<'PY'
import re
path='run_grid_search.py'
with open(path,'r',encoding='utf-8') as f:
lines=list(f)
start=None
for i,line in enumerate(lines,1):
if re.match(r'\s*def get_pixi_env\s*\(', line):
start=i;break
print("get_pixi_env_start",start)
end=min(len(lines),start+80)
for j in range(start-5,end+1):
if 1<=j<=len(lines):
print(f"{j:6d}:{lines[j-1].rstrip()}")
PY
if [ -f src/sampleworks/utils/imports.py ]; then
rg -n -S 'pixi install -e ' src/sampleworks/utils/imports.py || true
python3 - <<'PY'
path='src/sampleworks/utils/imports.py'
with open(path,'r',encoding='utf-8') as f:
lines=list(f)
hits=[i for i,l in enumerate(lines,1) if 'pixi install -e' in l]
print("hits",hits)
for idx in hits:
s=max(1,idx-20); e=min(len(lines),idx+20)
print(f"### around {idx}")
for j in range(s,e+1):
print(f"{j:6d}:{lines[j-1].rstrip()}")
PY
fi
if [ -f pyproject.toml ]; then
rg -n -S 'boltz-osx\s*=' pyproject.toml || true
python3 - <<'PY'
path='pyproject.toml'
with open(path,'r',encoding='utf-8') as f:
lines=list(f)
for i,l in enumerate(lines,1):
if 'boltz-osx' in l:
s=max(1,i-5); e=min(len(lines),i+5)
for j in range(s,e+1):
print(f"{j:6d}:{lines[j-1].rstrip()}")
PY
fiRepository: diff-use/sampleworks
Length of output: 19761
Fix macOS Pixi env selection for Boltz grid search (boltz-osx vs boltz).
pyproject.tomldefinesboltzonly forlinux-64, but defines a separateboltz-osxforosx-arm64.run_grid_search.py:get_pixi_env()returns"boltz"forStructurePredictor.BOLTZ_1/StructurePredictor.BOLTZ_2, so macOS Boltz runs will try to use the wrong Pixi feature/env name.- User-facing install guidance is also wired to
"boltz"(e.g.,src/sampleworks/utils/imports.pydefault messages andREADME.md), with no mention ofboltz-osx.
Align get_pixi_env() and the install/error messaging with the macOS-specific feature group (either by adding OS detection, or by making the boltz feature resolve to the correct platform-specific dependencies).
🤖 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 `@pyproject.toml` at line 88, get_pixi_env() currently returns "boltz" for
StructurePredictor.BOLTZ_1 and BOLTZ_2 but pyproject.toml defines the macOS
feature as "boltz-osx", so macOS runs fail; update get_pixi_env() to return the
platform-appropriate name (detect os via sys.platform or platform.machine) and
return "boltz-osx" on macOS/arm64 and "boltz" otherwise, and update related
user-facing install/error strings in src/sampleworks/utils/imports.py and
README.md to mention both names or show platform-specific instructions so
messages match the selected Pixi env. Ensure references to
StructurePredictor.BOLTZ_1 and BOLTZ_2 still map to the new logic.
# Conflicts: # pixi.lock
5333093 to
363f0d3
Compare
These changes make it possible to install most environments on Mac OS X. To do this it changes the
[dependency-groups]to be actual[tool.pixi.feature.*], and created aboltz-osxfeature. For protenix in particular this prevents pixi from trying to install environments on platforms where they are not compatible.Summary by CodeRabbit