History of software_dependencies
The changes to the source code of this entry in the repository, newest first, each with the differences it made to the entry's files. They are also listed on GitLab.
[entries] Merge duplicate entries and add cross-references between related ones 9bc6033
- Removed duplicates, merged into the entries holding the same data: dblp_coauthor_snap (soc_net_comms), cattle and bison (dom; bison's breeding data move there, as do the wolves' age and sex), football_tsevans (football, with both conference assignments), eu_procurements_alt (eu_procurements), foursquare_friendships (foursquare_global). - software_dependencies: colt and scolt are one network; ambassador: the duplicate 2001 network is dropped and the three same-edge networks combined; dom: the dataset count corrected (436). - macaque_neural: Young's 71-area network added (young71; the 47-area one is now cocomac47), both from archived copies. - collins_yeast, celegans_interactomes: from archived copies of the dead CCSB site (byte-identical files). - Cross-references between entries holding versions of the same data (food webs, Wikipedia, Slashdot, physicians, SNAP/Mislove, CCSB). - ICON ids of duplicate records added; macaque_neural's corrected. - prosper, dbpedia_all: string properties given in edge-index order (needs graph-tool with the fixed vals ordering).
diff --git a/entries/software_dependencies/__init__.py b/entries/software_dependencies/__init__.py
index 0f046e2..4488ac4 100644
--- a/entries/software_dependencies/__init__.py
+++ b/entries/software_dependencies/__init__.py
@@ -17,19 +17,20 @@
# with this program. If not, see <http://www.gnu.org/licenses/>.
from .. import *
+import collections
title = "Software dependencies (2010)"
description = """Class dependency networks of several Java software systems, constructed by L. Šubelj and collaborators from the source code. Nodes are software classes (including interfaces and nested classes) and a directed edge $i \\to j$ indicates that class $i$ depends on (references) class $j$ (e.g. `java.applet.Applet` points to its superclass `java.awt.Panel`). The upstream files list one line per dependency, so a pair of classes can be connected by multiple parallel edges. The networks include all classes of the respective systems, also those without dependencies (e.g. 54 of the 6,488 classes of `jdk` are isolated).
-- From Šubelj and Bajec (Physica A, 2011): `javax`, `java` and `org` (the corresponding namespaces of the Java SE Development Kit, JDK, version 1.6.0.7), `colt` (Colt 1.2.0), `jung` (JUNG 2.0.1, namespace `edu.uci.ics.jung`), `flamingo` (Flamingo 4.1), `jmail` (JavaMail 1.4.3) and `junit` (JUnit 4.8.1).
+- From Šubelj and Bajec (Physica A, 2011): `javax`, `java` and `org` (the corresponding namespaces of the Java SE Development Kit, JDK, version 1.6.0.7), `colt` (Colt 1.2.0, namespace `cern`; the same network, with the same class numbers and the same 3,691 dependencies, is distributed again with dependency types for Šubelj, Blagus and Bajec, NetSci 2013, and the types are included here), `jung` (JUNG 2.0.1, namespace `edu.uci.ics.jung`), `flamingo` (Flamingo 4.1), `jmail` (JavaMail 1.4.3) and `junit` (JUnit 4.8.1).
- From Šubelj and Bajec (SoftwareMining, 2012): `jdk` (the whole JDK 1.6.0.7), `weka` (Weka 3.6.6), `jung-j` (JUNG 2.0.1 together with the `java` and `javax` namespaces of the JDK) and `jung-c` (JUNG 2.0.1 together with Colt 1.2.0).
- `guava`: Guava r07 core libraries, where an edge indicates that the documentation of a class references another class.
-- `slucene` (Lucene 4.1.0) and `scolt` (Colt 1.2.0), from Šubelj, Blagus and Bajec (NetSci, 2013), and `sjung` (JUNG 2.0.1) and `sjbullet` (JBullet 2.72), from Šubelj et al. (Advs. Complex Syst., 2014).
+- `slucene` (Lucene 4.1.0), from Šubelj, Blagus and Bajec (NetSci, 2013), and `sjung` (JUNG 2.0.1) and `sjbullet` (JBullet 2.72), from Šubelj et al. (Advs. Complex Syst., 2014).
The networks have the following properties:
-- Nodes: `name`, the fully qualified name of the class (e.g. `java.applet.Applet`, with a dollar sign separating nested classes); not available for `slucene`, `scolt`, `sjung` and `sjbullet`, for which no class names are distributed upstream.
-- Edges: `type`, only for `slucene`, `scolt`, `sjung` and `sjbullet`, a letter code given upstream for each dependency (`c`, `p`, `r`, `s`, ...), presumably the type of dependency, whose meaning is not documented upstream."""
+- Nodes: `name`, the fully qualified name of the class (e.g. `java.applet.Applet`, with a dollar sign separating nested classes); not available for `slucene`, `sjung` and `sjbullet`, for which no class names are distributed upstream.
+- Edges: `type`, only for `slucene`, `colt`, `sjung` and `sjbullet`, a letter code given upstream for each dependency (`c`, `p`, `r`, `s`, ...), presumably the type of dependency, whose meaning is not documented upstream."""
tags = ['Technological', 'Software', 'Unweighted', 'Multigraph', 'Metadata']
url = 'http://wwwlovre.appspot.com/support.jsp'
citation = [('L. Šubelj, M. Bajec, "Community structure of complex software systems: Analysis and applications." Physica A 390(16), 2968-2975 (2011)', 'https://doi.org/10.1016/j.physa.2011.03.036'),
@@ -45,13 +46,19 @@ upstream_prefix = 'http://wwwlovre.appspot.com/resources/research/networks'
nets = ['other/jdk', 'ssa/jung-j', 'ssc/javax', 'ssc/java', 'cmhs/slucene',
'ssa/weka', 'ssa/jung-c', 'ncs/guava', 'ssc/org', 'ssc/colt',
- 'ssc/jung', 'sgs/sjung', 'ssc/flamingo', 'cmhs/scolt', 'ssc/jmail',
+ 'ssc/jung', 'sgs/sjung', 'ssc/flamingo', 'ssc/jmail',
'sgs/sjbullet', 'ssc/junit']
# class names (.map files) are not available for the cmhs/ and sgs/ networks
files = [((net,) if net.split("/")[0] in ("cmhs", "sgs") else (net, net + ".map"),
net.split("/")[1], None) for net in nets]
+# `colt` has the same dependencies as `cmhs/scolt` (the Colt network of the
+# NetSci 2013 paper, with dependency types), in a different order: the types
+# are taken from it
+files[nets.index('ssc/colt')] = (('ssc/colt', 'ssc/colt.map', 'cmhs/scolt'),
+ 'colt', None)
+
def fetch_upstream(force=False):
return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
force)
@@ -81,6 +88,24 @@ def parse(alts=None):
g.add_edge_list(edges, eprops=[g.ep.type])
else:
g.add_edge_list([(int(u), int(v)) for u, v in edges])
+ if len(fnames) > 2:
+ # dependency types from the same network with typed edges (same
+ # class numbers and the same multiset of dependencies): the types
+ # of the parallel edges of each pair are assigned in file order
+ types = collections.defaultdict(list)
+ with open_upstream_file(name, fnames[2], "r") as f:
+ for line in f:
+ if "#" in line:
+ continue
+ vals = line.split()
+ if len(vals) == 3:
+ types[(int(vals[0]), int(vals[1]))].append(vals[2])
+ assert (sorted((k, len(v)) for k, v in types.items()) ==
+ sorted(collections.Counter((int(e[0]), int(e[1]))
+ for e in edges).items()))
+ g.ep.type = g.new_ep("string")
+ for e in g.edges():
+ g.ep.type[e] = types[(int(e.source()), int(e.target()))].pop(0)
if len(fnames) > 1:
g.vp.name = g.new_vp("string")
with open_upstream_file(name, fnames[1], "r") as f:
[entries] Fix parse bugs and improve descriptions and metadata 6bb6851
- parse fixes from the review of the descriptions, e.g. us_patents (directed), celegans_2019 (synapse direction), ecoli_transcription and yeast_transcription (regulator to target), bitcoin (direction, phantom node), ego_social (Google+ features and circles), scotus_majority, arxiv_authors and social_location (as in SNAP), caida_as, dnc, dom, mist, reuters and bibsonomy (names on the right nodes), uci_zoo - every description now states explicitly what the nodes and edges represent; corrected titles, years, tags, citations and licences - the "Hypergraph" tag is removed; very large entries are marked `huge = True` (see --skip-huge) - ICON ids of partial duplicates added (hiv_transmission, congress_bills, openflights, dutch_school)
diff --git a/entries/software_dependencies/__init__.py b/entries/software_dependencies/__init__.py
index e7822b1..0f046e2 100644
--- a/entries/software_dependencies/__init__.py
+++ b/entries/software_dependencies/__init__.py
@@ -19,7 +19,7 @@
from .. import *
title = "Software dependencies (2010)"
-description = """Class dependency networks of several Java software systems, constructed by L. Šubelj and collaborators from the source code. Nodes are software classes (including interfaces and nested classes) and a directed edge indicates that one class depends on (references) another class. The upstream files list one line per dependency, so a pair of classes can be connected by multiple parallel edges. The networks include all classes of the respective systems, also those without dependencies (e.g. 54 of the 6,488 classes of `jdk` are isolated).
+description = """Class dependency networks of several Java software systems, constructed by L. Šubelj and collaborators from the source code. Nodes are software classes (including interfaces and nested classes) and a directed edge $i \\to j$ indicates that class $i$ depends on (references) class $j$ (e.g. `java.applet.Applet` points to its superclass `java.awt.Panel`). The upstream files list one line per dependency, so a pair of classes can be connected by multiple parallel edges. The networks include all classes of the respective systems, also those without dependencies (e.g. 54 of the 6,488 classes of `jdk` are isolated).
- From Šubelj and Bajec (Physica A, 2011): `javax`, `java` and `org` (the corresponding namespaces of the Java SE Development Kit, JDK, version 1.6.0.7), `colt` (Colt 1.2.0), `jung` (JUNG 2.0.1, namespace `edu.uci.ics.jung`), `flamingo` (Flamingo 4.1), `jmail` (JavaMail 1.4.3) and `junit` (JUnit 4.8.1).
- From Šubelj and Bajec (SoftwareMining, 2012): `jdk` (the whole JDK 1.6.0.7), `weka` (Weka 3.6.6), `jung-j` (JUNG 2.0.1 together with the `java` and `javax` namespaces of the JDK) and `jung-c` (JUNG 2.0.1 together with Colt 1.2.0).
@@ -28,7 +28,7 @@ description = """Class dependency networks of several Java software systems, con
The networks have the following properties:
-- Nodes: `name`, the fully qualified name of the class (e.g. `java.applet.Applet`, with `$` separating nested classes); not available for `slucene`, `scolt`, `sjung` and `sjbullet`, for which no class names are distributed upstream.
+- Nodes: `name`, the fully qualified name of the class (e.g. `java.applet.Applet`, with a dollar sign separating nested classes); not available for `slucene`, `scolt`, `sjung` and `sjbullet`, for which no class names are distributed upstream.
- Edges: `type`, only for `slucene`, `scolt`, `sjung` and `sjbullet`, a letter code given upstream for each dependency (`c`, `p`, `r`, `s`, ...), presumably the type of dependency, whose meaning is not documented upstream."""
tags = ['Technological', 'Software', 'Unweighted', 'Multigraph', 'Metadata']
url = 'http://wwwlovre.appspot.com/support.jsp'
[entries] Merge the KONECT duplicates jdk, jung and flickr_groups into existing entries 31e053f
jdk and jung are the jdk and jung-j networks of software_dependencies, and flickr_groups the Flickr group memberships of mislove_osn. Their ICON ids, citations and descriptions were merged into those entries, which also gain the class names from the upstream .map files (software_dependencies) and the Flickr and YouTube user-group memberships as bipartite networks (mislove_osn).
diff --git a/entries/software_dependencies/__init__.py b/entries/software_dependencies/__init__.py
index 8109fcb..e7822b1 100644
--- a/entries/software_dependencies/__init__.py
+++ b/entries/software_dependencies/__init__.py
@@ -19,17 +19,28 @@
from .. import *
title = "Software dependencies (2010)"
-description = """Several networks of software dependencies. Nodes represent libraries and a directed edge denotes a library dependency on another.[^icon]
-[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
-tags = ['Technological', 'Software', 'Unweighted']
+description = """Class dependency networks of several Java software systems, constructed by L. Šubelj and collaborators from the source code. Nodes are software classes (including interfaces and nested classes) and a directed edge indicates that one class depends on (references) another class. The upstream files list one line per dependency, so a pair of classes can be connected by multiple parallel edges. The networks include all classes of the respective systems, also those without dependencies (e.g. 54 of the 6,488 classes of `jdk` are isolated).
+
+- From Šubelj and Bajec (Physica A, 2011): `javax`, `java` and `org` (the corresponding namespaces of the Java SE Development Kit, JDK, version 1.6.0.7), `colt` (Colt 1.2.0), `jung` (JUNG 2.0.1, namespace `edu.uci.ics.jung`), `flamingo` (Flamingo 4.1), `jmail` (JavaMail 1.4.3) and `junit` (JUnit 4.8.1).
+- From Šubelj and Bajec (SoftwareMining, 2012): `jdk` (the whole JDK 1.6.0.7), `weka` (Weka 3.6.6), `jung-j` (JUNG 2.0.1 together with the `java` and `javax` namespaces of the JDK) and `jung-c` (JUNG 2.0.1 together with Colt 1.2.0).
+- `guava`: Guava r07 core libraries, where an edge indicates that the documentation of a class references another class.
+- `slucene` (Lucene 4.1.0) and `scolt` (Colt 1.2.0), from Šubelj, Blagus and Bajec (NetSci, 2013), and `sjung` (JUNG 2.0.1) and `sjbullet` (JBullet 2.72), from Šubelj et al. (Advs. Complex Syst., 2014).
+
+The networks have the following properties:
+
+- Nodes: `name`, the fully qualified name of the class (e.g. `java.applet.Applet`, with `$` separating nested classes); not available for `slucene`, `scolt`, `sjung` and `sjbullet`, for which no class names are distributed upstream.
+- Edges: `type`, only for `slucene`, `scolt`, `sjung` and `sjbullet`, a letter code given upstream for each dependency (`c`, `p`, `r`, `s`, ...), presumably the type of dependency, whose meaning is not documented upstream."""
+tags = ['Technological', 'Software', 'Unweighted', 'Multigraph', 'Metadata']
url = 'http://wwwlovre.appspot.com/support.jsp'
-citation = [('Šubelj & Bajec (2012). Software systems through complex networks science, Proc. of SoftwareMining 12, p. 9','https://doi.org/10.1145/2384416.2384418'),
- ('Šubelj & Bajec (2011). Community structure of complex software systems, Physica A 390(16), 2968','https://doi.org/10.1016/j.physa.2011.03.036'),
- ('Šubelj & Bajec (2012). Software systems through complex networks science, Proc. of SoftwareMining 12, p. 9','https://doi.org/10.1145/2384416.2384418'),
- ('Šubelj & Bajec (2012). Clustering assortativity, communities and functional modules in real-world networks, pp. 21.','http://arxiv.org/abs/1202.3188'),
- ('Šubelj et al. (2014). Node mixing and group structure of complex software networks, Advs. Complex Syst. 17(7), 1450022.', 'https://doi.org/10.1142/S0219525914500222')]
-icon_hash = ['589b6485a411221d0e7c67d4', '58a4c628a411221d0e7c67e8', '58a4c586a411221d0e7c67e7']
-ustream_license = None
+citation = [('L. Šubelj, M. Bajec, "Community structure of complex software systems: Analysis and applications." Physica A 390(16), 2968-2975 (2011)', 'https://doi.org/10.1016/j.physa.2011.03.036'),
+ ('L. Šubelj, M. Bajec, "Software systems through complex networks science: Review, analysis and applications." Proc. 1st International Workshop on Software Mining (SoftwareMining 12), 9-16 (2012)', 'https://doi.org/10.1145/2384416.2384418'),
+ ('L. Šubelj, M. Bajec, "Clustering assortativity, communities and functional modules in real-world networks." arXiv:1202.3188 (2012)', 'https://arxiv.org/abs/1202.3188'),
+ ('L. Šubelj, N. Blagus, M. Bajec, "Group extraction for real-world networks: The case of communities, modules, and hubs and spokes." Proc. of NetSci 13, 152 (2013)', 'https://lovro.fri.uni-lj.si/papers/cmhs.pdf'),
+ ('L. Šubelj, S. Žitnik, N. Blagus, M. Bajec, "Node mixing and group structure of complex software networks." Advs. Complex Syst. 17(7-8), 1450022 (2014)', 'https://doi.org/10.1142/S0219525914500222')]
+icon_hash = ['589b6485a411221d0e7c67d4', '58a4c628a411221d0e7c67e8',
+ '58a4c586a411221d0e7c67e7', '5840fa138cf714f319c4540c',
+ '5840fa738cf714f319c4540d']
+upstream_license = None
upstream_prefix = 'http://wwwlovre.appspot.com/resources/research/networks'
nets = ['other/jdk', 'ssa/jung-j', 'ssc/javax', 'ssc/java', 'cmhs/slucene',
@@ -37,7 +48,9 @@ nets = ['other/jdk', 'ssa/jung-j', 'ssc/javax', 'ssc/java', 'cmhs/slucene',
'ssc/jung', 'sgs/sjung', 'ssc/flamingo', 'cmhs/scolt', 'ssc/jmail',
'sgs/sjbullet', 'ssc/junit']
-files = [(net, net.split("/")[1], None) for net in nets]
+# class names (.map files) are not available for the cmhs/ and sgs/ networks
+files = [((net,) if net.split("/")[0] in ("cmhs", "sgs") else (net, net + ".map"),
+ net.split("/")[1], None) for net in nets]
def fetch_upstream(force=False):
return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
@@ -52,18 +65,31 @@ def parse(alts=None):
for fnames, alt, fmt in files:
if alts is not None and alt not in alts:
continue
- if isinstance(fnames, str):
- fnames = [fnames]
- with ExitStack() as stack:
- fs = [stack.enter_context(open_upstream_file(name, fn, "r")) for fn in fnames]
- g = Graph(directed=True)
-
- for line in fs[0]:
+ g = Graph(directed=True)
+ edges = []
+ with open_upstream_file(name, fnames[0], "r") as f:
+ for line in f:
if "#" in line:
continue
vals = line.split()
if len(vals) == 1 and int(vals[0]) >= g.num_vertices():
g.add_vertex(int(vals[0]) - g.num_vertices() + 1)
if len(vals) > 1:
- g.add_edge(int(vals[0]), int(vals[1]))
+ edges.append(vals)
+ if len(edges) > 0 and len(edges[0]) > 2:
+ g.ep.type = g.new_ep("string")
+ g.add_edge_list(edges, eprops=[g.ep.type])
+ else:
+ g.add_edge_list([(int(u), int(v)) for u, v in edges])
+ if len(fnames) > 1:
+ g.vp.name = g.new_vp("string")
+ with open_upstream_file(name, fnames[1], "r") as f:
+ for line in f:
+ if line.startswith("#") or not line.strip():
+ continue
+ cname, i = line.rsplit(None, 1)
+ i = int(i)
+ if i >= g.num_vertices():
+ g.add_vertex(i - g.num_vertices() + 1)
+ g.vp.name[i] = cname
yield alt, g
Update copyright information 73a4f0d
diff --git a/entries/software_dependencies/__init__.py b/entries/software_dependencies/__init__.py
index 9b8ba16..8109fcb 100644
--- a/entries/software_dependencies/__init__.py
+++ b/entries/software_dependencies/__init__.py
@@ -1,7 +1,7 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2020-2024 Tiago de Paula Peixoto <tiago@skewed.de>
+# Copyright (C) 2020-2026 Tiago de Paula Peixoto <tiago@skewed.de>
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
Update copyright information 3d288ea
diff --git a/entries/software_dependencies/__init__.py b/entries/software_dependencies/__init__.py
index 631e057..9b8ba16 100644
--- a/entries/software_dependencies/__init__.py
+++ b/entries/software_dependencies/__init__.py
@@ -1,7 +1,7 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2020-2023 Tiago de Paula Peixoto <tiago@skewed.de>
+# Copyright (C) 2020-2024 Tiago de Paula Peixoto <tiago@skewed.de>
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
Update copyright information 8d005ae
diff --git a/entries/software_dependencies/__init__.py b/entries/software_dependencies/__init__.py
index 7537c1b..631e057 100644
--- a/entries/software_dependencies/__init__.py
+++ b/entries/software_dependencies/__init__.py
@@ -1,7 +1,7 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2021 Tiago de Paula Peixoto <tiago@skewed.de>
+# Copyright (C) 2020-2023 Tiago de Paula Peixoto <tiago@skewed.de>
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
Fix description string quotes 3fc2e4d
diff --git a/entries/software_dependencies/__init__.py b/entries/software_dependencies/__init__.py
index 244fb72..7537c1b 100644
--- a/entries/software_dependencies/__init__.py
+++ b/entries/software_dependencies/__init__.py
@@ -19,16 +19,15 @@
from .. import *
title = "Software dependencies (2010)"
-description = """""Several networks of software dependencies. Nodes represent libraries and a directed edge denotes a library dependency on another.""[^icon]
+description = """Several networks of software dependencies. Nodes represent libraries and a directed edge denotes a library dependency on another.[^icon]
[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
tags = ['Technological', 'Software', 'Unweighted']
url = 'http://wwwlovre.appspot.com/support.jsp'
-citation = [('Šubelj & Bajec (2012). Software systems through complex networks science, Proc. of SoftwareMining 12, p. 9','http://dx.doi.org/10.1145/2384416.2384418'),
- ('Šubelj & Bajec (2011). Community structure of complex software systems, Physica A 390(16), 2968','http://dx.doi.org/10.1016/j.physa.2011.03.036'),
- ('Šubelj et al. (2013). Group extraction for real-world networks, Proc. of NetSci 13, p. 152.','http://netsci2013.net/wordpress/wp-content/uploads/2013/05/booklet_NetSci_2013_forWeb_2.pdf'),
- ('Šubelj & Bajec (2012). Software systems through complex networks science, Proc. of SoftwareMining 12, p. 9','http://dx.doi.org/10.1145/2384416.2384418'),
+citation = [('Šubelj & Bajec (2012). Software systems through complex networks science, Proc. of SoftwareMining 12, p. 9','https://doi.org/10.1145/2384416.2384418'),
+ ('Šubelj & Bajec (2011). Community structure of complex software systems, Physica A 390(16), 2968','https://doi.org/10.1016/j.physa.2011.03.036'),
+ ('Šubelj & Bajec (2012). Software systems through complex networks science, Proc. of SoftwareMining 12, p. 9','https://doi.org/10.1145/2384416.2384418'),
('Šubelj & Bajec (2012). Clustering assortativity, communities and functional modules in real-world networks, pp. 21.','http://arxiv.org/abs/1202.3188'),
- ('Šubelj et al. (2014). Node mixing and group structure of complex software networks, Advs. Complex Syst. 17(7), 1450022.', 'http://dx.doi.org/10.1142/S0219525914500222')]
+ ('Šubelj et al. (2014). Node mixing and group structure of complex software networks, Advs. Complex Syst. 17(7), 1450022.', 'https://doi.org/10.1142/S0219525914500222')]
icon_hash = ['589b6485a411221d0e7c67d4', '58a4c628a411221d0e7c67e8', '58a4c586a411221d0e7c67e7']
ustream_license = None
upstream_prefix = 'http://wwwlovre.appspot.com/resources/research/networks'
Add entry 'software_dependencies' 1804da1
diff --git a/entries/software_dependencies/__init__.py b/entries/software_dependencies/__init__.py
new file mode 100644
index 0000000..244fb72
--- /dev/null
+++ b/entries/software_dependencies/__init__.py
@@ -0,0 +1,70 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2021 Tiago de Paula Peixoto <tiago@skewed.de>
+#
+# This program is free software: you can redistribute it and/or modify it under
+# the terms of the GNU Affero General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Affero General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+
+from .. import *
+
+title = "Software dependencies (2010)"
+description = """""Several networks of software dependencies. Nodes represent libraries and a directed edge denotes a library dependency on another.""[^icon]
+[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
+tags = ['Technological', 'Software', 'Unweighted']
+url = 'http://wwwlovre.appspot.com/support.jsp'
+citation = [('Šubelj & Bajec (2012). Software systems through complex networks science, Proc. of SoftwareMining 12, p. 9','http://dx.doi.org/10.1145/2384416.2384418'),
+ ('Šubelj & Bajec (2011). Community structure of complex software systems, Physica A 390(16), 2968','http://dx.doi.org/10.1016/j.physa.2011.03.036'),
+ ('Šubelj et al. (2013). Group extraction for real-world networks, Proc. of NetSci 13, p. 152.','http://netsci2013.net/wordpress/wp-content/uploads/2013/05/booklet_NetSci_2013_forWeb_2.pdf'),
+ ('Šubelj & Bajec (2012). Software systems through complex networks science, Proc. of SoftwareMining 12, p. 9','http://dx.doi.org/10.1145/2384416.2384418'),
+ ('Šubelj & Bajec (2012). Clustering assortativity, communities and functional modules in real-world networks, pp. 21.','http://arxiv.org/abs/1202.3188'),
+ ('Šubelj et al. (2014). Node mixing and group structure of complex software networks, Advs. Complex Syst. 17(7), 1450022.', 'http://dx.doi.org/10.1142/S0219525914500222')]
+icon_hash = ['589b6485a411221d0e7c67d4', '58a4c628a411221d0e7c67e8', '58a4c586a411221d0e7c67e7']
+ustream_license = None
+upstream_prefix = 'http://wwwlovre.appspot.com/resources/research/networks'
+
+nets = ['other/jdk', 'ssa/jung-j', 'ssc/javax', 'ssc/java', 'cmhs/slucene',
+ 'ssa/weka', 'ssa/jung-c', 'ncs/guava', 'ssc/org', 'ssc/colt',
+ 'ssc/jung', 'sgs/sjung', 'ssc/flamingo', 'cmhs/scolt', 'ssc/jmail',
+ 'sgs/sjbullet', 'ssc/junit']
+
+files = [(net, net.split("/")[1], None) for net in nets]
+
+def fetch_upstream(force=False):
+ return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
+ force)
+
+@cache_network()
+@coerce_props()
+@annotate()
+def parse(alts=None):
+ global files
+ name = __name__.split(".")[-1]
+ for fnames, alt, fmt in files:
+ if alts is not None and alt not in alts:
+ continue
+ if isinstance(fnames, str):
+ fnames = [fnames]
+ with ExitStack() as stack:
+ fs = [stack.enter_context(open_upstream_file(name, fn, "r")) for fn in fnames]
+ g = Graph(directed=True)
+
+ for line in fs[0]:
+ if "#" in line:
+ continue
+ vals = line.split()
+ if len(vals) == 1 and int(vals[0]) >= g.num_vertices():
+ g.add_vertex(int(vals[0]) - g.num_vertices() + 1)
+ if len(vals) > 1:
+ g.add_edge(int(vals[0]), int(vals[1]))
+ yield alt, g