kyegomez/swarms

[Cleanup] Delete the remaining 527 lines of various_alt_swarms.py — dead duplicate of swarming_architectures.py

開放

#1,831 建立於 2026年8月9日

 (0 則留言) (0 個反應) (0 位負責人)Python (986 個分叉)github user discovery
good first issuestructstech-debt

倉庫指標

星標
 (7,040 顆星)
PR 合併指標
 (平均合併 3天 5小時) (30 天內合併 17 個 PR)

描述

What

Delete the rest of swarms/structs/various_alt_swarms.py (527 lines remaining).

Background

The file originally held 1,103 lines. PR #1825 removed 576 of them (the 10 math-sequence classes: FibonacciSwarm, PrimeSwarm, PowerSwarm, LogSwarm, ExponentialSwarm, GeometricSwarm, HarmonicSwarm, StaircaseSwarm, SigmoidSwarm, SinusoidalSwarm). This issue tracks deleting the remainder.

What still remains (all dead)

  • A second, colliding BaseSwarm at various_alt_swarms.py:15-67, entirely unrelated to swarms/structs/base_swarm.py
  • CircularSwarm, StarSwarm, MeshSwarm, PyramidSwarm
  • OneToOne, Broadcast, OneToThree

Why it should go

  1. Zero references repo-wide. Verified across .py and .md in swarms/, tests/, and examples/ — module name and every exported class name. The module is not imported in swarms/structs/__init__.py, so it is unreachable through the public API.

  2. It is a worse duplicate of live code. swarms/structs/swarming_architectures.py (360 lines) implements circular_swarm, star_swarm, mesh_swarm, pyramid_swarm, one_to_one, and broadcast — and that module is exported from swarms/structs/__init__.py and covered by tests. Every remaining class here re-implements one of those functions, worse.

  3. The run() methods are broken. Each builds a responses = [] accumulator, appends to it throughout, and then never returns it — the caller receives whatever _format_return() produces and the accumulated list is discarded.

  4. The colliding BaseSwarm name is a footgun. Two unrelated classes with the same name in the same package invite a wrong import.

Scope

  • Delete swarms/structs/various_alt_swarms.py
  • Confirm no __init__.py references need removing (there are none today)
  • Run the test suite

Context

From the code-waste audit (experimental/CODE_WASTE_AUDIT.md, section 1.1). Pure deletion, zero call-site changes.

🤖 Generated with Claude Code

貢獻者指南