mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-15 01:58:23 -05:00
Restructuring the Repo to make it clear the difference between classic autogpt and the autogpt platform: * Move the "classic" projects `autogpt`, `forge`, `frontend`, and `benchmark` into a `classic` folder * Also rename `autogpt` to `original_autogpt` for absolute clarity * Rename `rnd/` to `autogpt_platform/` * `rnd/autogpt_builder` -> `autogpt_platform/frontend` * `rnd/autogpt_server` -> `autogpt_platform/backend` * Adjust any paths accordingly
28 lines
776 B
Python
28 lines
776 B
Python
import os
|
|
import shutil
|
|
from pathlib import Path
|
|
|
|
from dotenv import load_dotenv
|
|
|
|
load_dotenv()
|
|
|
|
HELICONE_GRAPHQL_LOGS = os.getenv("HELICONE_GRAPHQL_LOGS", "").lower() == "true"
|
|
|
|
|
|
def get_list_of_file_paths(
|
|
challenge_dir_path: str | Path, artifact_folder_name: str
|
|
) -> list[Path]:
|
|
source_dir = Path(challenge_dir_path) / artifact_folder_name
|
|
if not source_dir.exists():
|
|
return []
|
|
return list(source_dir.iterdir())
|
|
|
|
|
|
def copy_challenge_artifacts_into_workspace(
|
|
challenge_dir_path: str | Path, artifact_folder_name: str, workspace: str | Path
|
|
) -> None:
|
|
file_paths = get_list_of_file_paths(challenge_dir_path, artifact_folder_name)
|
|
for file_path in file_paths:
|
|
if file_path.is_file():
|
|
shutil.copy(file_path, workspace)
|