okstra 0.114.0 → 0.115.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/kr/architecture.md +2 -2
- package/docs/kr/follow-ups/2026-07-10-final-report-option-3.md +51 -0
- package/package.json +1 -1
- package/runtime/BUILD.json +2 -2
- package/runtime/agents/workers/report-writer-worker.md +1 -0
- package/runtime/prompts/lead/okstra-lead-contract.md +1 -1
- package/runtime/python/okstra_ctl/implementation_stage.py +46 -39
- package/runtime/python/okstra_ctl/report_views.py +151 -12
- package/runtime/python/okstra_ctl/run.py +24 -24
- package/runtime/python/okstra_ctl/worktree.py +1 -1
- package/runtime/python/okstra_token_usage/claude.py +58 -19
- package/runtime/python/okstra_token_usage/collect.py +3 -1
- package/runtime/python/okstra_vendor/__init__.py +3 -0
- package/runtime/schemas/final-report-v1.0.schema.json +20 -0
- package/runtime/templates/reports/final-report.template.md +14 -0
- package/runtime/templates/reports/i18n/en.json +23 -12
- package/runtime/templates/reports/i18n/ko.json +23 -12
- package/runtime/templates/reports/report.css +55 -0
- package/runtime/templates/reports/report.js +53 -1
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_approx_clust_coeff.py +0 -41
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_clique.py +0 -112
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_connectivity.py +0 -199
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_density.py +0 -146
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_distance_measures.py +0 -59
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_dominating_set.py +0 -78
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_kcomponents.py +0 -303
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_matching.py +0 -8
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_maxcut.py +0 -94
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_ramsey.py +0 -31
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_steinertree.py +0 -306
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_traveling_salesman.py +0 -1014
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_treewidth.py +0 -274
- package/runtime/python/okstra_vendor/networkx/algorithms/approximation/tests/test_vertex_cover.py +0 -68
- package/runtime/python/okstra_vendor/networkx/algorithms/assortativity/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/assortativity/tests/base_test.py +0 -81
- package/runtime/python/okstra_vendor/networkx/algorithms/assortativity/tests/test_connectivity.py +0 -143
- package/runtime/python/okstra_vendor/networkx/algorithms/assortativity/tests/test_correlation.py +0 -122
- package/runtime/python/okstra_vendor/networkx/algorithms/assortativity/tests/test_mixing.py +0 -174
- package/runtime/python/okstra_vendor/networkx/algorithms/assortativity/tests/test_neighbor_degree.py +0 -107
- package/runtime/python/okstra_vendor/networkx/algorithms/assortativity/tests/test_pairs.py +0 -87
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_basic.py +0 -125
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_centrality.py +0 -192
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_cluster.py +0 -84
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_covering.py +0 -33
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_edgelist.py +0 -240
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_extendability.py +0 -334
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_generators.py +0 -407
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_link_analysis.py +0 -218
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_matching.py +0 -327
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_matrix.py +0 -138
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_project.py +0 -409
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_redundancy.py +0 -35
- package/runtime/python/okstra_vendor/networkx/algorithms/bipartite/tests/test_spectral_bipartivity.py +0 -80
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_betweenness_centrality.py +0 -923
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_betweenness_centrality_subset.py +0 -354
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_closeness_centrality.py +0 -274
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_current_flow_betweenness_centrality.py +0 -259
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_current_flow_betweenness_centrality_subset.py +0 -147
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_current_flow_closeness.py +0 -43
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_degree_centrality.py +0 -144
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_dispersion.py +0 -73
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_eigenvector_centrality.py +0 -186
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_group.py +0 -277
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_harmonic_centrality.py +0 -122
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_katz_centrality.py +0 -345
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_laplacian_centrality.py +0 -220
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_load_centrality.py +0 -344
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_percolation_centrality.py +0 -87
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_reaching.py +0 -140
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_second_order_centrality.py +0 -82
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_subgraph.py +0 -110
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_trophic.py +0 -302
- package/runtime/python/okstra_vendor/networkx/algorithms/centrality/tests/test_voterank.py +0 -64
- package/runtime/python/okstra_vendor/networkx/algorithms/coloring/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/coloring/tests/test_coloring.py +0 -863
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_asyn_fluid.py +0 -147
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_bipartitions.py +0 -157
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_centrality.py +0 -85
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_divisive.py +0 -106
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_kclique.py +0 -91
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_label_propagation.py +0 -241
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_leiden.py +0 -138
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_local.py +0 -76
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_louvain.py +0 -264
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_lukes.py +0 -152
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_modularity_max.py +0 -340
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_quality.py +0 -139
- package/runtime/python/okstra_vendor/networkx/algorithms/community/tests/test_utils.py +0 -26
- package/runtime/python/okstra_vendor/networkx/algorithms/components/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/components/tests/test_attracting.py +0 -70
- package/runtime/python/okstra_vendor/networkx/algorithms/components/tests/test_biconnected.py +0 -248
- package/runtime/python/okstra_vendor/networkx/algorithms/components/tests/test_connected.py +0 -138
- package/runtime/python/okstra_vendor/networkx/algorithms/components/tests/test_semiconnected.py +0 -55
- package/runtime/python/okstra_vendor/networkx/algorithms/components/tests/test_strongly_connected.py +0 -193
- package/runtime/python/okstra_vendor/networkx/algorithms/components/tests/test_weakly_connected.py +0 -96
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/tests/test_connectivity.py +0 -421
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/tests/test_cuts.py +0 -309
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/tests/test_disjoint_paths.py +0 -249
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/tests/test_edge_augmentation.py +0 -502
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/tests/test_edge_kcomponents.py +0 -488
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/tests/test_kcomponents.py +0 -323
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/tests/test_kcutsets.py +0 -280
- package/runtime/python/okstra_vendor/networkx/algorithms/connectivity/tests/test_stoer_wagner.py +0 -102
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/tests/gl1.gpickle.bz2 +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/tests/gw1.gpickle.bz2 +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/tests/netgen-2.gpickle.bz2 +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/tests/test_gomory_hu.py +0 -128
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/tests/test_maxflow.py +0 -573
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/tests/test_maxflow_large_graph.py +0 -155
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/tests/test_mincost.py +0 -475
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/tests/test_networksimplex.py +0 -481
- package/runtime/python/okstra_vendor/networkx/algorithms/flow/tests/wlm3.gpickle.bz2 +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/iso_r01_s80.A99 +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/iso_r01_s80.B99 +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/si2_b06_m200.A99 +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/si2_b06_m200.B99 +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/test_ismags.py +0 -719
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/test_isomorphism.py +0 -103
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/test_isomorphvf2.py +0 -490
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/test_match_helpers.py +0 -64
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/test_temporalisomorphvf2.py +0 -212
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/test_tree_isomorphism.py +0 -202
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/test_vf2pp.py +0 -1655
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/test_vf2pp_helpers.py +0 -3118
- package/runtime/python/okstra_vendor/networkx/algorithms/isomorphism/tests/test_vf2userfunc.py +0 -196
- package/runtime/python/okstra_vendor/networkx/algorithms/link_analysis/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/link_analysis/tests/test_hits.py +0 -77
- package/runtime/python/okstra_vendor/networkx/algorithms/link_analysis/tests/test_pagerank.py +0 -213
- package/runtime/python/okstra_vendor/networkx/algorithms/minors/tests/test_contraction.py +0 -544
- package/runtime/python/okstra_vendor/networkx/algorithms/operators/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/operators/tests/test_all.py +0 -328
- package/runtime/python/okstra_vendor/networkx/algorithms/operators/tests/test_binary.py +0 -451
- package/runtime/python/okstra_vendor/networkx/algorithms/operators/tests/test_product.py +0 -491
- package/runtime/python/okstra_vendor/networkx/algorithms/operators/tests/test_unary.py +0 -55
- package/runtime/python/okstra_vendor/networkx/algorithms/shortest_paths/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/shortest_paths/tests/test_astar.py +0 -254
- package/runtime/python/okstra_vendor/networkx/algorithms/shortest_paths/tests/test_dense.py +0 -212
- package/runtime/python/okstra_vendor/networkx/algorithms/shortest_paths/tests/test_dense_numpy.py +0 -88
- package/runtime/python/okstra_vendor/networkx/algorithms/shortest_paths/tests/test_generic.py +0 -511
- package/runtime/python/okstra_vendor/networkx/algorithms/shortest_paths/tests/test_unweighted.py +0 -149
- package/runtime/python/okstra_vendor/networkx/algorithms/shortest_paths/tests/test_weighted.py +0 -983
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_asteroidal.py +0 -23
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_boundary.py +0 -154
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_bridges.py +0 -144
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_broadcasting.py +0 -109
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_chains.py +0 -136
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_chordal.py +0 -129
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_clique.py +0 -300
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_cluster.py +0 -678
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_communicability.py +0 -80
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_core.py +0 -266
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_covering.py +0 -85
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_cuts.py +0 -171
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_cycles.py +0 -984
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_d_separation.py +0 -340
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_dag.py +0 -835
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_distance_measures.py +0 -831
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_distance_regular.py +0 -85
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_dominance.py +0 -299
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_dominating.py +0 -115
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_efficiency.py +0 -58
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_euler.py +0 -314
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_graph_hashing.py +0 -872
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_graphical.py +0 -163
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_hierarchy.py +0 -46
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_hybrid.py +0 -24
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_isolate.py +0 -26
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_link_prediction.py +0 -615
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_lowest_common_ancestors.py +0 -459
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_matching.py +0 -556
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_max_weight_clique.py +0 -179
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_mis.py +0 -62
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_moral.py +0 -15
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_node_classification.py +0 -140
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_non_randomness.py +0 -60
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_perfect_graph.py +0 -27
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_planar_drawing.py +0 -274
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_planarity.py +0 -556
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_polynomials.py +0 -57
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_reciprocity.py +0 -37
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_regular.py +0 -88
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_richclub.py +0 -149
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_similarity.py +0 -1158
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_simple_paths.py +0 -803
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_smallworld.py +0 -76
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_smetric.py +0 -8
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_sparsifiers.py +0 -138
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_structuralholes.py +0 -191
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_summarization.py +0 -642
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_swap.py +0 -179
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_threshold.py +0 -270
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_time_dependent.py +0 -431
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_tournament.py +0 -161
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_triads.py +0 -248
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_vitality.py +0 -41
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_voronoi.py +0 -103
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_walks.py +0 -54
- package/runtime/python/okstra_vendor/networkx/algorithms/tests/test_wiener.py +0 -157
- package/runtime/python/okstra_vendor/networkx/algorithms/traversal/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/traversal/tests/test_beamsearch.py +0 -25
- package/runtime/python/okstra_vendor/networkx/algorithms/traversal/tests/test_bfs.py +0 -203
- package/runtime/python/okstra_vendor/networkx/algorithms/traversal/tests/test_dfs.py +0 -307
- package/runtime/python/okstra_vendor/networkx/algorithms/traversal/tests/test_edgebfs.py +0 -147
- package/runtime/python/okstra_vendor/networkx/algorithms/traversal/tests/test_edgedfs.py +0 -131
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/tests/test_branchings.py +0 -624
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/tests/test_coding.py +0 -114
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/tests/test_decomposition.py +0 -79
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/tests/test_distance_measures.py +0 -99
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/tests/test_mst.py +0 -934
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/tests/test_operations.py +0 -53
- package/runtime/python/okstra_vendor/networkx/algorithms/tree/tests/test_recognition.py +0 -174
- package/runtime/python/okstra_vendor/networkx/classes/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/classes/tests/dispatch_interface.py +0 -192
- package/runtime/python/okstra_vendor/networkx/classes/tests/historical_tests.py +0 -476
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_coreviews.py +0 -362
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_digraph.py +0 -331
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_digraph_historical.py +0 -110
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_filters.py +0 -177
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_function.py +0 -1045
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_graph.py +0 -950
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_graph_historical.py +0 -12
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_graphviews.py +0 -349
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_multidigraph.py +0 -459
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_multigraph.py +0 -528
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_reportviews.py +0 -1421
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_special.py +0 -131
- package/runtime/python/okstra_vendor/networkx/classes/tests/test_subgraphviews.py +0 -371
- package/runtime/python/okstra_vendor/networkx/conftest.py +0 -261
- package/runtime/python/okstra_vendor/networkx/drawing/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/drawing/tests/baseline/test_display_complex.png +0 -0
- package/runtime/python/okstra_vendor/networkx/drawing/tests/baseline/test_display_empty_graph.png +0 -0
- package/runtime/python/okstra_vendor/networkx/drawing/tests/baseline/test_display_house_with_colors.png +0 -0
- package/runtime/python/okstra_vendor/networkx/drawing/tests/baseline/test_display_labels_and_colors.png +0 -0
- package/runtime/python/okstra_vendor/networkx/drawing/tests/baseline/test_display_shortest_path.png +0 -0
- package/runtime/python/okstra_vendor/networkx/drawing/tests/baseline/test_house_with_colors.png +0 -0
- package/runtime/python/okstra_vendor/networkx/drawing/tests/test_agraph.py +0 -237
- package/runtime/python/okstra_vendor/networkx/drawing/tests/test_image_comparison_pylab_mpl.py +0 -229
- package/runtime/python/okstra_vendor/networkx/drawing/tests/test_latex.py +0 -285
- package/runtime/python/okstra_vendor/networkx/drawing/tests/test_layout.py +0 -631
- package/runtime/python/okstra_vendor/networkx/drawing/tests/test_pydot.py +0 -146
- package/runtime/python/okstra_vendor/networkx/drawing/tests/test_pylab.py +0 -1582
- package/runtime/python/okstra_vendor/networkx/generators/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_atlas.py +0 -75
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_classic.py +0 -642
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_cographs.py +0 -20
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_community.py +0 -362
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_degree_seq.py +0 -224
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_directed.py +0 -189
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_duplication.py +0 -103
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_ego.py +0 -39
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_expanders.py +0 -182
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_geometric.py +0 -488
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_harary_graph.py +0 -133
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_internet_as_graphs.py +0 -221
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_intersection.py +0 -28
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_interval_graph.py +0 -144
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_joint_degree_seq.py +0 -125
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_lattice.py +0 -264
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_line.py +0 -316
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_mycielski.py +0 -30
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_nonisomorphic_trees.py +0 -82
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_random_clustered.py +0 -33
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_random_graphs.py +0 -495
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_small.py +0 -220
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_spectral_graph_forge.py +0 -49
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_stochastic.py +0 -72
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_sudoku.py +0 -92
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_time_series.py +0 -64
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_trees.py +0 -195
- package/runtime/python/okstra_vendor/networkx/generators/tests/test_triads.py +0 -15
- package/runtime/python/okstra_vendor/networkx/linalg/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/linalg/tests/test_algebraic_connectivity.py +0 -400
- package/runtime/python/okstra_vendor/networkx/linalg/tests/test_attrmatrix.py +0 -108
- package/runtime/python/okstra_vendor/networkx/linalg/tests/test_bethehessian.py +0 -40
- package/runtime/python/okstra_vendor/networkx/linalg/tests/test_graphmatrix.py +0 -275
- package/runtime/python/okstra_vendor/networkx/linalg/tests/test_laplacian.py +0 -334
- package/runtime/python/okstra_vendor/networkx/linalg/tests/test_modularity.py +0 -86
- package/runtime/python/okstra_vendor/networkx/linalg/tests/test_spectrum.py +0 -70
- package/runtime/python/okstra_vendor/networkx/readwrite/json_graph/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/json_graph/tests/test_adjacency.py +0 -78
- package/runtime/python/okstra_vendor/networkx/readwrite/json_graph/tests/test_cytoscape.py +0 -78
- package/runtime/python/okstra_vendor/networkx/readwrite/json_graph/tests/test_node_link.py +0 -109
- package/runtime/python/okstra_vendor/networkx/readwrite/json_graph/tests/test_tree.py +0 -48
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/test_adjlist.py +0 -354
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/test_edgelist.py +0 -318
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/test_gexf.py +0 -612
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/test_gml.py +0 -744
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/test_graph6.py +0 -181
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/test_graphml.py +0 -1531
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/test_leda.py +0 -30
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/test_p2g.py +0 -63
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/test_pajek.py +0 -128
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/test_sparse6.py +0 -166
- package/runtime/python/okstra_vendor/networkx/readwrite/tests/test_text.py +0 -1742
- package/runtime/python/okstra_vendor/networkx/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/tests/test_all_random_functions.py +0 -248
- package/runtime/python/okstra_vendor/networkx/tests/test_convert.py +0 -321
- package/runtime/python/okstra_vendor/networkx/tests/test_convert_numpy.py +0 -531
- package/runtime/python/okstra_vendor/networkx/tests/test_convert_pandas.py +0 -349
- package/runtime/python/okstra_vendor/networkx/tests/test_convert_scipy.py +0 -281
- package/runtime/python/okstra_vendor/networkx/tests/test_exceptions.py +0 -40
- package/runtime/python/okstra_vendor/networkx/tests/test_import.py +0 -11
- package/runtime/python/okstra_vendor/networkx/tests/test_lazy_imports.py +0 -96
- package/runtime/python/okstra_vendor/networkx/tests/test_relabel.py +0 -349
- package/runtime/python/okstra_vendor/networkx/tests/test_removed_functions_exception_messages.py +0 -8
- package/runtime/python/okstra_vendor/networkx/utils/tests/__init__.py +0 -0
- package/runtime/python/okstra_vendor/networkx/utils/tests/test__init.py +0 -11
- package/runtime/python/okstra_vendor/networkx/utils/tests/test_backends.py +0 -225
- package/runtime/python/okstra_vendor/networkx/utils/tests/test_config.py +0 -263
- package/runtime/python/okstra_vendor/networkx/utils/tests/test_decorators.py +0 -510
- package/runtime/python/okstra_vendor/networkx/utils/tests/test_heaps.py +0 -131
- package/runtime/python/okstra_vendor/networkx/utils/tests/test_mapped_queue.py +0 -268
- package/runtime/python/okstra_vendor/networkx/utils/tests/test_misc.py +0 -393
- package/runtime/python/okstra_vendor/networkx/utils/tests/test_random_sequence.py +0 -53
- package/runtime/python/okstra_vendor/networkx/utils/tests/test_rcm.py +0 -63
- package/runtime/python/okstra_vendor/networkx/utils/tests/test_unionfind.py +0 -55
package/runtime/python/okstra_vendor/networkx/algorithms/components/tests/test_biconnected.py
DELETED
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
import pytest
|
|
2
|
-
|
|
3
|
-
import networkx as nx
|
|
4
|
-
from networkx import NetworkXNotImplemented
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
def assert_components_edges_equal(x, y):
|
|
8
|
-
sx = {frozenset(frozenset(e) for e in c) for c in x}
|
|
9
|
-
sy = {frozenset(frozenset(e) for e in c) for c in y}
|
|
10
|
-
assert sx == sy
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def assert_components_equal(x, y):
|
|
14
|
-
sx = {frozenset(c) for c in x}
|
|
15
|
-
sy = {frozenset(c) for c in y}
|
|
16
|
-
assert sx == sy
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
def test_barbell():
|
|
20
|
-
G = nx.barbell_graph(8, 4)
|
|
21
|
-
nx.add_path(G, [7, 20, 21, 22])
|
|
22
|
-
nx.add_cycle(G, [22, 23, 24, 25])
|
|
23
|
-
pts = set(nx.articulation_points(G))
|
|
24
|
-
assert pts == {7, 8, 9, 10, 11, 12, 20, 21, 22}
|
|
25
|
-
|
|
26
|
-
answer = [
|
|
27
|
-
{12, 13, 14, 15, 16, 17, 18, 19},
|
|
28
|
-
{0, 1, 2, 3, 4, 5, 6, 7},
|
|
29
|
-
{22, 23, 24, 25},
|
|
30
|
-
{11, 12},
|
|
31
|
-
{10, 11},
|
|
32
|
-
{9, 10},
|
|
33
|
-
{8, 9},
|
|
34
|
-
{7, 8},
|
|
35
|
-
{21, 22},
|
|
36
|
-
{20, 21},
|
|
37
|
-
{7, 20},
|
|
38
|
-
]
|
|
39
|
-
assert_components_equal(list(nx.biconnected_components(G)), answer)
|
|
40
|
-
|
|
41
|
-
G.add_edge(2, 17)
|
|
42
|
-
pts = set(nx.articulation_points(G))
|
|
43
|
-
assert pts == {7, 20, 21, 22}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
def test_articulation_points_repetitions():
|
|
47
|
-
G = nx.Graph()
|
|
48
|
-
G.add_edges_from([(0, 1), (1, 2), (1, 3)])
|
|
49
|
-
assert list(nx.articulation_points(G)) == [1]
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
def test_articulation_points_cycle():
|
|
53
|
-
G = nx.cycle_graph(3)
|
|
54
|
-
nx.add_cycle(G, [1, 3, 4])
|
|
55
|
-
pts = set(nx.articulation_points(G))
|
|
56
|
-
assert pts == {1}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
def test_is_biconnected():
|
|
60
|
-
G = nx.cycle_graph(3)
|
|
61
|
-
assert nx.is_biconnected(G)
|
|
62
|
-
nx.add_cycle(G, [1, 3, 4])
|
|
63
|
-
assert not nx.is_biconnected(G)
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
def test_empty_is_biconnected():
|
|
67
|
-
G = nx.empty_graph(5)
|
|
68
|
-
assert not nx.is_biconnected(G)
|
|
69
|
-
G.add_edge(0, 1)
|
|
70
|
-
assert not nx.is_biconnected(G)
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
def test_biconnected_components_cycle():
|
|
74
|
-
G = nx.cycle_graph(3)
|
|
75
|
-
nx.add_cycle(G, [1, 3, 4])
|
|
76
|
-
answer = [{0, 1, 2}, {1, 3, 4}]
|
|
77
|
-
assert_components_equal(list(nx.biconnected_components(G)), answer)
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
def test_biconnected_components1():
|
|
81
|
-
# graph example from
|
|
82
|
-
# https://web.archive.org/web/20121229123447/http://www.ibluemojo.com/school/articul_algorithm.html
|
|
83
|
-
edges = [
|
|
84
|
-
(0, 1),
|
|
85
|
-
(0, 5),
|
|
86
|
-
(0, 6),
|
|
87
|
-
(0, 14),
|
|
88
|
-
(1, 5),
|
|
89
|
-
(1, 6),
|
|
90
|
-
(1, 14),
|
|
91
|
-
(2, 4),
|
|
92
|
-
(2, 10),
|
|
93
|
-
(3, 4),
|
|
94
|
-
(3, 15),
|
|
95
|
-
(4, 6),
|
|
96
|
-
(4, 7),
|
|
97
|
-
(4, 10),
|
|
98
|
-
(5, 14),
|
|
99
|
-
(6, 14),
|
|
100
|
-
(7, 9),
|
|
101
|
-
(8, 9),
|
|
102
|
-
(8, 12),
|
|
103
|
-
(8, 13),
|
|
104
|
-
(10, 15),
|
|
105
|
-
(11, 12),
|
|
106
|
-
(11, 13),
|
|
107
|
-
(12, 13),
|
|
108
|
-
]
|
|
109
|
-
G = nx.Graph(edges)
|
|
110
|
-
pts = set(nx.articulation_points(G))
|
|
111
|
-
assert pts == {4, 6, 7, 8, 9}
|
|
112
|
-
comps = list(nx.biconnected_component_edges(G))
|
|
113
|
-
answer = [
|
|
114
|
-
[(3, 4), (15, 3), (10, 15), (10, 4), (2, 10), (4, 2)],
|
|
115
|
-
[(13, 12), (13, 8), (11, 13), (12, 11), (8, 12)],
|
|
116
|
-
[(9, 8)],
|
|
117
|
-
[(7, 9)],
|
|
118
|
-
[(4, 7)],
|
|
119
|
-
[(6, 4)],
|
|
120
|
-
[(14, 0), (5, 1), (5, 0), (14, 5), (14, 1), (6, 14), (6, 0), (1, 6), (0, 1)],
|
|
121
|
-
]
|
|
122
|
-
assert_components_edges_equal(comps, answer)
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
def test_biconnected_components2():
|
|
126
|
-
G = nx.Graph()
|
|
127
|
-
nx.add_cycle(G, "ABC")
|
|
128
|
-
nx.add_cycle(G, "CDE")
|
|
129
|
-
nx.add_cycle(G, "FIJHG")
|
|
130
|
-
nx.add_cycle(G, "GIJ")
|
|
131
|
-
G.add_edge("E", "G")
|
|
132
|
-
comps = list(nx.biconnected_component_edges(G))
|
|
133
|
-
answer = [
|
|
134
|
-
[
|
|
135
|
-
tuple("GF"),
|
|
136
|
-
tuple("FI"),
|
|
137
|
-
tuple("IG"),
|
|
138
|
-
tuple("IJ"),
|
|
139
|
-
tuple("JG"),
|
|
140
|
-
tuple("JH"),
|
|
141
|
-
tuple("HG"),
|
|
142
|
-
],
|
|
143
|
-
[tuple("EG")],
|
|
144
|
-
[tuple("CD"), tuple("DE"), tuple("CE")],
|
|
145
|
-
[tuple("AB"), tuple("BC"), tuple("AC")],
|
|
146
|
-
]
|
|
147
|
-
assert_components_edges_equal(comps, answer)
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
def test_biconnected_davis():
|
|
151
|
-
D = nx.davis_southern_women_graph()
|
|
152
|
-
bcc = list(nx.biconnected_components(D))[0]
|
|
153
|
-
assert set(D) == bcc # All nodes in a giant bicomponent
|
|
154
|
-
# So no articulation points
|
|
155
|
-
assert len(list(nx.articulation_points(D))) == 0
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
def test_biconnected_karate():
|
|
159
|
-
K = nx.karate_club_graph()
|
|
160
|
-
answer = [
|
|
161
|
-
{
|
|
162
|
-
0,
|
|
163
|
-
1,
|
|
164
|
-
2,
|
|
165
|
-
3,
|
|
166
|
-
7,
|
|
167
|
-
8,
|
|
168
|
-
9,
|
|
169
|
-
12,
|
|
170
|
-
13,
|
|
171
|
-
14,
|
|
172
|
-
15,
|
|
173
|
-
17,
|
|
174
|
-
18,
|
|
175
|
-
19,
|
|
176
|
-
20,
|
|
177
|
-
21,
|
|
178
|
-
22,
|
|
179
|
-
23,
|
|
180
|
-
24,
|
|
181
|
-
25,
|
|
182
|
-
26,
|
|
183
|
-
27,
|
|
184
|
-
28,
|
|
185
|
-
29,
|
|
186
|
-
30,
|
|
187
|
-
31,
|
|
188
|
-
32,
|
|
189
|
-
33,
|
|
190
|
-
},
|
|
191
|
-
{0, 4, 5, 6, 10, 16},
|
|
192
|
-
{0, 11},
|
|
193
|
-
]
|
|
194
|
-
bcc = list(nx.biconnected_components(K))
|
|
195
|
-
assert_components_equal(bcc, answer)
|
|
196
|
-
assert set(nx.articulation_points(K)) == {0}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
def test_biconnected_eppstein():
|
|
200
|
-
# tests from http://www.ics.uci.edu/~eppstein/PADS/Biconnectivity.py
|
|
201
|
-
G1 = nx.Graph(
|
|
202
|
-
{
|
|
203
|
-
0: [1, 2, 5],
|
|
204
|
-
1: [0, 5],
|
|
205
|
-
2: [0, 3, 4],
|
|
206
|
-
3: [2, 4, 5, 6],
|
|
207
|
-
4: [2, 3, 5, 6],
|
|
208
|
-
5: [0, 1, 3, 4],
|
|
209
|
-
6: [3, 4],
|
|
210
|
-
}
|
|
211
|
-
)
|
|
212
|
-
G2 = nx.Graph(
|
|
213
|
-
{
|
|
214
|
-
0: [2, 5],
|
|
215
|
-
1: [3, 8],
|
|
216
|
-
2: [0, 3, 5],
|
|
217
|
-
3: [1, 2, 6, 8],
|
|
218
|
-
4: [7],
|
|
219
|
-
5: [0, 2],
|
|
220
|
-
6: [3, 8],
|
|
221
|
-
7: [4],
|
|
222
|
-
8: [1, 3, 6],
|
|
223
|
-
}
|
|
224
|
-
)
|
|
225
|
-
assert nx.is_biconnected(G1)
|
|
226
|
-
assert not nx.is_biconnected(G2)
|
|
227
|
-
answer_G2 = [{1, 3, 6, 8}, {0, 2, 5}, {2, 3}, {4, 7}]
|
|
228
|
-
bcc = list(nx.biconnected_components(G2))
|
|
229
|
-
assert_components_equal(bcc, answer_G2)
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
def test_null_graph():
|
|
233
|
-
G = nx.Graph()
|
|
234
|
-
assert not nx.is_biconnected(G)
|
|
235
|
-
assert list(nx.biconnected_components(G)) == []
|
|
236
|
-
assert list(nx.biconnected_component_edges(G)) == []
|
|
237
|
-
assert list(nx.articulation_points(G)) == []
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
def test_connected_raise():
|
|
241
|
-
DG = nx.DiGraph()
|
|
242
|
-
with pytest.raises(NetworkXNotImplemented):
|
|
243
|
-
next(nx.biconnected_components(DG))
|
|
244
|
-
with pytest.raises(NetworkXNotImplemented):
|
|
245
|
-
next(nx.biconnected_component_edges(DG))
|
|
246
|
-
with pytest.raises(NetworkXNotImplemented):
|
|
247
|
-
next(nx.articulation_points(DG))
|
|
248
|
-
pytest.raises(NetworkXNotImplemented, nx.is_biconnected, DG)
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import pytest
|
|
2
|
-
|
|
3
|
-
import networkx as nx
|
|
4
|
-
from networkx import NetworkXNotImplemented
|
|
5
|
-
from networkx import convert_node_labels_to_integers as cnlti
|
|
6
|
-
from networkx.classes.tests import dispatch_interface
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class TestConnected:
|
|
10
|
-
@classmethod
|
|
11
|
-
def setup_class(cls):
|
|
12
|
-
G1 = cnlti(nx.grid_2d_graph(2, 2), first_label=0, ordering="sorted")
|
|
13
|
-
G2 = cnlti(nx.lollipop_graph(3, 3), first_label=4, ordering="sorted")
|
|
14
|
-
G3 = cnlti(nx.house_graph(), first_label=10, ordering="sorted")
|
|
15
|
-
cls.G = nx.union(G1, G2)
|
|
16
|
-
cls.G = nx.union(cls.G, G3)
|
|
17
|
-
cls.DG = nx.DiGraph([(1, 2), (1, 3), (2, 3)])
|
|
18
|
-
cls.grid = cnlti(nx.grid_2d_graph(4, 4), first_label=1)
|
|
19
|
-
|
|
20
|
-
cls.gc = []
|
|
21
|
-
G = nx.DiGraph()
|
|
22
|
-
G.add_edges_from(
|
|
23
|
-
[
|
|
24
|
-
(1, 2),
|
|
25
|
-
(2, 3),
|
|
26
|
-
(2, 8),
|
|
27
|
-
(3, 4),
|
|
28
|
-
(3, 7),
|
|
29
|
-
(4, 5),
|
|
30
|
-
(5, 3),
|
|
31
|
-
(5, 6),
|
|
32
|
-
(7, 4),
|
|
33
|
-
(7, 6),
|
|
34
|
-
(8, 1),
|
|
35
|
-
(8, 7),
|
|
36
|
-
]
|
|
37
|
-
)
|
|
38
|
-
C = [[3, 4, 5, 7], [1, 2, 8], [6]]
|
|
39
|
-
cls.gc.append((G, C))
|
|
40
|
-
|
|
41
|
-
G = nx.DiGraph()
|
|
42
|
-
G.add_edges_from([(1, 2), (1, 3), (1, 4), (4, 2), (3, 4), (2, 3)])
|
|
43
|
-
C = [[2, 3, 4], [1]]
|
|
44
|
-
cls.gc.append((G, C))
|
|
45
|
-
|
|
46
|
-
G = nx.DiGraph()
|
|
47
|
-
G.add_edges_from([(1, 2), (2, 3), (3, 2), (2, 1)])
|
|
48
|
-
C = [[1, 2, 3]]
|
|
49
|
-
cls.gc.append((G, C))
|
|
50
|
-
|
|
51
|
-
# Eppstein's tests
|
|
52
|
-
G = nx.DiGraph({0: [1], 1: [2, 3], 2: [4, 5], 3: [4, 5], 4: [6], 5: [], 6: []})
|
|
53
|
-
C = [[0], [1], [2], [3], [4], [5], [6]]
|
|
54
|
-
cls.gc.append((G, C))
|
|
55
|
-
|
|
56
|
-
G = nx.DiGraph({0: [1], 1: [2, 3, 4], 2: [0, 3], 3: [4], 4: [3]})
|
|
57
|
-
C = [[0, 1, 2], [3, 4]]
|
|
58
|
-
cls.gc.append((G, C))
|
|
59
|
-
|
|
60
|
-
G = nx.DiGraph()
|
|
61
|
-
C = []
|
|
62
|
-
cls.gc.append((G, C))
|
|
63
|
-
|
|
64
|
-
def test_connected_components(self):
|
|
65
|
-
# Test duplicated below
|
|
66
|
-
cc = nx.connected_components
|
|
67
|
-
G = self.G
|
|
68
|
-
C = {
|
|
69
|
-
frozenset([0, 1, 2, 3]),
|
|
70
|
-
frozenset([4, 5, 6, 7, 8, 9]),
|
|
71
|
-
frozenset([10, 11, 12, 13, 14]),
|
|
72
|
-
}
|
|
73
|
-
assert {frozenset(g) for g in cc(G)} == C
|
|
74
|
-
|
|
75
|
-
def test_connected_components_nx_loopback(self):
|
|
76
|
-
# This tests the @nx._dispatchable mechanism, treating nx.connected_components
|
|
77
|
-
# as if it were a re-implementation from another package.
|
|
78
|
-
# Test duplicated from above
|
|
79
|
-
cc = nx.connected_components
|
|
80
|
-
G = dispatch_interface.convert(self.G)
|
|
81
|
-
C = {
|
|
82
|
-
frozenset([0, 1, 2, 3]),
|
|
83
|
-
frozenset([4, 5, 6, 7, 8, 9]),
|
|
84
|
-
frozenset([10, 11, 12, 13, 14]),
|
|
85
|
-
}
|
|
86
|
-
if "nx_loopback" in nx.config.backends or not nx.config.backends:
|
|
87
|
-
# If `nx.config.backends` is empty, then `_dispatchable.__call__` takes a
|
|
88
|
-
# "fast path" and does not check graph inputs, so using an unknown backend
|
|
89
|
-
# here will still work.
|
|
90
|
-
assert {frozenset(g) for g in cc(G)} == C
|
|
91
|
-
else:
|
|
92
|
-
# This raises, because "nx_loopback" is not registered as a backend.
|
|
93
|
-
with pytest.raises(
|
|
94
|
-
ImportError, match="'nx_loopback' backend is not installed"
|
|
95
|
-
):
|
|
96
|
-
cc(G)
|
|
97
|
-
|
|
98
|
-
def test_number_connected_components(self):
|
|
99
|
-
ncc = nx.number_connected_components
|
|
100
|
-
assert ncc(self.G) == 3
|
|
101
|
-
|
|
102
|
-
def test_number_connected_components2(self):
|
|
103
|
-
ncc = nx.number_connected_components
|
|
104
|
-
assert ncc(self.grid) == 1
|
|
105
|
-
|
|
106
|
-
def test_connected_components2(self):
|
|
107
|
-
cc = nx.connected_components
|
|
108
|
-
G = self.grid
|
|
109
|
-
C = {frozenset([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16])}
|
|
110
|
-
assert {frozenset(g) for g in cc(G)} == C
|
|
111
|
-
|
|
112
|
-
def test_node_connected_components(self):
|
|
113
|
-
ncc = nx.node_connected_component
|
|
114
|
-
G = self.grid
|
|
115
|
-
C = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}
|
|
116
|
-
assert ncc(G, 1) == C
|
|
117
|
-
|
|
118
|
-
def test_is_connected(self):
|
|
119
|
-
assert nx.is_connected(self.grid)
|
|
120
|
-
G = nx.Graph()
|
|
121
|
-
G.add_nodes_from([1, 2])
|
|
122
|
-
assert not nx.is_connected(G)
|
|
123
|
-
|
|
124
|
-
def test_connected_raise(self):
|
|
125
|
-
with pytest.raises(NetworkXNotImplemented):
|
|
126
|
-
next(nx.connected_components(self.DG))
|
|
127
|
-
pytest.raises(NetworkXNotImplemented, nx.number_connected_components, self.DG)
|
|
128
|
-
pytest.raises(NetworkXNotImplemented, nx.node_connected_component, self.DG, 1)
|
|
129
|
-
pytest.raises(NetworkXNotImplemented, nx.is_connected, self.DG)
|
|
130
|
-
pytest.raises(nx.NetworkXPointlessConcept, nx.is_connected, nx.Graph())
|
|
131
|
-
|
|
132
|
-
def test_connected_mutability(self):
|
|
133
|
-
G = self.grid
|
|
134
|
-
seen = set()
|
|
135
|
-
for component in nx.connected_components(G):
|
|
136
|
-
assert len(seen & component) == 0
|
|
137
|
-
seen.update(component)
|
|
138
|
-
component.clear()
|
package/runtime/python/okstra_vendor/networkx/algorithms/components/tests/test_semiconnected.py
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
from itertools import chain
|
|
2
|
-
|
|
3
|
-
import pytest
|
|
4
|
-
|
|
5
|
-
import networkx as nx
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class TestIsSemiconnected:
|
|
9
|
-
def test_undirected(self):
|
|
10
|
-
pytest.raises(nx.NetworkXNotImplemented, nx.is_semiconnected, nx.Graph())
|
|
11
|
-
pytest.raises(nx.NetworkXNotImplemented, nx.is_semiconnected, nx.MultiGraph())
|
|
12
|
-
|
|
13
|
-
def test_empty(self):
|
|
14
|
-
pytest.raises(nx.NetworkXPointlessConcept, nx.is_semiconnected, nx.DiGraph())
|
|
15
|
-
pytest.raises(
|
|
16
|
-
nx.NetworkXPointlessConcept, nx.is_semiconnected, nx.MultiDiGraph()
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
def test_single_node_graph(self):
|
|
20
|
-
G = nx.DiGraph()
|
|
21
|
-
G.add_node(0)
|
|
22
|
-
assert nx.is_semiconnected(G)
|
|
23
|
-
|
|
24
|
-
def test_path(self):
|
|
25
|
-
G = nx.path_graph(100, create_using=nx.DiGraph())
|
|
26
|
-
assert nx.is_semiconnected(G)
|
|
27
|
-
G.add_edge(100, 99)
|
|
28
|
-
assert not nx.is_semiconnected(G)
|
|
29
|
-
|
|
30
|
-
def test_cycle(self):
|
|
31
|
-
G = nx.cycle_graph(100, create_using=nx.DiGraph())
|
|
32
|
-
assert nx.is_semiconnected(G)
|
|
33
|
-
G = nx.path_graph(100, create_using=nx.DiGraph())
|
|
34
|
-
G.add_edge(0, 99)
|
|
35
|
-
assert nx.is_semiconnected(G)
|
|
36
|
-
|
|
37
|
-
def test_tree(self):
|
|
38
|
-
G = nx.DiGraph()
|
|
39
|
-
G.add_edges_from(
|
|
40
|
-
chain.from_iterable([(i, 2 * i + 1), (i, 2 * i + 2)] for i in range(100))
|
|
41
|
-
)
|
|
42
|
-
assert not nx.is_semiconnected(G)
|
|
43
|
-
|
|
44
|
-
def test_dumbbell(self):
|
|
45
|
-
G = nx.cycle_graph(100, create_using=nx.DiGraph())
|
|
46
|
-
G.add_edges_from((i + 100, (i + 1) % 100 + 100) for i in range(100))
|
|
47
|
-
assert not nx.is_semiconnected(G) # G is disconnected.
|
|
48
|
-
G.add_edge(100, 99)
|
|
49
|
-
assert nx.is_semiconnected(G)
|
|
50
|
-
|
|
51
|
-
def test_alternating_path(self):
|
|
52
|
-
G = nx.DiGraph(
|
|
53
|
-
chain.from_iterable([(i, i - 1), (i, i + 1)] for i in range(0, 100, 2))
|
|
54
|
-
)
|
|
55
|
-
assert not nx.is_semiconnected(G)
|
package/runtime/python/okstra_vendor/networkx/algorithms/components/tests/test_strongly_connected.py
DELETED
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
import pytest
|
|
2
|
-
|
|
3
|
-
import networkx as nx
|
|
4
|
-
from networkx import NetworkXNotImplemented
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class TestStronglyConnected:
|
|
8
|
-
@classmethod
|
|
9
|
-
def setup_class(cls):
|
|
10
|
-
cls.gc = []
|
|
11
|
-
G = nx.DiGraph()
|
|
12
|
-
G.add_edges_from(
|
|
13
|
-
[
|
|
14
|
-
(1, 2),
|
|
15
|
-
(2, 3),
|
|
16
|
-
(2, 8),
|
|
17
|
-
(3, 4),
|
|
18
|
-
(3, 7),
|
|
19
|
-
(4, 5),
|
|
20
|
-
(5, 3),
|
|
21
|
-
(5, 6),
|
|
22
|
-
(7, 4),
|
|
23
|
-
(7, 6),
|
|
24
|
-
(8, 1),
|
|
25
|
-
(8, 7),
|
|
26
|
-
]
|
|
27
|
-
)
|
|
28
|
-
C = {frozenset([3, 4, 5, 7]), frozenset([1, 2, 8]), frozenset([6])}
|
|
29
|
-
cls.gc.append((G, C))
|
|
30
|
-
|
|
31
|
-
G = nx.DiGraph()
|
|
32
|
-
G.add_edges_from([(1, 2), (1, 3), (1, 4), (4, 2), (3, 4), (2, 3)])
|
|
33
|
-
C = {frozenset([2, 3, 4]), frozenset([1])}
|
|
34
|
-
cls.gc.append((G, C))
|
|
35
|
-
|
|
36
|
-
G = nx.DiGraph()
|
|
37
|
-
G.add_edges_from([(1, 2), (2, 3), (3, 2), (2, 1)])
|
|
38
|
-
C = {frozenset([1, 2, 3])}
|
|
39
|
-
cls.gc.append((G, C))
|
|
40
|
-
|
|
41
|
-
# Eppstein's tests
|
|
42
|
-
G = nx.DiGraph({0: [1], 1: [2, 3], 2: [4, 5], 3: [4, 5], 4: [6], 5: [], 6: []})
|
|
43
|
-
C = {
|
|
44
|
-
frozenset([0]),
|
|
45
|
-
frozenset([1]),
|
|
46
|
-
frozenset([2]),
|
|
47
|
-
frozenset([3]),
|
|
48
|
-
frozenset([4]),
|
|
49
|
-
frozenset([5]),
|
|
50
|
-
frozenset([6]),
|
|
51
|
-
}
|
|
52
|
-
cls.gc.append((G, C))
|
|
53
|
-
|
|
54
|
-
G = nx.DiGraph({0: [1], 1: [2, 3, 4], 2: [0, 3], 3: [4], 4: [3]})
|
|
55
|
-
C = {frozenset([0, 1, 2]), frozenset([3, 4])}
|
|
56
|
-
cls.gc.append((G, C))
|
|
57
|
-
|
|
58
|
-
def test_tarjan(self):
|
|
59
|
-
scc = nx.strongly_connected_components
|
|
60
|
-
for G, C in self.gc:
|
|
61
|
-
assert {frozenset(g) for g in scc(G)} == C
|
|
62
|
-
|
|
63
|
-
def test_kosaraju(self):
|
|
64
|
-
scc = nx.kosaraju_strongly_connected_components
|
|
65
|
-
for G, C in self.gc:
|
|
66
|
-
assert {frozenset(g) for g in scc(G)} == C
|
|
67
|
-
|
|
68
|
-
def test_number_strongly_connected_components(self):
|
|
69
|
-
ncc = nx.number_strongly_connected_components
|
|
70
|
-
for G, C in self.gc:
|
|
71
|
-
assert ncc(G) == len(C)
|
|
72
|
-
|
|
73
|
-
def test_is_strongly_connected(self):
|
|
74
|
-
for G, C in self.gc:
|
|
75
|
-
if len(C) == 1:
|
|
76
|
-
assert nx.is_strongly_connected(G)
|
|
77
|
-
else:
|
|
78
|
-
assert not nx.is_strongly_connected(G)
|
|
79
|
-
|
|
80
|
-
def test_contract_scc1(self):
|
|
81
|
-
G = nx.DiGraph()
|
|
82
|
-
G.add_edges_from(
|
|
83
|
-
[
|
|
84
|
-
(1, 2),
|
|
85
|
-
(2, 3),
|
|
86
|
-
(2, 11),
|
|
87
|
-
(2, 12),
|
|
88
|
-
(3, 4),
|
|
89
|
-
(4, 3),
|
|
90
|
-
(4, 5),
|
|
91
|
-
(5, 6),
|
|
92
|
-
(6, 5),
|
|
93
|
-
(6, 7),
|
|
94
|
-
(7, 8),
|
|
95
|
-
(7, 9),
|
|
96
|
-
(7, 10),
|
|
97
|
-
(8, 9),
|
|
98
|
-
(9, 7),
|
|
99
|
-
(10, 6),
|
|
100
|
-
(11, 2),
|
|
101
|
-
(11, 4),
|
|
102
|
-
(11, 6),
|
|
103
|
-
(12, 6),
|
|
104
|
-
(12, 11),
|
|
105
|
-
]
|
|
106
|
-
)
|
|
107
|
-
scc = list(nx.strongly_connected_components(G))
|
|
108
|
-
cG = nx.condensation(G, scc)
|
|
109
|
-
# DAG
|
|
110
|
-
assert nx.is_directed_acyclic_graph(cG)
|
|
111
|
-
# nodes
|
|
112
|
-
assert sorted(cG.nodes()) == [0, 1, 2, 3]
|
|
113
|
-
# edges
|
|
114
|
-
mapping = {}
|
|
115
|
-
for i, component in enumerate(scc):
|
|
116
|
-
for n in component:
|
|
117
|
-
mapping[n] = i
|
|
118
|
-
edge = (mapping[2], mapping[3])
|
|
119
|
-
assert cG.has_edge(*edge)
|
|
120
|
-
edge = (mapping[2], mapping[5])
|
|
121
|
-
assert cG.has_edge(*edge)
|
|
122
|
-
edge = (mapping[3], mapping[5])
|
|
123
|
-
assert cG.has_edge(*edge)
|
|
124
|
-
|
|
125
|
-
def test_contract_scc_isolate(self):
|
|
126
|
-
# Bug found and fixed in [1687].
|
|
127
|
-
G = nx.DiGraph()
|
|
128
|
-
G.add_edge(1, 2)
|
|
129
|
-
G.add_edge(2, 1)
|
|
130
|
-
scc = list(nx.strongly_connected_components(G))
|
|
131
|
-
cG = nx.condensation(G, scc)
|
|
132
|
-
assert list(cG.nodes()) == [0]
|
|
133
|
-
assert list(cG.edges()) == []
|
|
134
|
-
|
|
135
|
-
def test_contract_scc_edge(self):
|
|
136
|
-
G = nx.DiGraph()
|
|
137
|
-
G.add_edge(1, 2)
|
|
138
|
-
G.add_edge(2, 1)
|
|
139
|
-
G.add_edge(2, 3)
|
|
140
|
-
G.add_edge(3, 4)
|
|
141
|
-
G.add_edge(4, 3)
|
|
142
|
-
scc = list(nx.strongly_connected_components(G))
|
|
143
|
-
cG = nx.condensation(G, scc)
|
|
144
|
-
assert sorted(cG.nodes()) == [0, 1]
|
|
145
|
-
if 1 in scc[0]:
|
|
146
|
-
edge = (0, 1)
|
|
147
|
-
else:
|
|
148
|
-
edge = (1, 0)
|
|
149
|
-
assert list(cG.edges()) == [edge]
|
|
150
|
-
|
|
151
|
-
def test_condensation_mapping_and_members(self):
|
|
152
|
-
G, C = self.gc[1]
|
|
153
|
-
C = sorted(C, key=len, reverse=True)
|
|
154
|
-
cG = nx.condensation(G)
|
|
155
|
-
mapping = cG.graph["mapping"]
|
|
156
|
-
assert all(n in G for n in mapping)
|
|
157
|
-
assert all(0 == cN for n, cN in mapping.items() if n in C[0])
|
|
158
|
-
assert all(1 == cN for n, cN in mapping.items() if n in C[1])
|
|
159
|
-
for n, d in cG.nodes(data=True):
|
|
160
|
-
assert set(C[n]) == cG.nodes[n]["members"]
|
|
161
|
-
|
|
162
|
-
def test_null_graph(self):
|
|
163
|
-
G = nx.DiGraph()
|
|
164
|
-
assert list(nx.strongly_connected_components(G)) == []
|
|
165
|
-
assert list(nx.kosaraju_strongly_connected_components(G)) == []
|
|
166
|
-
assert len(nx.condensation(G)) == 0
|
|
167
|
-
pytest.raises(
|
|
168
|
-
nx.NetworkXPointlessConcept, nx.is_strongly_connected, nx.DiGraph()
|
|
169
|
-
)
|
|
170
|
-
|
|
171
|
-
def test_connected_raise(self):
|
|
172
|
-
G = nx.Graph()
|
|
173
|
-
with pytest.raises(NetworkXNotImplemented):
|
|
174
|
-
next(nx.strongly_connected_components(G))
|
|
175
|
-
with pytest.raises(NetworkXNotImplemented):
|
|
176
|
-
next(nx.kosaraju_strongly_connected_components(G))
|
|
177
|
-
pytest.raises(NetworkXNotImplemented, nx.is_strongly_connected, G)
|
|
178
|
-
pytest.raises(NetworkXNotImplemented, nx.condensation, G)
|
|
179
|
-
|
|
180
|
-
strong_cc_methods = (
|
|
181
|
-
nx.strongly_connected_components,
|
|
182
|
-
nx.kosaraju_strongly_connected_components,
|
|
183
|
-
)
|
|
184
|
-
|
|
185
|
-
@pytest.mark.parametrize("get_components", strong_cc_methods)
|
|
186
|
-
def test_connected_mutability(self, get_components):
|
|
187
|
-
DG = nx.path_graph(5, create_using=nx.DiGraph)
|
|
188
|
-
G = nx.disjoint_union(DG, DG)
|
|
189
|
-
seen = set()
|
|
190
|
-
for component in get_components(G):
|
|
191
|
-
assert len(seen & component) == 0
|
|
192
|
-
seen.update(component)
|
|
193
|
-
component.clear()
|