Skip to content

Consider inferring requirements from imports and venv #893

@nathanjmcdougall

Description

@nathanjmcdougall

Motivation
This is a bit of an ambitious one, but as a part of #241 I noticed that we are creating empty pyproject.toml if it doesn't already exist. But that seems unnecessary - we should be able to generate empty requirements.txt without creating an empty dependencies list.

But we can probably do better in this case; we can potentially infer requirements based on the project's imports. Of course, this could potentially be unreliable for cases where the import doesn't match the PyPI name (and potentially a security concern due to typosquatting on PyPI...) so I don't know if this is wise or not. Also should check if something off-the-shelf already exists.

Summary
Consider whether it makes sense to have something to infer requirements from imports and venv.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions