Skip to content

Require requirements #680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Require requirements #680

wants to merge 2 commits into from

Conversation

jonkeane
Copy link
Collaborator

@jonkeane jonkeane commented Jun 9, 2025

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
  • 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 jonkeane requested review from amol- and tdstein June 9, 2025 16:00
Copy link

github-actions bot commented Jun 9, 2025

PR Preview Action v1.6.1

🚀 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.

@jonkeane jonkeane force-pushed the require_requirements branch from 61d8d73 to cbd2cf4 Compare June 10, 2025 12:30
Copy link

☂️ 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🐍

@tdstein
Copy link
Collaborator

tdstein commented Jun 10, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Require requirements.txt file
2 participants