History of twitter_events
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] Add the date when each entry was added, and remove icon_hash beff7c9
The dates are those of the commits that first added the entries' files (2020-08-11 for the entries of the initial commit); renamed entries keep the date of their first name. Changed: none
diff --git a/entries/twitter_events/__init__.py b/entries/twitter_events/__init__.py
index 1b83666..04c7648 100644
--- a/entries/twitter_events/__init__.py
+++ b/entries/twitter_events/__init__.py
@@ -46,7 +46,7 @@ url = ['https://manliodedomenico.com/data.php',
'https://github.com/CoMuNeLab/SocialBursts']
citation = [('E. Omodei, M. De Domenico, and A. Arenas. "Characterizing interactions in online social networks during exceptional events." Front. Phys. 3, 59 (2015)', 'https://doi.org/10.3389/fphy.2015.00059'),
('M. De Domenico and E. G. Altmann, "Unraveling the origin of social bursts in collective attention." Sci. Rep. 10, 4629 (2020)', 'https://doi.org/10.1038/s41598-020-61523-z')]
-icon_hash = '56ce1af2a6d70217090cdb89'
+date_added = '2020-08-11'
upstream_license = ("Open Data Commons Open Database License (ODbL)",
"https://opendatacommons.org/licenses/odbl/")
upstream_prefix = 'https://manliodedomenico.com/data'
[entries] Prefix the properties in the descriptions with (Node), (Edge) or (Graph) bc3dbbd
The lists of properties at the end of the descriptions marked edge properties with "Edge" but left node properties unmarked, or grouped them in "Nodes: `a`, ...; `b`, ..." items, so the kind of a property was often unclear. Every item now starts with (Node), (Edge) or (Graph), followed by the property names, a colon and the explanation, one item per property or group of properties; qualifications (kinds of nodes, networks) follow the names in parentheses. Properties that were only named got a short explanation, and a few items that named the wrong kind of property were corrected.
diff --git a/entries/twitter_events/__init__.py b/entries/twitter_events/__init__.py
index 6a494da..1b83666 100644
--- a/entries/twitter_events/__init__.py
+++ b/entries/twitter_events/__init__.py
@@ -36,9 +36,9 @@ description = r"""Multiplex networks of interactions among Twitter users during
The networks have the following properties:
-- `name` and `nodeLabel`: the anonymous numerical identifier of the user.
-- `layer`: the type of interaction: 1 for retweets, 2 for mentions and 3 for replies.
-- `weight`: the number of interactions of the given type from user $i$ to user $j$ during the observation period.
+- (Node) `name` and `nodeLabel`: the anonymous numerical identifier of the user.
+- (Edge) `layer`: the type of interaction: 1 for retweets, 2 for mentions and 3 for replies.
+- (Edge) `weight`: the number of interactions of the given type from user $i$ to user $j$ during the observation period.
The upstream data also include the time of each individual interaction, which is not included in the networks."""
tags = ['Social', 'Online', 'Multilayer', 'Weighted']
[entries] Remove unneeded code from the entries 2c69f19
Unneeded "global files" statements, unused imports and variables, f-strings without placeholders, duplicate keys in foodweb_little_rock (keeping the order and the values used), and the second definition of get_lines() in twitter_higgs. Nothing changes in the networks or descriptions. Changed: none
diff --git a/entries/twitter_events/__init__.py b/entries/twitter_events/__init__.py
index 36988fd..6a494da 100644
--- a/entries/twitter_events/__init__.py
+++ b/entries/twitter_events/__init__.py
@@ -76,7 +76,6 @@ def fetch_upstream(force=False):
@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:
[entries] twitter_events: add seven events of De Domenico & Altmann (2020) 2d91576
The Boston Marathon bombing and the election of Pope Francis (2013), the NBA Finals and the Paris attacks (2015), and the announcement of gravitational waves, the Sanremo festival final and the UEFA Champions League final (2016), from the web site of the data, or, for the four no longer there, from the repository of the paper. The networks are tagged as weighted, since their weights are numbers of interactions. Changed: structure
diff --git a/entries/twitter_events/__init__.py b/entries/twitter_events/__init__.py
index 7c56f0b..36988fd 100644
--- a/entries/twitter_events/__init__.py
+++ b/entries/twitter_events/__init__.py
@@ -18,14 +18,21 @@
from .. import *
-title = "Twitter, 5 events (2013-2014)"
-description = r"""Multiplex networks of interactions among Twitter users during five exceptional events in 2013 and 2014, collected by E. Omodei, M. De Domenico and A. Arenas. Nodes are users (whose screen names are not provided), and a directed edge $i \to j$ indicates that user $i$ retweeted, mentioned or replied to user $j$ during the event. The networks have three layers, one for each type of interaction. Mentions include the users mentioned in retweeted or replied tweets: if user A retweets the tweet "hello @C @D" of user B, the edges A → B (retweet), A → C and A → D (mentions) are created.
+title = "Twitter, 12 events (2013-2016)"
+description = r"""Multiplex networks of interactions among Twitter users during twelve exceptional events between 2013 and 2016, collected by M. De Domenico and coworkers: five studied by E. Omodei, M. De Domenico and A. Arenas (2015), and seven more studied by M. De Domenico and E. G. Altmann (2020). Nodes are users (whose screen names are not provided), and a directed edge $i \to j$ indicates that user $i$ retweeted, mentioned or replied to user $j$ during the event. The networks have three layers, one for each type of interaction. Mentions include the users mentioned in retweeted or replied tweets: if user A retweets the tweet "hello @C @D" of user B, the edges A → B (retweet), A → C and A → D (mentions) are created.
- `Cannes2013`: the 2013 Cannes Film Festival (6 May to 3 June 2013).
- `MLKing2013`: the 50th anniversary of Martin Luther King's "I have a dream" speech (25 August to 2 September 2013).
- `MoscowAthletics2013`: the 2013 World Championships in Athletics in Moscow (5 to 19 August 2013).
- `NYClimateMarch2014`: the People's Climate March in New York City (19 to 22 September 2014).
- `ObamaInIsrael2013`: the visit of U.S. President Barack Obama to Israel (19 March to 3 April 2013).
+- `BostonBomb2013`: the Boston Marathon bombing and the subsequent manhunt (15 to 22 April 2013).
+- `PopeElection2013`: the election of Pope Francis (13 March 2013).
+- `NBAFinals2015`: the 2015 NBA Finals (9 to 21 June 2015).
+- `ParisAttack2015`: the November 2015 Paris attacks (13 to 15 November 2015).
+- `GravitationalWaves2016`: the announcement of the first observation of gravitational waves (10 to 16 February 2016).
+- `Sanremo2016`: the final night of the 2016 Sanremo Music Festival (13 February 2016).
+- `UCLFinal2016`: the 2016 UEFA Champions League Final (27 May to 1 June 2016).
The networks have the following properties:
@@ -34,22 +41,36 @@ The networks have the following properties:
- `weight`: the number of interactions of the given type from user $i$ to user $j$ during the observation period.
The upstream data also include the time of each individual interaction, which is not included in the networks."""
-tags = ['Social', 'Online', 'Multilayer', 'Unweighted']
-url = 'https://manliodedomenico.com/data.php'
-citation = [('E. Omodei, M. De Domenico, and A. Arenas. "Characterizing interactions in online social networks during exceptional events." Front. Phys. 3, 59 (2015)', 'https://doi.org/10.3389/fphy.2015.00059')]
+tags = ['Social', 'Online', 'Multilayer', 'Weighted']
+url = ['https://manliodedomenico.com/data.php',
+ 'https://github.com/CoMuNeLab/SocialBursts']
+citation = [('E. Omodei, M. De Domenico, and A. Arenas. "Characterizing interactions in online social networks during exceptional events." Front. Phys. 3, 59 (2015)', 'https://doi.org/10.3389/fphy.2015.00059'),
+ ('M. De Domenico and E. G. Altmann, "Unraveling the origin of social bursts in collective attention." Sci. Rep. 10, 4629 (2020)', 'https://doi.org/10.1038/s41598-020-61523-z')]
icon_hash = '56ce1af2a6d70217090cdb89'
upstream_license = ("Open Data Commons Open Database License (ODbL)",
"https://opendatacommons.org/licenses/odbl/")
upstream_prefix = 'https://manliodedomenico.com/data'
+# The events of De Domenico & Altmann (2020) that are no longer on the web
+# site, from the repository of the paper
+bursts_prefix = 'https://raw.githubusercontent.com/CoMuNeLab/SocialBursts/0d76b8f69284bba852dfc0731941c4376e968565/Network_Data'
files = [('NYClimateMarch2014_Multiplex_Social.zip', 'NYClimateMarch2014', 'comunelab'),
('Cannes2013_Multiplex_Social.zip', 'Cannes2013', 'comunelab'),
('MoscowAthletics2013_Multiplex_Social.zip','MoscowAthletics2013', 'comunelab'),
('MLKing2013_Multiplex_Social.zip', 'MLKing2013', 'comunelab'),
- ('ObamaInIsrael2013_Multiplex_Social.zip', 'ObamaInIsrael2013', 'comunelab')]
+ ('ObamaInIsrael2013_Multiplex_Social.zip', 'ObamaInIsrael2013', 'comunelab'),
+ ('BostonBomb2013_Multiplex_Social.zip', 'BostonBomb2013', 'comunelab'),
+ ('ParisAttack2015_Multiplex_Social.zip', 'ParisAttack2015', 'comunelab'),
+ ('PopeElection2013_Multiplex_Social.zip', 'PopeElection2013', 'comunelab'),
+ ('NBAFINALS2015_Multiplex_Social.zip', 'NBAFinals2015', 'comunelab'),
+ ('UCLFinal2016_Multiplex_Social.zip', 'UCLFinal2016', 'comunelab'),
+ ('GRAVITATIONAL_WAVES_2016_Multiplex_Social.zip', 'GravitationalWaves2016', 'comunelab'),
+ ('Sanremo2016_final_Multiplex_Social.zip', 'Sanremo2016', 'comunelab')]
+bursts_files = files[8:]
def fetch_upstream(force=False):
- return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
- force)
+ name = __name__.split(".")[-1]
+ fetch_upstream_files(name, upstream_prefix, files[:8], force)
+ return fetch_upstream_files(name, bursts_prefix, bursts_files, force)
@cache_network()
@coerce_props()
[entries] Fix parse bugs and improve the metadata of existing entries c996a0e
From a review of the dataset descriptions against the upstream sources and papers, and from user reports: - parse fixes (wrong edge direction or directedness, shifted or misnamed properties, merged node identities, duplicated or missing edges and nodes, wrong types), e.g. arxiv_citation (the HepTh dates were a copy of the HepPh ones; now from the KDD Cup 2003 data), eu_procurements, foursquare_global, hiv_transmission, genetic_multiplex, gnutella (adds the 05 snapshot), roadnet, macaque_neural, python_dependency - descriptions rewritten from the upstream sources, documenting every property - corrected titles, citations and DOIs, licences (ustream_license typo, the data's own terms), tags and ICON ids - url lists for entries with several sources or dataset pages - SocioPatterns entries moved to the site's new data location, with the daily networks of sp_infectious and sp_primary_school - the Michael Fire entries marked as orphans (served from the mirror) - redundant type forcings removed after the graph-tool coercion fixes
diff --git a/entries/twitter_events/__init__.py b/entries/twitter_events/__init__.py
index 6672d90..7c56f0b 100644
--- a/entries/twitter_events/__init__.py
+++ b/entries/twitter_events/__init__.py
@@ -19,8 +19,21 @@
from .. import *
title = "Twitter, 5 events (2013-2014)"
-description = """Various multiplex networks of retweets, mentions, and replies among Twitter users during specific events or occasions in 2013 and 2014.[^icon]
-[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
+description = r"""Multiplex networks of interactions among Twitter users during five exceptional events in 2013 and 2014, collected by E. Omodei, M. De Domenico and A. Arenas. Nodes are users (whose screen names are not provided), and a directed edge $i \to j$ indicates that user $i$ retweeted, mentioned or replied to user $j$ during the event. The networks have three layers, one for each type of interaction. Mentions include the users mentioned in retweeted or replied tweets: if user A retweets the tweet "hello @C @D" of user B, the edges A → B (retweet), A → C and A → D (mentions) are created.
+
+- `Cannes2013`: the 2013 Cannes Film Festival (6 May to 3 June 2013).
+- `MLKing2013`: the 50th anniversary of Martin Luther King's "I have a dream" speech (25 August to 2 September 2013).
+- `MoscowAthletics2013`: the 2013 World Championships in Athletics in Moscow (5 to 19 August 2013).
+- `NYClimateMarch2014`: the People's Climate March in New York City (19 to 22 September 2014).
+- `ObamaInIsrael2013`: the visit of U.S. President Barack Obama to Israel (19 March to 3 April 2013).
+
+The networks have the following properties:
+
+- `name` and `nodeLabel`: the anonymous numerical identifier of the user.
+- `layer`: the type of interaction: 1 for retweets, 2 for mentions and 3 for replies.
+- `weight`: the number of interactions of the given type from user $i$ to user $j$ during the observation period.
+
+The upstream data also include the time of each individual interaction, which is not included in the networks."""
tags = ['Social', 'Online', 'Multilayer', 'Unweighted']
url = 'https://manliodedomenico.com/data.php'
citation = [('E. Omodei, M. De Domenico, and A. Arenas. "Characterizing interactions in online social networks during exceptional events." Front. Phys. 3, 59 (2015)', 'https://doi.org/10.3389/fphy.2015.00059')]
Update copyright information 73a4f0d
diff --git a/entries/twitter_events/__init__.py b/entries/twitter_events/__init__.py
index 8ba7969..6672d90 100644
--- a/entries/twitter_events/__init__.py
+++ b/entries/twitter_events/__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/twitter_events/__init__.py b/entries/twitter_events/__init__.py
index 19d4c76..8ba7969 100644
--- a/entries/twitter_events/__init__.py
+++ b/entries/twitter_events/__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/twitter_events/__init__.py b/entries/twitter_events/__init__.py
index 9f4651e..19d4c76 100644
--- a/entries/twitter_events/__init__.py
+++ b/entries/twitter_events/__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
Update copyright info db2efcc
diff --git a/entries/twitter_events/__init__.py b/entries/twitter_events/__init__.py
index 290dae0..9f4651e 100644
--- a/entries/twitter_events/__init__.py
+++ b/entries/twitter_events/__init__.py
@@ -1,7 +1,7 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
-# Copyright (C) 2020 Tiago de Paula Peixoto <tiago@skewed.de>
+# 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
Update comunelab's datasets ddccc3b
diff --git a/entries/twitter_events/__init__.py b/entries/twitter_events/__init__.py
index 9d6f004..290dae0 100644
--- a/entries/twitter_events/__init__.py
+++ b/entries/twitter_events/__init__.py
@@ -22,12 +22,12 @@ title = "Twitter, 5 events (2013-2014)"
description = """Various multiplex networks of retweets, mentions, and replies among Twitter users during specific events or occasions in 2013 and 2014.[^icon]
[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
tags = ['Social', 'Online', 'Multilayer', 'Unweighted']
-url = 'https://comunelab.fbk.eu/data.php'
+url = 'https://manliodedomenico.com/data.php'
citation = [('E. Omodei, M. De Domenico, and A. Arenas. "Characterizing interactions in online social networks during exceptional events." Front. Phys. 3, 59 (2015)', 'https://doi.org/10.3389/fphy.2015.00059')]
icon_hash = '56ce1af2a6d70217090cdb89'
upstream_license = ("Open Data Commons Open Database License (ODbL)",
"https://opendatacommons.org/licenses/odbl/")
-upstream_prefix = 'https://comunelab.fbk.eu/data'
+upstream_prefix = 'https://manliodedomenico.com/data'
files = [('NYClimateMarch2014_Multiplex_Social.zip', 'NYClimateMarch2014', 'comunelab'),
('Cannes2013_Multiplex_Social.zip', 'Cannes2013', 'comunelab'),
('MoscowAthletics2013_Multiplex_Social.zip','MoscowAthletics2013', 'comunelab'),
Update citations to use DOIs e878874
diff --git a/entries/twitter_events/__init__.py b/entries/twitter_events/__init__.py
index 5ebc3fb..9d6f004 100644
--- a/entries/twitter_events/__init__.py
+++ b/entries/twitter_events/__init__.py
@@ -23,7 +23,7 @@ description = """Various multiplex networks of retweets, mentions, and replies a
[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
tags = ['Social', 'Online', 'Multilayer', 'Unweighted']
url = 'https://comunelab.fbk.eu/data.php'
-citation = [('E. Omodei, M. De Domenico, and A. Arenas. "Characterizing interactions in online social networks during exceptional events." Front. Phys. 3, 59 (2015)', 'http://journal.frontiersin.org/article/10.3389/fphy.2015.00059/abstract')]
+citation = [('E. Omodei, M. De Domenico, and A. Arenas. "Characterizing interactions in online social networks during exceptional events." Front. Phys. 3, 59 (2015)', 'https://doi.org/10.3389/fphy.2015.00059')]
icon_hash = '56ce1af2a6d70217090cdb89'
upstream_license = ("Open Data Commons Open Database License (ODbL)",
"https://opendatacommons.org/licenses/odbl/")
Change license from GPLv3 to AGPLv3 d754be5
diff --git a/entries/twitter_events/__init__.py b/entries/twitter_events/__init__.py
index e89fa14..5ebc3fb 100644
--- a/entries/twitter_events/__init__.py
+++ b/entries/twitter_events/__init__.py
@@ -3,18 +3,18 @@
#
# Copyright (C) 2020 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 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 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 General Public License for more details.
+# 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 General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# 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 *
Add explicit attribution to descriptions obtained from ICON 1645314
diff --git a/entries/twitter_events/__init__.py b/entries/twitter_events/__init__.py
index 5b3fe15..e89fa14 100644
--- a/entries/twitter_events/__init__.py
+++ b/entries/twitter_events/__init__.py
@@ -19,7 +19,8 @@
from .. import *
title = "Twitter, 5 events (2013-2014)"
-description = "Various multiplex networks of retweets, mentions, and replies among Twitter users during specific events or occasions in 2013 and 2014."
+description = """Various multiplex networks of retweets, mentions, and replies among Twitter users during specific events or occasions in 2013 and 2014.[^icon]
+[^icon]: Description obtained from the [ICON](https://icon.colorado.edu) project."""
tags = ['Social', 'Online', 'Multilayer', 'Unweighted']
url = 'https://comunelab.fbk.eu/data.php'
citation = [('E. Omodei, M. De Domenico, and A. Arenas. "Characterizing interactions in online social networks during exceptional events." Front. Phys. 3, 59 (2015)', 'http://journal.frontiersin.org/article/10.3389/fphy.2015.00059/abstract')]
Initial commit cc85872
diff --git a/entries/twitter_events/__init__.py b/entries/twitter_events/__init__.py
new file mode 100644
index 0000000..5b3fe15
--- /dev/null
+++ b/entries/twitter_events/__init__.py
@@ -0,0 +1,54 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2020 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 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+from .. import *
+
+title = "Twitter, 5 events (2013-2014)"
+description = "Various multiplex networks of retweets, mentions, and replies among Twitter users during specific events or occasions in 2013 and 2014."
+tags = ['Social', 'Online', 'Multilayer', 'Unweighted']
+url = 'https://comunelab.fbk.eu/data.php'
+citation = [('E. Omodei, M. De Domenico, and A. Arenas. "Characterizing interactions in online social networks during exceptional events." Front. Phys. 3, 59 (2015)', 'http://journal.frontiersin.org/article/10.3389/fphy.2015.00059/abstract')]
+icon_hash = '56ce1af2a6d70217090cdb89'
+upstream_license = ("Open Data Commons Open Database License (ODbL)",
+ "https://opendatacommons.org/licenses/odbl/")
+upstream_prefix = 'https://comunelab.fbk.eu/data'
+files = [('NYClimateMarch2014_Multiplex_Social.zip', 'NYClimateMarch2014', 'comunelab'),
+ ('Cannes2013_Multiplex_Social.zip', 'Cannes2013', 'comunelab'),
+ ('MoscowAthletics2013_Multiplex_Social.zip','MoscowAthletics2013', 'comunelab'),
+ ('MLKing2013_Multiplex_Social.zip', 'MLKing2013', 'comunelab'),
+ ('ObamaInIsrael2013_Multiplex_Social.zip', 'ObamaInIsrael2013', 'comunelab')]
+
+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, "rb")) for fn in fnames]
+ g = parse_graph(fs, fmt, directed=True)
+ yield alt, g