MCPcopy Create free account
hub / github.com/comaps/comaps / __init__

Method __init__

tools/python/routing/src/utils.py:85–101  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

83
84class Omim():
85 def __init__(self):
86 config_ini = ConfigINI('etc/paths.ini')
87
88 self.omim_path = config_ini.read_value_by_path(path=['PATHS', 'OmimPath'])
89 self.data_path = config_ini.read_value_by_path(path=['PATHS', 'DataPath'])
90 self.build_dir = config_ini.read_value_by_path(path=['PATHS', 'BuildDir'])
91 self.cpu_count = cpu_count()
92
93 repo = Repo(self.omim_path)
94 self.branch = repo.active_branch.name
95 self.hash = repo.head.object.hexsha
96
97 self.init_branch = self.branch
98 self.init_hash = self.hash
99
100 self.cur_time_string = self._pretty_time_string(dt=datetime.now())
101 self.cmake_cmd = get_cmake_cmd()
102
103 @staticmethod
104 def _pretty_time_string(*, dt):

Callers

nothing calls this directly

Calls 5

read_value_by_pathMethod · 0.95
_pretty_time_stringMethod · 0.95
ConfigINIClass · 0.85
cpu_countFunction · 0.85
get_cmake_cmdFunction · 0.85

Tested by

no test coverage detected