Can this generate pyproject.toml from requirements.txt or from import statements #190
Replies: 3 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. |
Beta Was this translation helpful? Give feedback.
-
|
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. |
Beta Was this translation helpful? Give feedback.
-
|
@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." |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
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>Beta Was this translation helpful? Give feedback.
All reactions