open-contracting / cardinal-rs

Measure red flags and procurement indicators using OCDS data
https://cardinal.readthedocs.io
MIT License
9 stars 3 forks source link

prepare: Consider changing stdout and stderr to mandatory options #44

Closed jpmckinney closed 1 year ago

jpmckinney commented 1 year ago

e.g. --output (-o) and --error (-e).

Presently, if a user doesn't use redirection (e.g. > prepared.json 2> issues.csv), then they get a mix of both in the console output.

Also, I think Windows users can have some challenges around redirection. Looks okay, actually.

For implementation, we'll probably want an intermediate buffer, that is then written to the output file at the end of the thread. Otherwise, we could have characters mixed across threads.

jpmckinney commented 1 year ago

Going to close as not planned, until we learn that users are in fact stumbling on redirection (I think the docs are clear about redirection, but we'll see).

jpmckinney commented 1 year ago

If we redirect error output, then feedback like non-existent files also gets redirected, so we need an option for at least issues output – and if we have one, we might as well have both for consistency.

Also, this means the (rare) warnings about invalid JSON won't be mixed in with the quality issues.

jpmckinney commented 1 year ago

Closed by 61d6b27cd3d93a123e5665ac0b75f1f9074b96c4