MCPcopy Create free account
hub / github.com/apache/devlake / _mk_context

Method _mk_context

backend/python/pydevlake/pydevlake/ipc.py:116–125  ·  view source on GitHub ↗
(self, data: dict)

Source from the content-addressed store, hash-verified

114 yield from self._plugin.make_remote_scopes(c, group_id)
115
116 def _mk_context(self, data: dict):
117 db_url = data['db_url']
118 scope_dict = data['scope']
119 scope = self._plugin.tool_scope_type(**scope_dict)
120 connection_dict = data['connection']
121 connection = self._plugin.connection_type(**connection_dict)
122 scope_config_dict = data.get('scope_config') or {}
123 scope_config = self._plugin.scope_config_type(**scope_config_dict)
124 options = data.get('options', {})
125 return Context(create_db_engine(db_url), connection, scope, scope_config, options)
126
127def create_db_engine(db_url) -> Engine:
128 # SQLAlchemy doesn't understand postgres:// scheme

Callers 3

collectMethod · 0.95
extractMethod · 0.95
convertMethod · 0.95

Calls 6

ContextClass · 0.90
create_db_engineFunction · 0.85
getMethod · 0.80
tool_scope_typeMethod · 0.45
connection_typeMethod · 0.45
scope_config_typeMethod · 0.45

Tested by

no test coverage detected