Generate requirements files from pyproject.toml#7085
Generate requirements files from pyproject.toml#7085jarrodmillman merged 5 commits intoscikit-image:mainfrom
Conversation
|
Question: why is there a "default" extra? It repeats the same info in the dependencies. The script can easily be modified to generate this file too, if that extra were removed. |
|
Hey @mwtoews thanks for the suggestion! It seems useful to me to have the source of truth all originate from one place. Especially because it may make it easier to use comments in the pyproject.toml. Before I review, I am curious, did the previous discussion in numpydoc bring up any other pros or cons? The |
* Generate default.txt from [project.dependencies] * Remove [project.optional-dependencies.default] * Update requirements/README.md with new entries with default at top
Most of the discussion was from a superseded PR numpy/numpydoc#481 where I was aiming to use a dynamic tool-dependant feature of setuptools to read optional dependencies (rather than using a script and template approach). Ultimately, there are more strengths in having a single statically-analyzable pyproject.toml (complete with all dependencies), but some tools also need to As for the requirements/default.txt file, I have not problems with it. But in pyproject.toml it is duplicated. From pip's perspective |
lagru
left a comment
There was a problem hiding this comment.
Thanks for addressing my suggestions! I have only a minor one left.
Update the hooks name and make the trigger pattern a more specific, in case we include other tool scripts with a "generate" in their file name.
This PR is based on numpy/numpydoc#483 and scikit-image/scikit-image#7085, which make pyproject.toml a primary file without any template, and adds a pre-commit script to write requirements files. It doesn't really change anything, but I would like to keep everything consistent.
* Generate requirements files from pyproject.toml This PR is based on numpy/numpydoc#483 and scikit-image/scikit-image#7085, which make pyproject.toml a primary file without any template, and adds a pre-commit script to write requirements files. It doesn't really change anything, but I would like to keep everything consistent. * Cleanup formatting
* Generate requirements files from pyproject.toml This PR is based on numpy/numpydoc#483 and scikit-image/scikit-image#7085, which make pyproject.toml a primary file without any template, and adds a pre-commit script to write requirements files. It doesn't really change anything, but I would like to keep everything consistent. * Cleanup formatting
* Generate requirements files from pyproject.toml This PR is based on numpy/numpydoc#483 and scikit-image/scikit-image#7085, which make pyproject.toml a primary file without any template, and adds a pre-commit script to write requirements files. It doesn't really change anything, but I would like to keep everything consistent. * Cleanup formatting
* Generate requirements files from pyproject.toml This PR is based on numpy/numpydoc#483 and scikit-image/scikit-image#7085, which make pyproject.toml a primary file without any template, and adds a pre-commit script to write requirements files. It doesn't really change anything, but I would like to keep everything consistent. * Cleanup formatting
This PR is based on numpy/numpydoc#483 which makes
pyproject.tomla primary file without any template, and adds a pre-commit script to write requirements files. Some of the comments from the requirements files are moved topyproject.toml.