From 0b0298e4003459260906061ccc2f26a444b67b7e Mon Sep 17 00:00:00 2001 From: Laura Abro Date: Thu, 24 Apr 2025 12:28:54 -0300 Subject: [PATCH] update mongodb config --- worker/orca-agent/tests/config.yaml | 10 ++------- .../orca-agent/tests/data/minimal/docs.json | 10 --------- .../tests/data/minimal/documentations.json | 8 +++++++ .../tests/data/minimal/prompts.json | 7 ------ .../tests/data/minimal/summaries.json | 10 --------- worker/orca-agent/tests/e2e.py | 22 ------------------- worker/orca-agent/tests/workers.json | 11 ---------- 7 files changed, 10 insertions(+), 68 deletions(-) delete mode 100644 worker/orca-agent/tests/data/minimal/docs.json create mode 100644 worker/orca-agent/tests/data/minimal/documentations.json delete mode 100644 worker/orca-agent/tests/data/minimal/prompts.json delete mode 100644 worker/orca-agent/tests/data/minimal/summaries.json diff --git a/worker/orca-agent/tests/config.yaml b/worker/orca-agent/tests/config.yaml index cbeaf8c..056de41 100644 --- a/worker/orca-agent/tests/config.yaml +++ b/worker/orca-agent/tests/config.yaml @@ -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 diff --git a/worker/orca-agent/tests/data/minimal/docs.json b/worker/orca-agent/tests/data/minimal/docs.json deleted file mode 100644 index 0432f26..0000000 --- a/worker/orca-agent/tests/data/minimal/docs.json +++ /dev/null @@ -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" - } - } -] diff --git a/worker/orca-agent/tests/data/minimal/documentations.json b/worker/orca-agent/tests/data/minimal/documentations.json new file mode 100644 index 0000000..d825fe2 --- /dev/null +++ b/worker/orca-agent/tests/data/minimal/documentations.json @@ -0,0 +1,8 @@ +[ + { + "repoOwner": "labrocadabro", + "repoName": "ct-clone", + "swarmBountyId": "67ef132f2272992e69a8478c", + "status": "initialized" + } +] diff --git a/worker/orca-agent/tests/data/minimal/prompts.json b/worker/orca-agent/tests/data/minimal/prompts.json deleted file mode 100644 index 2548cf7..0000000 --- a/worker/orca-agent/tests/data/minimal/prompts.json +++ /dev/null @@ -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" - } -] diff --git a/worker/orca-agent/tests/data/minimal/summaries.json b/worker/orca-agent/tests/data/minimal/summaries.json deleted file mode 100644 index 904bf29..0000000 --- a/worker/orca-agent/tests/data/minimal/summaries.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "taskId": "62n2aAVVV42rtt53wxieotTdnKpTRjiChsHYdSxHDhAZ", - "summary": "Test document containing multiple sentences for summarization testing.", - "metadata": { - "source": "test", - "type": "summary" - } - } -] diff --git a/worker/orca-agent/tests/e2e.py b/worker/orca-agent/tests/e2e.py index 1378231..d16cb49 100644 --- a/worker/orca-agent/tests/e2e.py +++ b/worker/orca-agent/tests/e2e.py @@ -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 diff --git a/worker/orca-agent/tests/workers.json b/worker/orca-agent/tests/workers.json index 68ef3ab..1ac52e5 100644 --- a/worker/orca-agent/tests/workers.json +++ b/worker/orca-agent/tests/workers.json @@ -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",