AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(platform): Fixs to allow formatting and tests to work from sub command (#9703)
Swifty8974a0f9e523
diff --git a/autogpt_platform/backend/.env.example b/autogpt_platform/backend/.env.exampleindex 60e09a03cf..facc17e6dd 100644--- a/autogpt_platform/backend/.env.example+++ b/autogpt_platform/backend/.env.example@@ -188,6 +188,8 @@ SMARTLEAD_API_KEY=# ZeroBounceZEROBOUNCE_API_KEY=+## ===== OPTIONAL API KEYS END ===== ##+# Logging ConfigurationLOG_LEVEL=INFOENABLE_CLOUD_LOGGING=falsediff --git a/autogpt_platform/backend/docker-compose.test.yaml b/autogpt_platform/backend/docker-compose.test.yamlindex f2a5f1bc2a..b2f6b9fb55 100644--- a/autogpt_platform/backend/docker-compose.test.yaml+++ b/autogpt_platform/backend/docker-compose.test.yaml@@ -26,6 +26,21 @@ services:interval: 10stimeout: 5sretries: 5+ rabbitmq-test:+ image: rabbitmq:management+ container_name: rabbitmq-test+ healthcheck:+ test: rabbitmq-diagnostics -q ping+ interval: 30s+ timeout: 10s+ retries: 5+ start_period: 10s+ environment:+ - RABBITMQ_DEFAULT_USER=rabbitmq_user_default+ - RABBITMQ_DEFAULT_PASS=k0VMxyIJF9S35f3x2uaw5IWAl6Y536O7 # CHANGE THIS TO A RANDOM PASSWORD IN PRODUCTION -- everywhere lol+ ports:+ - "5672:5672"+ - "15672:15672"networks:app-network-test:diff --git a/autogpt_platform/backend/linter.py b/autogpt_platform/backend/linter.pyindex a85fd6e9dc..d508bb1c5c 100644--- a/autogpt_platform/backend/linter.py+++ b/autogpt_platform/backend/linter.py@@ -1,5 +1,6 @@import osimport subprocess+import sysdirectory = os.path.dirname(os.path.realpath(__file__))@@ -10,7 +11,16 @@ TARGET_DIRS = [BACKEND_DIR, LIBS_DIR]def run(*command: str) -> None:print(f">>>>> Running poetry run {' '.join(command)}")- subprocess.run(["poetry", "run"] + list(command), cwd=directory, check=True)+ try:+ subprocess.run(+ ["poetry", "run"] + list(command),+ cwd=directory,+ check=True,+ stdout=subprocess.PIPE,+ stderr=subprocess.STDOUT,+ )+ except subprocess.CalledProcessError as e:+ print(e.output.decode("utf-8"), file=sys.stderr)def lint():diff --git a/autogpt_platform/backend/run_tests.py b/autogpt_platform/backend/run_tests.pyindex b2343b2082..4f457fef96 100644--- a/autogpt_platform/backend/run_tests.py+++ b/autogpt_platform/backend/run_tests.py@@ -52,7 +52,6 @@ def test():"docker-compose.test.yaml","up","-d",- "postgres-test",])