You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful if, in addition to the requirements.txt format, pip-compile also had the option of outputting the requirements and what it knows about each requirement in a standard format like json. This would give users much greater ability to create custom requirements.txt files, without having to rely on fragile parsing of pip-compile's requirements.txt output.
The structured data could include things like:
for each requirement:
the "via" values in a structured format
For example, if an annotation has an associated path, it can be included separately alongside as a relative path, and the base path can be included once at the top-level (see also Add an option to not include paths in annotations #1084).
whether the requirement is "safe" in the sense of --allow-unsafe. This would give users more control over how unsafe requirements should be handled.
whether the requirement is hashable or editable. This would let users e.g. split off non-hashable dependencies into a separate file that doesn't use hashes.
the annotation line(s) as constructed by pip-compile (for convenience, since these would also be constructible manually from other data)
the requirement line(s) as constructed by pip-compile (for convenience, if the user would like to include them as is)
This feature would give users a way to address a number of issues in this tracker, in the absence of a fix in pip-tools. Here is a partial list:
It would be useful if, in addition to the
requirements.txtformat,pip-compilealso had the option of outputting the requirements and what it knows about each requirement in a standard format like json. This would give users much greater ability to create customrequirements.txtfiles, without having to rely on fragile parsing ofpip-compile'srequirements.txtoutput.The structured data could include things like:
--generate-hashes), as well as distinguishing the "exact" hash (e.g. for Provide a way to limit to a single hash per requirement when generating hashes #1330)--allow-unsafe. This would give users more control over how unsafe requirements should be handled.pip-compile(for convenience, since these would also be constructible manually from other data)pip-compile(for convenience, if the user would like to include them as is)This feature would give users a way to address a number of issues in this tracker, in the absence of a fix in
pip-tools. Here is a partial list:--no-deps) for individual requirements #817 ("Allow to skip dependencies")