partial #286 adding viewer for model on node side
Small branch with partial implementation of #286 (closed): adding viewing capability for a model on the node side.
- by default, use the
EDITOR
from system environment to view a model
./scripts/fedbiomed_run node config config-n1.ini --view-model
# then choose model number to view
- optionally overwrite the
EDITOR
variable
EDITOR=ooffice ./scripts/fedbiomed_run node config config-n1.ini --view-model
EDITOR=xemacs ./scripts/fedbiomed_run node config config-n1.ini --view-model
- if file cannot be viewed with the editor (eg: editor not specified, cannot be launched) then display the model source via the logger (maybe not a good idea, but this is what the CLI currently does for other interactive messages).
Notes:
- a temporary copy of file to view is made, so that the editor cannot modify the original model.
- code is not fully robustified (we mimicked what exists in
cli.py
andmodel_manager.py
, does not make sense to have 1 function more robust than the rest of the code)
Edited by VESIN Marc