update mongodb config

This commit is contained in:
Laura Abro
2025-04-24 12:28:54 -03:00
parent 5e6911d4f8
commit 0b0298e400
7 changed files with 10 additions and 68 deletions

View File

@ -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

View File

@ -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"
}
}
]

View File

@ -0,0 +1,8 @@
[
{
"repoOwner": "labrocadabro",
"repoName": "ct-clone",
"swarmBountyId": "67ef132f2272992e69a8478c",
"status": "initialized"
}
]

View File

@ -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"
}
]

View File

@ -1,10 +0,0 @@
[
{
"taskId": "62n2aAVVV42rtt53wxieotTdnKpTRjiChsHYdSxHDhAZ",
"summary": "Test document containing multiple sentences for summarization testing.",
"metadata": {
"source": "test",
"type": "summary"
}
}
]

View File

@ -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

View File

@ -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",