add support for requirements.txt

Open
#228 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
docker, python
Domain
devops

Research direction

Start by locating the Python Dockerfile generation entry point and the logic that assembles install commands. Use a repository-root requirements.txt as one input and an absent file as another. Done means dependencies are installed only when the file exists, and the step is skipped otherwise; run the relevant project tests to verify both cases.

Written by the indexing model from the issue text.

Description

enhancement

Is your feature request related to a problem? Please describe.
Make the python dockerfile run pip install requirements.txt if the file exists at the root

we could inline it with something like [ -f "/requirements.txt" ] && pip install requirements.txt so that it only runs if the file is there

Mention what platform you want to support the new feature
oss draft

Describe the solution you'd like
when a repo is supplied to draft with a requirements.txt, it should install them

when a repo is supplied without a requirements.txt, this step should be skipped

Describe alternatives you've considered
making a new prompt or separated dockerfile for "python_with_requirements"- but this seems like extra complexity and maintenance burden when we could just add it to the one dockerfile we already have

Additional context

Dominant language
Go
Stars
644
Forks
74
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/draft

All issues in Azure/draft

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.