Migrate plugin Python package management from pip3 to uv#2902
Conversation
…env to create the plugin venv and --python to target it directly without requiring shell activation. - Set UV_CACHE_DIR to /gems/uv/ so the runtime uv cache persists on the gems volume across container restarts.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2902 +/- ##
==========================================
- Coverage 78.29% 78.29% -0.01%
==========================================
Files 673 673
Lines 55130 55130
Branches 728 728
==========================================
- Hits 43164 43163 -1
- Misses 11888 11889 +1
Partials 78 78
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jmthomas
left a comment
There was a problem hiding this comment.
You make a good point. We'll have to think about the UI implications of listing the dependencies for each plugin rather than in a huge generic list.
Something like in admin console // Before
{
"ruby": ["activesupport-7.0.0.gem"],
"python": ["numpy-1.24.0", "pandas-2.0.1"]
}
// After
{
"ruby": ["activesupport-7.0.0.gem"],
"python": {
"openc3-cosmos-demo": ["numpy-1.24.0", "pandas-2.0.1"],
"my-custom-plugin": ["requests-2.31.0"]
}
} |



${PYTHONUSERBASE}Known behavior change: Plugin Python packages that are already present in the base openc3 venv (e.g.numpy) will no longer appear in Admin Console → Packages after plugin installation.uv pipis smarter thanpip3about deduplication and skips installing packages that are already satisfied, so nothing gets written to$PYTHONUSERBASE. The packages are still fully accessible to plugin scripts viaOPENC3_PYTHON_BIN. This will be properly addressed in the upcoming per-plugin venv refactor.