-
Notifications
You must be signed in to change notification settings - Fork 3
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
Can this generate pyproject.toml from requirements.txt or from import statements #141
Comments
Nice, thanks for checking this out! Any contributions you care to offer would be much appreciated. I think the use case you're describing of making a I'm sure it would be a handy thing to build as a separate tool though. There are definitely cases where people could use that. |
I seem to recall there was a tool that could analyse the Python Quick search reveals https://pypi.org/project/pip-module-scanner/ -- there looks to be an API one might be able to use to get a listing of packages/versions. Accuracy is a big question at this stage. There are a few ways to write an So lots of edge cases there that might trip things up, causing a dependency to be erroneously included or omitted. That said, this isn't a reason to throw away the idea, it could be quite useful to supply the basic project metadata on the command line, then use a tool like that above to figure out what dependencies should be put there. Hand-massaging might be needed at the end, but it may still save significant effort. |
@sjlongland @diazona i'll play with this repo a little and will look at the ''module-scanner' you mention. I might bookend the front of your repo with one that starts with [black] or [ruff] linters and 'requirements.txt'. Maybe I could call it "pyprojectoml_generator"? Then once those are created point the user to your repo for expansion, that way we can support your work and stay in scope. Users with a Python script, that just has import statements.
If I understand correctly, with the exception of step 6, I should this to be enough for me to code up a prototype of this in a week or two. "Scoped to support a broad array of brand new, advanced and supporting data migrating users to provide a path to better pyproject.toml files." |
I've been looking at building a tool that generates 'pyproject.toml' files from my python scripts and found this repo on Github.
What I'm looking for:
pip install <package name>
The text was updated successfully, but these errors were encountered: