#5934 closed defect (fixed)
[with spkg; positive review] networkx -- fix bad spkg
Reported by: | was | Owned by: | rlm |
---|---|---|---|
Priority: | blocker | Milestone: | sage-4.0 |
Component: | graph theory | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
#4860 was messed up
The networkx-0.99.p0.spkg currently in Sage contains both networkx 0.36 (what we use) and networkx 0.99. When installed, only the old version is installed. This has two negatives:
(1) it wastes disk space
(2) it confuses users, e.g., it made me feel like an idiot when I posted to the networkx-discuss mailing list about all their examples being broken. I carefully checked Sage had networkx 0.99 by looking in spkg/standard, only to be fooled.
Possible fixes:
- Just revert to the previous networkx spkg. This will not solve the problem I ran into though, since sage -upgrade won't downgrade.
- Make a new networkx spkg called networkx-0.99.p1-fake_really-0.36 and delete src/networkx-0.99 from it.
I've posted an spkg that does 2:
http://wstein.org/home/wstein/patches/networkx-0.99.p1-fake_really-0.36.spkg
By the way, this was all discussed here: http://groups.google.com/group/sage-devel/browse_thread/thread/e677517098468e32
Change History (8)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
- Summary changed from [with spkg; needs review] networkx -- fix bad spkg to [with spkg; positive review] networkx -- fix bad spkg
comment:3 follow-up: ↓ 5 Changed 12 years ago by
I see little point in downgrading the spkg - why not fix the problem in the first place and use NetworkX 0.99?
Cheers,
Michael
comment:4 Changed 12 years ago by
From the look of it, I think it's more of a name change as the NetworkX code in SAGE_ROOT/spkg/standard/networkx-0.99.p0.spkg
and at
http://wstein.org/home/wstein/patches/networkx-0.99.p1-fake_really-0.36.spkg
essentially belong to the same version, viz. 0.36. From my reading of 0.99, there are some major changes in the API and heaps of modules have been shuffled around, which potentially break some doctests in sage/graphs/*
. But that's just my suspicion, as I've not actually tried to create an spkg of NetworkX 0.99 and test things out with Sage 3.4.2. So I'm happy with William's spkg on the one hand, and also with an spkg of 0.99 on the other.
comment:5 in reply to: ↑ 3 ; follow-up: ↓ 7 Changed 12 years ago by
Replying to mabshoff:
I see little point in downgrading the spkg - why not fix the problem in the first place and use NetworkX 0.99?
NetworkX changes too drastically from release to release to base Sage graphs on. Until we can finish our own implementation, it is much easier to stick to version 0.36.
comment:6 Changed 12 years ago by
- Milestone changed from sage-4.0.1 to sage-4.0
- Resolution set to fixed
- Status changed from new to closed
Merged the fake spkg in Sage 4.0.alpha0.
Cheers,
Michael
comment:7 in reply to: ↑ 5 ; follow-up: ↓ 8 Changed 12 years ago by
Replying to rlm:
Replying to mabshoff:
I see little point in downgrading the spkg - why not fix the problem in the first place and use NetworkX 0.99?
NetworkX changes too drastically from release to release to base Sage graphs on. Until we can finish our own implementation, it is much easier to stick to version 0.36.
I think this is a bit unfair to characterize NetworkX this way. They did a major rewrite between versions 0.37 and 0.99, hence had some API changes. They have a helpful page addressing API changes: http://networkx.lanl.gov/reference/api_changes.html. I think it does require some resources to make sure that we work with 0.99, but that is normal updating based on a new major release of a project, not a constantly changing project that is difficult to keep up with. NetworkX still saves us a lot of time implementing a number of algorithms that they already have.
That said, I don't have time right now to update to 0.99. However, I think updating to 0.99 is a very feasible project for a student, for example. My guess (given how seldom networkx is updated) the effort would not be wasted at all.
REFEREE REPORT
The results of #4860 were due to bad refereeing on my part.
The current version of NetworkX in Sage 3.4.2 is, as stated, actually version 0.36 instead of 0.99 as claimed by the spkg name in SAGE_ROOT/spkg/standard. Version 0.35.1 has a demo/toy/testing implementation of
edge_betweenness
, whereas version 0.36 has an actual working implementation. Furthermore, version 0.36 doesn't have the modulenetworkx/matching.py
, which was introduced in 0.37. Also, 0.99 has a lot of stuff undernetworkx/algorithms
, whereas 0.36 doesn't even have such a directory. So with the current actual version 0.36 as shipped with Sage 3.4.2, the following is expected:After installing the fake spkg
0.99.p1
withsage -i http://wstein.org/home/wstein/patches/networkx-0.99.p1-fake_really-0.36.spkg
and rebuilding with
sage -b
, I ran all tests onsage/graphs
with the options-t -long
and the tests passed. Running the same commands as above that use NetworkX returned similar results:So on the one hand, the fake
0.99.p1
installs OK against Sage 3.4.2 and all tests passed even with the option-long
. On the other hand, it is precisely (fingers crossed) version 0.36 of NetworkX as argued above. I hope I've redeemed myself.