-
Notifications
You must be signed in to change notification settings - Fork 32
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
Allow printing SCIP index as JSON #147
Conversation
Some overall thoughts:
|
--from value Path to SCIP index file (default: index.scip) | ||
--to value Path to output directory for snapshot files (default: scip-snapshot) | ||
--comment-syntax value Comment syntax to use for snapshot files (default: "//") | ||
--from value Path to SCIP index file (default: "index.scip") | ||
--help, -h show help (default: false) | ||
--project-root value Override project root in the SCIP file. For example, this can be helpful when the SCIP index was created inside a Docker image or created on another computer | ||
--strict If true, fail fast on errors (default: true) | ||
--to value Path to output directory for snapshot files (default: "scip-snapshot") |
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.
Q: Why is this PR changing these lines? I thought the earlier PR that verified the documentation should've fixed this... 🤔
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.
The tests only verify that the global CLI help text is valid, not for any of the subcommands :(
It won't be much of an issue to add extra checks in a separate PR.
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.
Could you remove the unrelated changes from this PR? I can submit a PR tomorrow making the test more robust and fix this.
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.
Could you remove the unrelated changes from this PR?
IMO, this is not a codebase with ridiculous velocity where unrelated changes are a problem - ongoing small improvements that aren't at odds with main purpose of the PR shouldn't be penalised by extra effort of reverting and resubmitting.
There are many small things that can be improved for which there is no plan and no dedicated effort - with a small number of contributors we should aim to fix things as we go.
You are free to follow up with a test for this (or I can do this) but updating and fixing small things in the docs should be a welcome addition to any PR.
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.
First of all, my comment was not a blocking one.
ongoing small improvements that aren't at odds with main purpose of the PR shouldn't be penalised by extra effort of reverting and resubmitting.
I'm not trying to "penalise" something here... Ideally, these would not be part of the same PR (or commit) anyways. Normal commit hygiene IMO dictates that you'd commit related stuff in a single commit and move unrelated commit into separate PRs before submitting PRs. Even it got bundled into the same PR, if it were in different commits, it'd be easy to revert and push.
That's regardless of codebase velocity etc. My point isn't about velocity, it's about completeness. With drive-by improvements that get mixed in with other PRs, it's less clear what still needs fixing vs what doesn't. E.g. here, if I hadn't flagged this, then the point about the test missing might not have gone unnoticed.
That said, I don't think it's a big deal to leave it in.
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.
It's a process worth discussing separately :) meanwhile, I added an issue so we don't forget: #152
I think an even better option would be to add a
The motivation wouls be to provide a machine readable and ubiqutous output format, something amenable to other CLI tools like w.r.t. stability, bar some variations in how to output missing fields, my understanding is that protobuf -> json conversion is unversal? So we can advertise it as stable.
Yeah, I agree here. Once this becomes |
urfave/cli doesn't support positional arguments (urfave/cli#1074) So the only form in which the command works is It's annoying, but an alternative would be to manually process the arguments, which IMO isn't worth it at this point. |
json
subcommand: print SCIP index as JSONThere 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.
It seems a little weird to me the CLI guidelines recommend separate --json
and --plain
flags rather than a single --format=(plain|json)
flag, but it's not a big deal.
Goals:
--json
flag toprint
commandStretch goals:
Fix (?) the testing commands as it seems they're not running on CI (i.e. CLI docs are out of date)Done in Fix tests that weren't running and have grown out of sync #148Test plan