Skip to content

upgrade of spkg networkx-1.2.p2 to 1.6 #12806

@dkrenn

Description

@dkrenn

When upgrading the networkx package to 1.6, there arise a lot of doctest errors, see discussion on sage-devel.
This ticket should contain everything that is necessary to do so.

To get the doctests passing, the following modifications have been made:

  1. Fixed the calls in graph.py to conform to the new API for betweennness_centrality. Also exposed the new options.
  2. Failing doctest in digraph.py was shocasing a bug that isn't there anymore. Fixed and documented it, and exposed the previously offending implementation to sage
  3. Two failures in graph_generators.py were due to changes in randomized methods, so just changed the tests to conform to the new output, the rest were due to a bad-parameter case that was used to raise an exception but now degenerates gracefully. Fixed the corresponding doctests to account for that.
  4. Failures in graph_generic.py were due to a change in the output of clustering coefficients for weighted graphs. Added an optional parameter to use the new output, implemented the old behaviour as it was in NetworkX 1.2, and set the old behaviour to default with a deprecation warning.

To review this ticket:

  1. Install this spkg
  2. Apply attachment: trac_12806_doctest_fixes.patch, attachment: trac_12806.reviewer.patch and attachment: trac_12806-docbuild-and-links-alt.patch

CC: @kini @kiwifb @sagetrac-brunellus @nathanncohen

Component: graph theory

Keywords: spkg networkx graphs

Author: Daniel Krenn, Javier López Peña

Reviewer: Keshav Kini, Karl-Dieter Crisman

Merged: sage-5.2.beta1

Issue created by migration from https://trac.sagemath.org/ticket/12806

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions