(self, dst_dir)
| 231 | self.embedx_graph = EmbedxGraph(nx_graph) |
| 232 | |
| 233 | def run(self, dst_dir): |
| 234 | if not os.path.isdir(dst_dir): |
| 235 | os.mkdir(dst_dir) |
| 236 | |
| 237 | def get_full_path(path): |
| 238 | return os.path.join(dst_dir, path) |
| 239 | |
| 240 | self.embedx_graph.write_context( |
| 241 | get_full_path(EmbedxGraphGenerator.CONTEXT_FILE_NAME)) |
| 242 | |
| 243 | self.embedx_graph.write_node_label( |
| 244 | get_full_path(EmbedxGraphGenerator.LABELS_FILE_NAME), |
| 245 | get_full_path(EmbedxGraphGenerator.TRAIN_LABELS_FILE_NAME), |
| 246 | get_full_path(EmbedxGraphGenerator.TEST_LABELS_FILE_NAME)) |
| 247 | |
| 248 | if self.embedx_graph.has_feature: |
| 249 | self.embedx_graph.write_node_feature( |
| 250 | get_full_path(EmbedxGraphGenerator.NODE_FEATURE_FILE_NAME), |
| 251 | get_full_path(EmbedxGraphGenerator.GROUP_CONFIG_FILE_NAME)) |
| 252 | |
| 253 | self.print_graph_statistics() |
| 254 | |
| 255 | def print_graph_statistics(self): |
| 256 | for stat in self.embedx_graph.statistics(): |
no test coverage detected