This PR adds terminal size detection to qri apply. The width and height of the terminal is passed down to lib/ and eventually to transform/ and starlib/dataframe/, where it affects how DataFrames get stringified. Users of the http api can also send this same info via normal arguments, in order to match the correct size of whatever html element they are going to display upon.
The first commit refactors the automation orchestrator a bit, to make passing this info a bit easier. Some new nomenclature is introduced here: rather than Run for runs that commit and Apply for runs that do not commit, this change uses RunAndCommit and RunEphemeral. The idea is that apply as a piece of terminology was intended as a high level command to contrast with qri save. When deeper in the code base, with a different context, it isn't quite as obvious which of these is and isn't making a new commit, especially since those parts of the code are referring to Workflows which are being run in either case.
Some parts of this are missing functionality. In particular, qri save --apply is not handling terminal size information. That can be done in a follow-up PR, the groundwork laid here will make it much easier to implement.
Depends on https://github.com/qri-io/starlib/pull/146
This PR adds terminal size detection to
qri apply
. The width and height of the terminal is passed down tolib/
and eventually totransform/
andstarlib/dataframe/
, where it affects how DataFrames get stringified. Users of the http api can also send this same info via normal arguments, in order to match the correct size of whatever html element they are going to display upon.The first commit refactors the automation orchestrator a bit, to make passing this info a bit easier. Some new nomenclature is introduced here: rather than
Run
for runs that commit andApply
for runs that do not commit, this change usesRunAndCommit
andRunEphemeral
. The idea is thatapply
as a piece of terminology was intended as a high level command to contrast withqri save
. When deeper in the code base, with a different context, it isn't quite as obvious which of these is and isn't making a new commit, especially since those parts of the code are referring toWorkflows
which are beingrun
in either case.Some parts of this are missing functionality. In particular,
qri save --apply
is not handling terminal size information. That can be done in a follow-up PR, the groundwork laid here will make it much easier to implement.