Skip to content

Commit deb22b3

Browse files
committed
Updated according to current config (storage_config and storage_schema)
1 parent 0333eb0 commit deb22b3

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

arxiv_kb/configs/deployment.json

+8-6
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
"module": {"name": "arxiv_kb"},
55
"node": {"ip": "localhost"},
66
"config": {
7-
"storage_type": "db",
8-
"path": "arxiv_kb",
9-
"schema": {
10-
"id": {"type": "INTEGER", "primary_key": true},
11-
"title": {"type": "TEXT"},
12-
"abstract": {"type": "TEXT"}
7+
"storage_config":{
8+
"storage_type": "db",
9+
"path": "arxiv_kb",
10+
"storage_schema": {
11+
"id": {"type": "INTEGER", "primary_key": true},
12+
"title": {"type": "TEXT"},
13+
"abstract": {"type": "TEXT"}
14+
}
1315
}
1416
}
1517
}

arxiv_kb/run.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ def __init__(self, deployment: Dict[str, Any]):
1717
self.deployment = deployment
1818
self.config = self.deployment.config
1919
self.storage_provider = StorageProvider(self.deployment.node)
20-
self.storage_type = self.config.storage_type
21-
self.table_name = self.config.path
22-
self.schema = self.config.schema
20+
self.storage_type = self.config.storage_config.storage_type
21+
self.table_name = self.config.storage_config.path
22+
self.schema = self.config.storage_config.storage_schema
2323

2424
async def init(self, *args, **kwargs):
2525
"""Initialize the knowledge base by creating the table"""
@@ -135,9 +135,9 @@ async def create(deployment: KBDeployment):
135135
Create the Arxiv Knowledge Base table
136136
"""
137137
storage_provider = StorageProvider(deployment.node)
138-
storage_type = deployment.config.storage_type
139-
table_name = deployment.config.path
140-
schema = {"schema": deployment.config.schema}
138+
storage_type = deployment.config.storage_config.storage_type
139+
table_name = deployment.config.storage_config.path
140+
schema = {"schema": deployment.config.storage_config.storage_schema}
141141

142142
logger.info(f"Creating {storage_type} at {table_name} with schema {schema}")
143143

0 commit comments

Comments
 (0)