summaryrefslogtreecommitdiff
path: root/networkx
Commit message (Collapse)AuthorAgeFilesLines
* Example of improving test granularity related to #5092 (#5094)Ross Barnowski2023-05-131-23/+36
| | | extract and parametrize watts_strogatz tests.
* Handle weights as `distance=` in testing dispatch (#6671)Erik Welch2023-05-132-1/+5
| | | | | | | | * Handle weights as `distance=` in testing dispatch * fix `test_intersection` This change was suggested here: https://github.com/python-graphblas/graphblas-algorithms/pull/62#issuecomment-1531810715
* Improve test coverage for mst.py (#6540)Alimi Qudirah2023-05-131-0/+37
| | | | | * fixes for 6539 * add more tests to test_mst.py
* codespell: pre-commit, config, typos fixed (#6662)Yaroslav Halchenko2023-05-032-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | * One ambigous typo * one more ambigous typo * [DATALAD RUNCMD] run codespell throughout === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ For this to work -- it would require configuration files which were abandoned. See https://github.com/networkx/networkx/pull/6662 for more discussion etc. * Manual reversion of perform... "fix"
* added tests to euler.py (#6608)Alimi Qudirah2023-05-031-0/+12
| | | | | | | | | | | | | | * fixes-for-6607 * Update networkx/algorithms/tests/test_euler.py Co-authored-by: Mridul Seth <mail@mriduls.com> * Update euler test --------- Co-authored-by: Mridul Seth <mail@mriduls.com> Co-authored-by: Mridul Seth <git@mriduls.com>
* Remove `topo_order` kwarg from `is_semiconnected` without deprecation. (#6651)Ross Barnowski2023-05-031-9/+14
| | | | | | | | | | | * Remove topo_order kwarg without deprecation. * Add release note about semiconnected removing the topo_order kwarg. * Add to doc_string the method used to find semiconnected --------- Co-authored-by: Dan Schult <dschult@colgate.edu>
* Improve test coverage for reaching.py (#6678)Vanshika Mishra2023-05-021-0/+8
|
* Improve Test Coverage for current_flow_closeness.py (#6677)Vanshika Mishra2023-05-021-0/+6
| | | Improve_test_coverage_cfc.py
* Added docstring examples for nx_pylab.py (#6616)cnfionawu2023-05-021-0/+36
| | | Update nx_pylab.py
* Improve test coverage for neighbor_degree.py (#6589)Alimi Qudirah2023-05-021-0/+4
| | | added tests for neighbor_degree.py
* Added tests to test_correlation.py (#6590)Alimi Qudirah2023-05-021-0/+15
| | | | | * added tests to test_correlation.py * bugfix-for-6588
* Use unpacking operator on dicts to prevent constructing intermediate objects ↵DiamondJoseph2023-05-023-15/+8
| | | | (#6040)
* Adding is_tounament to main namespace (#6498)Alimi Qudirah2023-05-021-0/+1
| | | | | * adding is_tounament to main namespace * bugfix for 5542
* Rm unreachable code for validating input (#6675)Ross Barnowski2023-05-011-6/+0
| | | Rm un-hittable validation lines.
* MAINT: minor coverage cleanup. (#6674)Ross Barnowski2023-05-011-3/+0
|
* Allow multiple graphs for `@nx._dispatch` (#6628)Jim Kitchen2023-04-254-41/+103
| | | | | | | | | | | | | * Allow multiple graphs for nx._dispatch A new `graphs` keyword is added. For the case of two graphs named `G` and `H` as the first to arguments in `foo`, the new spelling is @nx._dispatch(graphs="G,H") def foo(G, H, other_arg, **kwargs): ... * Use better default "G" for graphs kwarg * fix
* Fix output of is_chordal for empty graphs (#6563)Navya Agarwal2023-04-252-4/+10
| | | | | * Fix for is_chordal for empty graphs * Handle self loops case
* Added docstrings examples for clique.py (#6576)Alimi Qudirah2023-04-251-0/+24
| | | | | | | | | | | | | | | | | | | | | | | * added docstrings examples for clique.py * Update networkx/algorithms/approximation/clique.py Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> * Update networkx/algorithms/approximation/clique.py Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> * adding corrections * adding corrections * adding corrections to examples * adding corrections --------- Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Make cycle_basis() deterministic (#6654)Efrem Braun2023-04-212-3/+15
| | | | | | Replace sets with dict keys to make cycle_basis deterministic with respect to node ordering. Co-authored-by: Dan Schult <dschult@colgate.edu>
* Preserve node order in bipartite_layout (#6644)Haoyang Li2023-04-171-3/+3
| | | | | * Keep the original order of the nodes in bipartite_layout * Keep the original order of the nodes in bipartite_layout
* Use the correct namespace for girvan_newman examples (#6643)Mridul Seth2023-04-161-6/+6
|
* Fix links in eigenvector.py and katz_centrality.py (#6640)Vanshika Mishra2023-04-152-8/+8
| | | Fix links in see also section of docs
* Add examples to bipartite centrality.py (#6613)Navya Agarwal2023-04-111-0/+21
| | | | | | | | | * Add examples to bipartite centrality.py * Import bipartite module * Use lazy loading for bipartite * Minor Edit
* Fix handling of pos node attribute in to_agraph (#6474)Navya Agarwal2023-04-062-0/+19
| | | | Make sure the `"pos"` node attribute is properly formatted for pygraphviz, if present.
* Fix links in laplacian_centrality and laplacian_matrix (#6623)Navya Agarwal2023-04-062-4/+4
| | | Fix links in See Also section
* Bump release versionJarrod Millman2023-04-041-1/+1
|
* Designate 3.1 releasenetworkx-3.1Jarrod Millman2023-04-041-1/+1
|
* Fix typos (#6620)Harri Nieminen2023-04-0425-42/+42
|
* Fix module docstring format for ismags reference article. (#6611)Ross Barnowski2023-04-031-14/+13
| | | | | | | Improperly formatted Notes/References sections was causing a sphinx parsing error which led to a very poorly formatted html page. Fixing the numpydoc formatting for the module docstring + minor munging of the heading levels was sufficient to fix this.
* Better default alpha value for viz attributes in gexf writer (#6612)Ross Barnowski2023-04-032-1/+11
| | | | | | | | | | | * Add test that fails with current default ('None') * Update default alpha value. Co-authored-by: Dan Schult <dschult@colgate.edu> --------- Co-authored-by: Dan Schult <dschult@colgate.edu>
* Minor docs/test maintenance (#6614)Ross Barnowski2023-04-032-2/+5
| | | | | | | * doc: fix docstring heading, eliminate sphinx error. * doc: change extension of included file to prevent duplicate labels. * tst: add warnings filter for deprecated forest_str.
* Fixed method description in ismags.py (#6600)Navya Agarwal2023-04-021-2/+2
| | | | | * Fix docstr of partition_to_color * Minor edit
* corrections to docstring of `weisfeiler_lehman_subgraph_hashes` (#6598)Aaron Z2023-04-011-7/+12
| | | | | | | | | | | * corrections to docstring of weisfeiler_lehman_subgraph_hashes * Update networkx/algorithms/graph_hashing.py Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> --------- Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Bump release versionJarrod Millman2023-03-301-1/+1
|
* Designate 3.1rc0 releasenetworkx-3.1rc0Jarrod Millman2023-03-301-1/+1
|
* Added Docstring Example for Bidirectional Shortest Path (#6570)Vanshika Mishra2023-03-291-0/+7
| | | | | | | | | * Docstring Example for Bidirectional Shortest Path * output correction * graph simplified * retrigger checks
* Fixed return type inconsistencies in weighted.py (#6568)Navya Agarwal2023-03-281-7/+9
| | | Fixed return type inconsistencies
* Test dispatching via nx-loopback backend (#6536)Jim Kitchen2023-03-285-8/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add tests for nx._dispatch decorator The dispatch functionality is used to delegate graph computations to a different backend. Because those backends are not part of NetworkX, testing the dispatching feature was not originally added, relying instead on the other backends (e.g. graphblas-algorithms) to verify the dispatch functionality is working. This change creates a "loopback" backend where NetworkX dispatches to itself for the sole purpose of exercising the dispatching machinery. In one incarnation, various tests are augmented to use the LoopbackGraph family and force loopback dispatching to occur as normal usage would. A second incarnation forces *all* tests to run in dispatch mode but use of a different _dispatch decorator. This mode is triggered for all of pytest, so it must be tested by the CI system specifically. * Update CI to hopefully run dispatching auto tests * Formatting * More formatting fixes * Better comments explaining dispatching tests
* add simple cycle enumerator for undirected class (#6461)Kelly Boothby2023-03-292-88/+1131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add simple cycle enumerator for undirected class * Implemented Gupta & Suzumura and refactored Johnson in a common form and unified their call-site. Now, users can enumerate simple cycles of directed or undireced graphs, with bounded or unbounded length, all from the same `simple_cycles` function. I abandoned the stretch goal of enumerating chordless cycles, as they are not gracefully handled by the algorithms of Johnson nor Gupta & Suzumura. * updated tests for simple_cycles to include undirected graphs * * fixed documentation issues, elaborated on algorithm details * restricted to nontrivial components * removed specialized DFS to pick edges from undirected components lemma: if G is a biconnected graph with at least 3 nodes and e is an edge in G, then e belongs to a cycle * added tests for undirected and bounded cases for simple_cycles * added handling for digons in multigraphs * * Improved support for multigraphs * Split chordless_cycles out from simple_cycles because the case analysis got so tricky * Added enhanced cycle-testing framework to tests for simple_cycles * Added tests for multigraphs * Needs more documentation * * Documented simple_cycles * Caught incorrectly-handled case of parallel self-loops * removed chordless option from simple_cycles * typos/raises/leftovers in docs and error/corner tests * add a quick example to chordless_cycles * Add chordless_cycles to docs --------- Co-authored-by: Dan Schult <dschult@colgate.edu> Co-authored-by: Mridul Seth <git@mriduls.com>
* Deprecate shortest_path functions to have consistent return values in v3.3 ↵Dan Schult2023-03-283-0/+21
| | | | | | | (#6567) * Deprecate single_target..._length to channge to return a dict in v3.3 * deprecate shortest_path in case of all_pairs
* Optimize _single_shortest_path_length function (#6299)Tortar2023-03-281-23/+22
| | | | | * Optimize _single_shortest_path_length function * Update unweighted.py
* Fixed return type inconsistencies in shortest path methods documentation (#6528)Navya Agarwal2023-03-281-3/+3
| | | | | * Fixed return type inconsistencies * Fix doc error in all_pairs_shortest_path
* Improve test coverage for redundancy.py (#6551)Navya Agarwal2023-03-281-0/+6
| | | Test if condition in redundancy.py
* improve test coverage for branchings.py (#6523)Alimi Qudirah2023-03-231-0/+53
| | | | | | | | | | | | | | | * fixes for 6520 * Update networkx/algorithms/tree/tests/test_branchings.py Co-authored-by: Dan Schult <dschult@colgate.edu> * Update networkx/algorithms/tree/tests/test_branchings.py Co-authored-by: Dan Schult <dschult@colgate.edu> --------- Co-authored-by: Dan Schult <dschult@colgate.edu>
* Add docstring examples to boundary.py (#6487)Navya Agarwal2023-03-231-0/+28
| | | | | * Add docstring examples to boundary.py * Change example to wheel_graph
* Add example script for mst (#6525)Purvi Chaurasia2023-03-231-0/+1
| | | | | | | | | | | | | | | | | | | * Fix negative edge cycle function raising exception for empty graph and added relevant test function * Unresolved change * Added example script for generating mst * unresolved changes * update plot_mst.py * Fixed typo Co-authored-by: Dan Schult <dschult@colgate.edu> --------- Co-authored-by: Dan Schult <dschult@colgate.edu>
* Add docstring examples to dag.py (#6491)Navya Agarwal2023-03-231-0/+7
| | | | | * Docstr examples for compute-v-structures * Removed unnecessary example
* Update pre-commit (#6545)Jarrod Millman2023-03-2313-24/+24
|
* Fixed bug k_truss doesn't raise exception for self loops (#6521)Purvi Chaurasia2023-03-211-2/+9
| | | | | | | * Fix negative edge cycle function raising exception for empty graph and added relevant test function * Fixed k_truss doesn't raise exception for self loops * conflicts resolved
* Update docstring of paley graph (#6529)Paula Pérez Bianchi2023-03-211-7/+7
| | | | | | | | | | | | | | | | | | | | | | | * Add warning in community doc * fix unwanted change * Add latex formatting * let pre-commit add double backslashes * Update networkx/generators/expanders.py Co-authored-by: Dan Schult <dschult@colgate.edu> * Update networkx/generators/expanders.py Co-authored-by: Dan Schult <dschult@colgate.edu> * format docstring as raw to use normal latex --------- Co-authored-by: Dan Schult <dschult@colgate.edu>