From afd54194821c3c1ba9b92bc450590d065c4cfff1 Mon Sep 17 00:00:00 2001 From: Kye Gomez <98760976+kyegomez@users.noreply.github.com> Date: Wed, 8 Jan 2025 14:53:31 -0500 Subject: [PATCH 1/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2fd3d292d..d87eac7d9 100644 --- a/README.md +++ b/README.md @@ -2022,7 +2022,7 @@ Accelerate Bugs, Features, and Demos to implement by supporting us here: Join our growing community around the world, for real-time support, ideas, and discussions on Swarms 😊 - View our official [Blog](https://docs.swarms.world) -- Chat live with us on [Discord](https://discord.gg/kS3rwKs3ZC) +- Chat live with us on [Discord](https://discord.gg/jM3Z6M9uMq) - Follow us on [Twitter](https://twitter.com/kyegomez) - Connect with us on [LinkedIn](https://www.linkedin.com/company/the-swarm-corporation) - Visit us on [YouTube](https://www.youtube.com/channel/UC9yXyitkbU_WSy7bd_41SqQ) From 9784d697d04429725985a303bb247ab5edce48e9 Mon Sep 17 00:00:00 2001 From: Kye Gomez Date: Thu, 9 Jan 2025 15:09:24 -0500 Subject: [PATCH 2/4] Triggering CI/CD pipeline --- test_github.py | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 test_github.py diff --git a/test_github.py b/test_github.py new file mode 100644 index 000000000..3b369fb7c --- /dev/null +++ b/test_github.py @@ -0,0 +1,58 @@ +import requests +import datetime + +# Replace these with your repository and token details +GITHUB_TOKEN = "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" +REPO_OWNER = "kyegomez" +REPO_NAME = "swarms" + +# GitHub API headers +HEADERS = { + "Authorization": f"token {GITHUB_TOKEN}", + "Accept": "application/vnd.github.v3+json", +} + +# Get today's date +today = datetime.date.today() + +# Fetch closed PRs +def get_closed_prs(): + url = f"https://api.github.com/repos/{REPO_OWNER}/{REPO_NAME}/pulls" + params = { + "state": "closed", + "sort": "updated", + "direction": "desc", + } + response = requests.get(url, headers=HEADERS, params=params) + response.raise_for_status() + prs = response.json() + + # Filter PRs closed today + closed_today = [ + pr for pr in prs if pr["closed_at"] and pr["closed_at"].startswith(today.isoformat()) + ] + return closed_today + +# Reopen a PR +def reopen_pr(pr_number): + url = f"https://api.github.com/repos/{REPO_OWNER}/{REPO_NAME}/pulls/{pr_number}" + data = {"state": "open"} + response = requests.patch(url, headers=HEADERS, json=data) + if response.status_code == 200: + print(f"Successfully reopened PR #{pr_number}") + else: + print(f"Failed to reopen PR #{pr_number}: {response.status_code} - {response.text}") + +# Main function +def main(): + closed_prs = get_closed_prs() + if not closed_prs: + print("No PRs closed today.") + return + + print(f"Found {len(closed_prs)} PR(s) closed today. Reopening them...") + for pr in closed_prs: + reopen_pr(pr["number"]) + +if __name__ == "__main__": + main() From 8733e79e89a7b53409c0e5e377eeb8a58e1bc31f Mon Sep 17 00:00:00 2001 From: Kye Gomez Date: Thu, 9 Jan 2025 15:09:44 -0500 Subject: [PATCH 3/4] Triggering CI/CD pipeline --- test_github.py | 58 -------------------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 test_github.py diff --git a/test_github.py b/test_github.py deleted file mode 100644 index 3b369fb7c..000000000 --- a/test_github.py +++ /dev/null @@ -1,58 +0,0 @@ -import requests -import datetime - -# Replace these with your repository and token details -GITHUB_TOKEN = "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" -REPO_OWNER = "kyegomez" -REPO_NAME = "swarms" - -# GitHub API headers -HEADERS = { - "Authorization": f"token {GITHUB_TOKEN}", - "Accept": "application/vnd.github.v3+json", -} - -# Get today's date -today = datetime.date.today() - -# Fetch closed PRs -def get_closed_prs(): - url = f"https://api.github.com/repos/{REPO_OWNER}/{REPO_NAME}/pulls" - params = { - "state": "closed", - "sort": "updated", - "direction": "desc", - } - response = requests.get(url, headers=HEADERS, params=params) - response.raise_for_status() - prs = response.json() - - # Filter PRs closed today - closed_today = [ - pr for pr in prs if pr["closed_at"] and pr["closed_at"].startswith(today.isoformat()) - ] - return closed_today - -# Reopen a PR -def reopen_pr(pr_number): - url = f"https://api.github.com/repos/{REPO_OWNER}/{REPO_NAME}/pulls/{pr_number}" - data = {"state": "open"} - response = requests.patch(url, headers=HEADERS, json=data) - if response.status_code == 200: - print(f"Successfully reopened PR #{pr_number}") - else: - print(f"Failed to reopen PR #{pr_number}: {response.status_code} - {response.text}") - -# Main function -def main(): - closed_prs = get_closed_prs() - if not closed_prs: - print("No PRs closed today.") - return - - print(f"Found {len(closed_prs)} PR(s) closed today. Reopening them...") - for pr in closed_prs: - reopen_pr(pr["number"]) - -if __name__ == "__main__": - main() From 88ebf262b32966378f2099a75d9dc425c8494cb3 Mon Sep 17 00:00:00 2001 From: Kye Gomez Date: Thu, 9 Jan 2025 15:11:32 -0500 Subject: [PATCH 4/4] [EXAMPLES CLEANUP] --- csvagent_example.py => new_features_examples/csvagent_example.py | 0 .../graph_swarm_example.py | 0 .../multi_agent_router_example.py | 0 .../unique_swarms_examples.py | 0 run_all_tests.py => tests/run_all_tests.py | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename csvagent_example.py => new_features_examples/csvagent_example.py (100%) rename graph_swarm_example.py => new_features_examples/graph_swarm_example.py (100%) rename multi_agent_router_example.py => new_features_examples/multi_agent_router_example.py (100%) rename unique_swarms_examples.py => new_features_examples/unique_swarms_examples.py (100%) rename run_all_tests.py => tests/run_all_tests.py (100%) diff --git a/csvagent_example.py b/new_features_examples/csvagent_example.py similarity index 100% rename from csvagent_example.py rename to new_features_examples/csvagent_example.py diff --git a/graph_swarm_example.py b/new_features_examples/graph_swarm_example.py similarity index 100% rename from graph_swarm_example.py rename to new_features_examples/graph_swarm_example.py diff --git a/multi_agent_router_example.py b/new_features_examples/multi_agent_router_example.py similarity index 100% rename from multi_agent_router_example.py rename to new_features_examples/multi_agent_router_example.py diff --git a/unique_swarms_examples.py b/new_features_examples/unique_swarms_examples.py similarity index 100% rename from unique_swarms_examples.py rename to new_features_examples/unique_swarms_examples.py diff --git a/run_all_tests.py b/tests/run_all_tests.py similarity index 100% rename from run_all_tests.py rename to tests/run_all_tests.py