-
-
Notifications
You must be signed in to change notification settings - Fork 611
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
Add support for JSON output format #2085
base: main
Are you sure you want to change the base?
Conversation
Thanks! I think the output is looking great. Some things that may surprise in the current state:
They don't necessarily need "fixing." But it may be more common to want to generate the JSON without also writing the txt 🤷🏼 . Oh I think |
Thanks for the quick response!
Good point, switched to using booleans for several keys. About the list format for
Right, but as they are included for convenience so that the can directly be used to create a constraints file, I thought that wouldn't be a problem. Especially since the newline characters don't get translated to actual newlines.
I also thought so at the beginning, but then reverted the behaviour, as I think a common use case would be that a constraints file is generated for direct use and information about the constraints for further processing is collected. For other cases, it shouldn't be a big deal to add the
Good catch, thank you! I hacked something together (surely that can be improved) to parse the constructed output lines and get the parent requirements from them, since there is some logic in |
0847559
to
2f0b266
Compare
I did that now by merging the |
@AndydeCleyre JSON output is now written to a |
I don't know:
Either way could be surprising. Sorry I don't have a clear idea about this. |
69c0cb9
to
600795d
Compare
I've adapted this suggestion, as it seemed less complex to implement; but I think we need a new Python-wide standard for a |
Cc @woodruffw, would you like to test this? |
Yes, thanks for the ping! I'll try and set aside some testing time in the coming days. |
600795d
to
77c6d67
Compare
@woodruffw you said you wanted to test this? |
Would #2124 supersede this? |
Very WIP right now, I'll add (and fix) tests once everyone is satisfied with the implementation. Thus, I'd appreciate some feedback and suggestions.
Closes #1377.
Contributor checklist
Maintainer checklist
backwards incompatible
,feature
,enhancement
,deprecation
,bug
,dependency
,docs
orskip-changelog
as they determine changelog listing.