rsconnect-python icon indicating copy to clipboard operation
rsconnect-python copied to clipboard

Require requirements

Open jonkeane opened this issue 7 months ago • 3 comments

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.

jonkeane avatar Jun 09 '25 16:06 jonkeane

PR Preview Action v1.6.1 :---: |

:rocket: View preview at
https://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.

github-actions[bot] avatar Jun 09 '25 16:06 github-actions[bot]

☂️ 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: cbd2cf4 by action🐍

github-actions[bot] avatar Jun 10 '25 12:06 github-actions[bot]

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.

tdstein avatar Jun 10 '25 14:06 tdstein