mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-05 04:15:08 -05:00
# 🌎 Overview AutoGPT Store Version 2 expands on the Pre-Store by enhancing agent discovery, providing richer content presentation, and introducing new user engagement features. The focus is on creating a visually appealing and interactive marketplace that allows users to explore and evaluate agents through images, videos, and detailed descriptions. ### Vision To create a visually compelling and interactive open-source marketplace for autonomous AI agents, where users can easily discover, evaluate, and interact with agents through media-rich listings, ratings, and version history. ### Objectives 📊 Incorporate visuals (icons, images, videos) into agent listings. ⭐ Introduce a rating system and agent run count. 🔄 Provide version history and update logs from creators. 🔍 Improve user experience with advanced search and filtering features. ### Changes 🏗️ <!-- Concisely describe all of the changes made in this pull request: --> ### Checklist 📋 #### For code changes: - [ ] I have clearly listed my changes in the PR description - [ ] I have made a test plan - [ ] I have tested my changes according to the test plan: <!-- Put your test plan here: --> - [ ] ... <details> <summary>Example test plan</summary> - [ ] Create from scratch and execute an agent with at least 3 blocks - [ ] Import an agent from file upload, and confirm it executes correctly - [ ] Upload agent to marketplace - [ ] Import an agent from marketplace and confirm it executes correctly - [ ] Edit an agent from monitor, and confirm it executes correctly </details> #### For configuration changes: - [ ] `.env.example` is updated or already compatible with my changes - [ ] `docker-compose.yml` is updated or already compatible with my changes - [ ] I have included a list of my configuration changes in the PR description (under **Changes**) <details> <summary>Examples of configuration changes</summary> - Changing ports - Adding new services that need to communicate with each other - Secrets or environment variable changes - New or infrastructure changes such as databases </details> --------- Co-authored-by: Bently <tomnoon9@gmail.com> Co-authored-by: Aarushi <aarushik93@gmail.com>
72 lines
1.9 KiB
Python
72 lines
1.9 KiB
Python
import subprocess
|
|
import sys
|
|
import time
|
|
|
|
|
|
def wait_for_postgres(max_retries=5, delay=5):
|
|
for _ in range(max_retries):
|
|
try:
|
|
result = subprocess.run(
|
|
[
|
|
"docker",
|
|
"compose",
|
|
"-f",
|
|
"docker-compose.test.yaml",
|
|
"exec",
|
|
"postgres-test",
|
|
"pg_isready",
|
|
"-U",
|
|
"postgres",
|
|
"-d",
|
|
"postgres",
|
|
],
|
|
check=True,
|
|
capture_output=True,
|
|
text=True,
|
|
)
|
|
if "accepting connections" in result.stdout:
|
|
print("PostgreSQL is ready.")
|
|
return True
|
|
except subprocess.CalledProcessError:
|
|
print(f"PostgreSQL is not ready yet. Retrying in {delay} seconds...")
|
|
time.sleep(delay)
|
|
print("Failed to connect to PostgreSQL.")
|
|
return False
|
|
|
|
|
|
def run_command(command, check=True):
|
|
try:
|
|
subprocess.run(command, check=check)
|
|
except subprocess.CalledProcessError as e:
|
|
print(f"Command failed: {e}")
|
|
sys.exit(1)
|
|
|
|
|
|
def test():
|
|
# Start PostgreSQL with Docker Compose
|
|
run_command(
|
|
[
|
|
"docker",
|
|
"compose",
|
|
"-f",
|
|
"docker-compose.test.yaml",
|
|
"up",
|
|
"-d",
|
|
"postgres-test",
|
|
]
|
|
)
|
|
|
|
if not wait_for_postgres():
|
|
run_command(["docker", "compose", "-f", "docker-compose.test.yaml", "down"])
|
|
sys.exit(1)
|
|
|
|
# Run Prisma migrations
|
|
run_command(["prisma", "migrate", "dev"])
|
|
|
|
# Run the tests
|
|
result = subprocess.run(["pytest"] + sys.argv[1:], check=False)
|
|
|
|
run_command(["docker", "compose", "-f", "docker-compose.test.yaml", "down"])
|
|
|
|
sys.exit(result.returncode)
|