-
Notifications
You must be signed in to change notification settings - Fork 93
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
show and scan: add JSON option and metadata #2558
Conversation
As discussed off line, please make sure that:
|
@matthewrmshin I have just started playing around and I can in fact return the simplest non-pretty ('raw') JSON output with just 2 basic lines (plus a one-line change to prevent further printout)! if options.json_format:
print json.dumps(scan_many(args, options.comms_timeout), indent=4) Simplicity! The moral of the story: don't mess with (the) JSON. |
Whilst I am responding to feedback I am improving my 'cmp_json_ok()' method in the 'test_header' as currently it gives a horrible stderr output with unicode and single-quotes (invalid for JSON) such as |
(is this one ready for review again?) |
(I think it is hold pending fixes to my comments.) |
@hjoliver as Matt said, not yet. I should hopefully complete & commit this today - I will comment to let you know when I am ready for review. Thanks. |
(in progress, |
2d0e5f3
to
5cb878b
Compare
e1ab92d
to
023b689
Compare
@hjoliver @matthewrmshin - ready for re-review! To summarise my new amendments:
|
Further thought: I imagine should update the documentation to include the new |
I shouldn't think so, the command line help should suffice, the command reference section of the documentation (http://cylc.github.io/cylc/doc/cylc-user-guide.pdf#appendix.F) is auto-generated. |
Ah I see. That's useful! |
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.
Looks good, no problems found. Tests as working.
Supersede #2507. Close #2459.