con / duct

A helper to run a command, capture stdout/stderr and details about running
MIT License
1 stars 1 forks source link

idea: collate output assisting filing issues (on github) with detailed information about execution #40

Open yarikoptic opened 3 weeks ago

yarikoptic commented 3 weeks ago

Idea just came up in the scope of repronim/containers and @asmacdo saying that monolythic script does not work on his laptop.

I feel like duct could be used to assist in filing issues! I envision doing smth like (relies on https://github.com/ReproNim/containers/pull/124 in this demo)

duct --file-issue scripts/run-README-example

in that repo and seeing an issue being generated with (hypothetical results; note that formatting is really just YAML similarly to how we do in datalad wtf)

duct details (stdout, stderr, stats) for: scripts/run-README-example ### overall stats - %cpu: - max: 230% - mean: 50% - memory (MB): - max: 1024 - mean: 512 - wall time (sec): 63 - cpu time (sec): 30 - exit code: 1 - #subprocesses: 122 ### stdout (x lines, ...) ```shell .... ``` ### stderr (x lines, ...) ``` .... ```

where it figures out repository automagically (or could be specified). but although sounds trivial and quick for a prototype additional aspects would make it not so, e.g. figuring out all kinds of details about filing issues etc, including additional info, e.g.

But I think it could be quite easy to implement/do as -D github-style-report -c|--clipboard (somewhat borrowed from datalad wtf) where it would at the end produce such report to screen and/or copy to clipboard so make it ready to be pasted into a report.

Other solutions in the same vein or may be could be integrated with

This could be of great help also to potentially "reproduce" issues/behaviors since it would be capturing desired