record git commit when running
This commit is contained in:
parent
95dc6b71d5
commit
20dd40d50c
@ -10,8 +10,11 @@ from experiments import EXPERIMENTS
|
|||||||
from topos import TOPO_CONFIGS, TOPOS
|
from topos import TOPO_CONFIGS, TOPOS
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
import subprocess
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
def get_git_revision_short_hash():
|
||||||
|
return subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).decode("unicode_escape").strip()
|
||||||
|
|
||||||
class Runner(object):
|
class Runner(object):
|
||||||
"""
|
"""
|
||||||
@ -22,6 +25,7 @@ class Runner(object):
|
|||||||
All the operations are done when calling the constructor.
|
All the operations are done when calling the constructor.
|
||||||
"""
|
"""
|
||||||
def __init__(self, builder_type, topo_parameter_file, experiment_parameter_file):
|
def __init__(self, builder_type, topo_parameter_file, experiment_parameter_file):
|
||||||
|
logging.info("Minitopo version {}".format(get_git_revision_short_hash()))
|
||||||
self.topo_parameter = TopoParameter(topo_parameter_file)
|
self.topo_parameter = TopoParameter(topo_parameter_file)
|
||||||
self.set_builder(builder_type)
|
self.set_builder(builder_type)
|
||||||
self.apply_topo()
|
self.apply_topo()
|
||||||
|
Loading…
Reference in New Issue
Block a user