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
Generate requirements files from pyproject.toml #7085
Generate requirements files from pyproject.toml #7085
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing all my concerns so quickly! I tweaked the hook configuration a bit in 8d8bf24 to make it more specific otherwise ready to merge IMO.
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.toml
a 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
.