kyegomez/swarms

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

Aperta

#1831 aperta il 9 ago 2026

 (0 commenti) (0 reazioni) (0 assegnatari)Python (986 fork)github user discovery
good first issuestructstech-debt

Metriche repository

Star
 (7040 stelle)
Metriche merge PR
 (Merge medio 3g 5h) (17 PR mergiate in 30 g)

Descrizione

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

Guida contributor