Skip to content

v0.9.0

Choose a tag to compare

@bhargavchippada bhargavchippada released this 22 Mar 14:51
· 22 commits to master since this release

fa2 v0.9.0 — Modernized for Python 3.9-3.14, NetworkX 3.x, Cython 3.x

The first major release in 5+ years. Complete modernization while maintaining full backward compatibility with v0.3.x.

New Features

  • linLogMode: Logarithmic attraction F = log(1+d) for community detection (verified against Gephi source + paper)
  • seed parameter: Reproducible layouts via seeded RNG
  • callbacks: Iteration hooks for animation and convergence monitoring
  • NetworkX 3.x support (also works with 2.7+)
  • igraph support: Robust handling of weighted, edgeless, and directed graphs

Algorithm Fixes

  • Fixed strongGravity axis bug (andor — nodes on axes were silently skipped)
  • Fixed logAttraction formula (was missing log(1+d) term)
  • Fixed Barnes-Hut leaf double-repulsion (now uses one-sided force, matching Gephi reference)
  • Fixed Region single-node mass center calculation
  • Added ZeroDivisionError guards in speed adjustment

Code Quality

  • assert → proper ValueError/TypeError with helpful messages
  • Parameter validation on all numeric inputs
  • Input validation: symmetry (dense + sparse), pos shape, self-loop warning, directed graph rejection
  • Type hints on all public API methods
  • 112 tests, 100% coverage on forceatlas2.py

Build & Compatibility

  • Python 3.9–3.14 supported
  • Cython 3.x build via .pyx (replaces old .pxd approach)
  • pyproject.toml with setuptools backend
  • Pre-generated C file for installation without Cython
  • GitHub Actions CI: 3 OSes × 5 Python versions + pure-Python job

Breaking Changes

  • Python 2 dropped
  • adjustSizes=True now raises NotImplementedError (was silently ignored)
  • multiThreaded=True now raises NotImplementedError (was silently ignored)
  • Invalid parameter values (negative scalingRatio, etc.) now raise ValueError

Issues Closed

#25 #29 #30 #34 #39 #41 #43

PRs Incorporated

#24 #42 #47 #49 #50 #46 #37

PyPI: https://pypi.org/project/fa2/0.9.0/

pip install fa2==0.9.0