Require requirements
Intent
Require a requirements file by default, do not provide one. This is partially an idea to see how others feel about it. I would argue that we actually should remove the pip freeze fallback entirely, honestly. Possibly replacing it with https://github.com/bndr/pipreqs (or we could pull in the go code that the publisher uses).
Resolves #538
Type of Change
- [ ] Bug Fix
- [ ] New Feature
- [x] Breaking Change
Approach
Mostly Claude, actually
Automated Tests
Changed
Checklist
Will do at some point:
- [ ] I have updated CHANGELOG.md to cover notable changes.
- [ ] I have updated all related GitHub issues to reflect their current state.
PR Preview Action v1.6.1 :---: |
:rocket: View preview athttps://posit-dev.github.io/rsconnect-python/pr-preview/pr-680/
|
Built to branch gh-pages at 2025-06-10 12:26 UTC.
Preview will be ready when the GitHub Pages deployment is complete.
☂️ Python Coverage
current status: ✅
Overall Coverage
| Lines | Covered | Coverage | Threshold | Status |
|---|---|---|---|---|
| 5113 | 3845 | 75% | 0% | 🟢 |
New Files
No new covered files...
Modified Files
| File | Coverage | Status |
|---|---|---|
| rsconnect/environment.py | 87% | 🟢 |
| rsconnect/subprocesses/inspect_environment.py | 87% | 🟢 |
| TOTAL | 87% | 🟢 |
updated for commit:
cbd2cf4by action🐍
I agree that making requirements.txt generation explicit instead of implicit is the correct direction.
pipreqs looks like a suitable replacement for pip freeze. Our workflow implicitly assumes that the virtual environment is isolated to the project. I don't think that is a reasonable assumption to make.