Coroutines¶
Coroutines containing the apps business logic.
A diagram showing all the interactions between these coroutines is available in the Driver documentation.
Data Sources¶
Coroutines for converting from source data to internal data.
-
stack_exchange_graph_data.coroutines.data_sources.
get_comment_links
(target: Generator) → Generator¶ Get all wanted links in comments.
-
stack_exchange_graph_data.coroutines.data_sources.
get_post_links
(link_target: Generator, node_target: Generator) → Generator¶ Get all wanted data from posts.
Gets all http links, and includes links from the parent post (question) to child posts (answer).
Includes all questions and answers in node output.
-
stack_exchange_graph_data.coroutines.data_sources.
load_comments
(site_name: str, target: Generator) → Generator¶ Read comments from external format into internal format.
-
stack_exchange_graph_data.coroutines.data_sources.
load_posts
(target: Generator) → Generator¶ Read posts from external format into internal format.
Links¶
Link coroutine control flow functions.
-
stack_exchange_graph_data.coroutines.links.
filter_duplicates
(target: Generator) → Generator¶ Remove duplicate links from the output.
-
stack_exchange_graph_data.coroutines.links.
filter_links
(domains: Set[str], target: Generator) → Generator¶ Filter links to links to posts on the provided site.
-
stack_exchange_graph_data.coroutines.links.
filter_network_size
(arguments: argparse.Namespace, target: Generator) → Generator¶ Filter networks that aren’t the wanted size.
- Parameters
arguments – CLI parser arguments that dictate the min and max size.
-
stack_exchange_graph_data.coroutines.links.
handle_links
(filter_: Generator, good: Generator) → Generator¶ Send http and id links to correct target.
-
stack_exchange_graph_data.coroutines.links.
sheet_prep
(target: Generator) → Generator¶ Convert into the format required to be sent to disk.