Commit e25c927
committed
NF: SINGULARITY_CMD=shell to record (bash) history+result of interactive sessions
**Related**
This is a prototype for functionality which might be of interest
outside of this project, e.g. related:
- regular `datalad run` to record activities in the shell.
- [`run --interactive`](datalad/datalad#2158 (comment))
- [`run --shell`](datalad/datalad#2275)
so here I am "implementing" it, solely for containerized environments ATM,
via a "over the head" communication to the shim in environment variable
- `datalad run` for better record keeping, e.g.
- [saving stdout/err](datalad/datalad#3385)
so here I was not bothering to establish stdout/err capture but possibly
could and might
- `reproman login`, or even `execute` (with or without --trace) and may be `run`
where we could benefit from having an environment with a unified interface
for interactive sessions which would also establish the record of activities
- just a regular shell environment to make a clear record of commands which were ran
- might eventually absorb/meld with the "opinionated .bashrc"
proposed for the training curiculum:
ReproNim/module-reproducible-basics#26
which provides assistance/docs for more efficient use of cmdline
and establishes 'infinite bash history'.
**reproshell???**
So it feels to me like a motivation for some kind of a reproshell independent
project which would be
- usable indepdendently and easily installable/bindable (e.g. into a container)
- parametrizeable to be invoked from the shim here and/or by datalad or reproman
so could just take care about capturing all sidecar files into specified
locations
**Could benefit from**
- knowing more about "datalad (containers-)run" invocation
Implemented now within `singularity_run` shim, which could have benefited
from having additional information about how exactly it was `ran` and
also to instruct datalad run "upstairs" that there is now an additional file in
[extra_outputs](datalad/datalad#3094).
Hence there is datalad/datalad#3422
- [`datalad run` being able to 'cover' multiple commits](datalad/datalad#3265)
Interactivity creates ambiguity for `rerun` semantic:
- run record ATM would say "reinvoke interactive session" which might be
desireable on its own (e.g. to redo something manually in that original
container)
- but for "automated reproducibility" we do have all information (bash history
file, which is a list of commands to run) possibly recorded in another
commit, which is ATM is not associated with the "run" record
So may be with somehow [tagging run
commits](datalad/datalad#3371) it could be possible
to disambiguate/select specific run commits/records?
**Example**
**Additional possible features which might come here into a prototype**
- color info/error messages from the shim
- indicate being [reproman --trace](ReproNim/reproman#416
- provide 'reactive' PS1 to alert user when he/she leaves the initial directory
(thus the one outside of original dataset), possibly resulting in outputs which
would not be recorded1 parent 2b6f83c commit e25c927
1 file changed
+95
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
40 | 58 | | |
41 | 59 | | |
42 | 60 | | |
43 | 61 | | |
44 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
45 | 69 | | |
46 | 70 | | |
47 | 71 | | |
48 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
49 | 77 | | |
50 | 78 | | |
51 | 79 | | |
52 | 80 | | |
53 | 81 | | |
54 | 82 | | |
55 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
0 commit comments