update mongodb config
This commit is contained in:
@ -13,14 +13,8 @@ data_dir: data/minimal # Directory containing test data
|
||||
mongodb:
|
||||
database: summarizer
|
||||
collections:
|
||||
docs:
|
||||
data_file: docs.json # Relative to data_dir
|
||||
required_count: 1 # Minimum number of documents required
|
||||
summaries:
|
||||
data_file: summaries.json
|
||||
required_count: 1
|
||||
systemprompts:
|
||||
data_file: prompts.json
|
||||
documentations:
|
||||
data_file: documentations.json
|
||||
required_count: 1
|
||||
audits:
|
||||
required_count: 0 # No data file, just needs to exist
|
||||
|
@ -1,10 +0,0 @@
|
||||
[
|
||||
{
|
||||
"taskId": "62n2aAVVV42rtt53wxieotTdnKpTRjiChsHYdSxHDhAZ",
|
||||
"content": "This is a test document that needs to be summarized. It contains multiple sentences and paragraphs to test the summarization functionality. The document discusses various topics and should be processed by the workers to generate a concise summary.",
|
||||
"metadata": {
|
||||
"source": "test",
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
]
|
8
worker/orca-agent/tests/data/minimal/documentations.json
Normal file
8
worker/orca-agent/tests/data/minimal/documentations.json
Normal file
@ -0,0 +1,8 @@
|
||||
[
|
||||
{
|
||||
"repoOwner": "labrocadabro",
|
||||
"repoName": "ct-clone",
|
||||
"swarmBountyId": "67ef132f2272992e69a8478c",
|
||||
"status": "initialized"
|
||||
}
|
||||
]
|
@ -1,7 +0,0 @@
|
||||
[
|
||||
{
|
||||
"taskId": "62n2aAVVV42rtt53wxieotTdnKpTRjiChsHYdSxHDhAZ",
|
||||
"prompt": "Please provide a concise summary of the following document, focusing on the main points and key information.",
|
||||
"type": "summarization"
|
||||
}
|
||||
]
|
@ -1,10 +0,0 @@
|
||||
[
|
||||
{
|
||||
"taskId": "62n2aAVVV42rtt53wxieotTdnKpTRjiChsHYdSxHDhAZ",
|
||||
"summary": "Test document containing multiple sentences for summarization testing.",
|
||||
"metadata": {
|
||||
"source": "test",
|
||||
"type": "summary"
|
||||
}
|
||||
}
|
||||
]
|
@ -4,7 +4,6 @@ from pathlib import Path
|
||||
from prometheus_test import TestRunner
|
||||
import dotenv
|
||||
import argparse
|
||||
import uuid
|
||||
|
||||
|
||||
dotenv.load_dotenv()
|
||||
@ -20,26 +19,6 @@ def parse_args():
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def add_uuids(db):
|
||||
"""Post-load callback to process MongoDB data after JSON import"""
|
||||
# Process docs collection
|
||||
docs = list(db.docs.find({"taskId": runner.config.task_id}))
|
||||
for doc in docs:
|
||||
if "uuid" not in doc:
|
||||
doc["uuid"] = str(uuid.uuid4())
|
||||
db.docs.replace_one({"_id": doc["_id"]}, doc)
|
||||
|
||||
# Process summaries collection
|
||||
summaries = list(db.summaries.find({"taskId": runner.config.task_id}))
|
||||
for summary in summaries:
|
||||
if "uuid" not in summary:
|
||||
summary["uuid"] = str(uuid.uuid4())
|
||||
if "docUuid" not in summary and docs:
|
||||
# Link to first doc for simplicity
|
||||
summary["docUuid"] = docs[0]["uuid"]
|
||||
db.summaries.replace_one({"_id": summary["_id"]}, summary)
|
||||
|
||||
|
||||
# Global reference to the test runner
|
||||
runner = None
|
||||
|
||||
@ -56,7 +35,6 @@ def main():
|
||||
runner = TestRunner(
|
||||
steps=steps,
|
||||
config_file=base_dir / "config.yaml",
|
||||
config_overrides={"post_load_callback": add_uuids},
|
||||
)
|
||||
|
||||
# Run test sequence
|
||||
|
@ -1,15 +1,4 @@
|
||||
{
|
||||
"leader": {
|
||||
"env_vars": {
|
||||
"GITHUB_TOKEN": "LEADER_GITHUB_TOKEN",
|
||||
"GITHUB_USERNAME": "LEADER_GITHUB_USERNAME",
|
||||
"ANTHROPIC_API_KEY": "LEADER_ANTHROPIC_API_KEY"
|
||||
},
|
||||
"keypairs": {
|
||||
"staking": "LEADER_STAKING_KEYPAIR",
|
||||
"public": "LEADER_PUBLIC_KEYPAIR"
|
||||
}
|
||||
},
|
||||
"worker1": {
|
||||
"env_vars": {
|
||||
"GITHUB_TOKEN": "WORKER1_GITHUB_TOKEN",
|
||||
|
Reference in New Issue
Block a user