| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lint and fix using ruff
* add flake8-pie lints
* remove useless import alias
* bump version
* bump deps
---------
Co-authored-by: daniel.eades <daniel.eades@hotmail.com>
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
add/remove_edges_from. (#6268)
* doc for add_edges_from
* doc for digraph
* doc for multigraph
* multigraph.add_nodes_from returns keylist
* update docs for graph - edges
* doc update: graph.add_nodes_from
* doc update: graph.remove_nodes_from
* doc update: graph.add_edges_from
* doc update: rewording for graph.add_edges_from
* doc update: graph.add_weighted_edges_from rewording
* doc update: digraph updated as graph
* doc update: digraph minor sync
* doc update: multigraph same as graph
* Update graph.py
* Update digraph.py
* Update multigraph.py
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Improve documentation for the View classes
* space removed
* use G instead of g
* update the line a few above to in_edges : InEdgeView or InEdgeDataView
* Minor tweaks to docstring, update summary.
* Apply similar changes to MultiDiGraph.in_edges docstring.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use scipy.sparse array datastructure
* Add reminder to rm wrapper when scipy adds creation fns.
* Rm mention of np matrix from code comment.
* Update networkx/algorithms/bipartite/matrix.py
Co-authored-by: Stefan van der Walt <sjvdwalt@gmail.com>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Stefan van der Walt <sjvdwalt@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Automate reset of cache for _adj,_pred,_succ
* Make G._adj a data descriptor that resets G.adj when needed.
* update places in the code where both G._succ and G._adj are changed
This is no longer needed since G._succ and G._adj are synced during __set__
* testing hasattr(G, `_adj`) no longer ensures an instance.
* Make mypy happy
* Switch to hardcode attribute names in the data descriptors
* Improve doc_strings for the data descriptors
|
| |
|
| |
Move factory attributes to the class instead of instance. ?speedup?
|
| |
|
|
|
|
| |
Removes the deprecated OrderedGraph classes.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| |
|
|
|
| |
* Add isort to pre-commit
* Run isort on all python files (except __init__.py ones)
|
| |
|
|
| |
* Make all graph properties cached properties
* one test function is not needed due to test inheritance
|
| |
|
|
|
|
| |
Fix the return type and description for the `degree` method in the
docstrings of all the graph classes.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
| |
* Fix missing backticks
* one more backticks
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix return type in docstring of internal function.
* Rm explicit mention of numpy matrix from class docstrings.
* Fix return type of floyd_warshall_numpy docstring.
* Remove mention of numpy matrix from code comment.
* Fix simrank similarity internal docstring.
* Rm explicit mention of matrix in favor of 2D array.
* Update to_networkx_graph array exception wording.
* Remove extraneous mention of numpy matrix.
* Don't print array in exception message.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Fixed inconsistent documentation for nbunch parameter in DiGraph.edges()
* Resolved Requested Changes
* Revert changes to degree docstrings.
* Update comments in example.
* Apply wording to edges method in all graph classes.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
| |
A more descriptive variable name for exceptions. This reduces local var naming conflicts when
\`e\` is used e.g. to represent edges as a loop variable.
|
| |
|
|
|
| |
* fix error in the tests... now original code fails test
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| |
|
|
|
|
|
| |
* Raise ValueError if None is added as a node.
Removed some tests that checked that errors raised when None was a node.
* update tutorial to make a stronger statement about None
|
| |
|
|
|
|
|
|
|
|
|
| |
* Add a test to catch importing aliases.
* Add test for another bad import pattern.
* Fix one bad import pattern.
Adds __all__ to some modules where it was missing.
* RM networkx namespace test.
|
| |
|
|
| |
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
| |
* Setup for numpydoc.
* Add to doc requirements.
* Replace napoleon with numpydoc in conf.py.
* DOC: Fixups from numpydoc.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Format code w/ black
* Format docstrings w/ black
* Manual cleanup
* Tell pytest to ignore planned deprecations
* Don't call plt.show during testing
* Another known deprecation
* DOC: rm duplicate line from docstring example
* Minor cleanup
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* feat: `clear_edges` in `networkx.Graph`
Method to clear all edges in a graph without altering nodes
or graph attributes. Added corresponding test too.
* tests: improve `test_clear` in `TestGraph`
Added a graph attribute before clearing to test its proper deletion.
too.
* tests: add tests for `clear` and `clear_edges` specific to DiGraph
To test that DiGraph-specific edge records are cleared as well.
* fix: specific `clear_edges` for `DiGraph`
So that DiGraph's pred/succ also get cleared.
* Convert docstrings tests and docs reference links to add clear_edges
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
The copyright and author stuff is not necessary, out-of-date,
and inconsistent. It takes up visual space and is a pain to
police everyone doing the same thing on the top of the module.
Git handles authorship in a comprehensive and authoritative way.
The LICENSE.txt file applies to all project code.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
* Fixed problem in documentation view of this function
* Replacing `Return` to `Returns` in function docs
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #3204
* implemented node_attr_dict_factory and graph_attr_dict_factory.
* documentation added.
fixed test errors.
* implemented attr factory for all classes.
from add_edges_from and add_nodes_from removed duplicate code.
from copy removed useless dict copying.
* fixed tests errors.
* fixed tests errors in all graphs.
* ValueError fixed.
potential add_nodes_from usage error fixed.
* typo fixed.
* review fixes:
* Leave the assignments which move the class variables that hold factories to instance variables.
* Leave the node checking with self._succ and self._adj.
* Leave the code that adds the node in add_nodes_from rather than pushing it to add_node.
* Leave the code to add edges in add_edges_from rather than off-loading to add_edge.
* Leave the code in copy unchanged.
for multidigraph add_edges_from implemented
for multigraph add_edges_from don't use add_edges
* typo fixed.
* leave copy as is
* removed all fixes for next PR.
|
| |
|
| |
Fixes #3113
|
| |
|
|
|
|
|
|
| |
* Fix bug in adjlist factories for DiGraph
Fixes #3099
* Add test for factory class attributes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Simplify the Graphview and SubGraphView system
- add tests to show that extensions of base graph classes (only add new functions)
should be able to use the Graph.subgraph and Graph.copy methods easily
- Remove ReadOnlyGraph class in favor of existing freeze() function
- Switch all GraphView classes to generic_graph_view function
- Switch all SubGraph classes to subgraph_view function
- Introduce deprecated functions that act like the deprecated classes.
Still need to:
- add docs
- add tests
- make sure backward compatible and marked as deprecated
- remove GraphView and SubGraph construct from rest of codebase
- update release docs
Fixes #2889
Fixes #2793
Fixes #2796
Fixes #2741
* Ease subclassing for to_(un)directed
- add to_directed_class indicator functions to base classes
- start deprecating G.fresh_copy
- update function.to(un)directed
* Remove G.fresh_copy from code replace with __class__
Add deprecation warnings for GraphView classes, ReverseView and
SubGraph. Also for fresh_copy function.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update docs for G.copy and set_*_attributes.
Fixes #2899 and #2859
* fix tutorial and docs of to_*directed
Fixes #2849
* fix docs for asyn_fluidc
Fixes #2845
* Allow seed to change in connected_watts_strogatz_graph
Also update docs. Fixes #2809
* Add tests for exceptions to asyn_fluidc
* Add tests for random graphs
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* speedup of filters for induced subgraph
Check if induced node set is big or small to determine lookup method.
Also add subgraph docs to warn that building the subgraph from scratch
may be better and give alternate code to use for this.
Fixes #2887
* Add tests of subgraph filter objects
* propagate subgraph doc changes to all base classes
|
| |
|
|
|
|
|
|
| |
* Remove a second cyclic reference in G.root_graph
Related to #3011 and #2885 and maybe #2793
* Add tests for memory leaks due to copy()
|
| |
|
|
|
|
| |
Graphs no longer have references to views.
Views still have references to the graph.
This should ease subclassing the base graph classes
because you don't have to worry about creating memory leaks.
|
| |
|
|
|
|
|
|
|
|
| |
Found via `codespell -q 3 -I ../networkx-whitelist.txt` where whitelist consisted of:
```
ans
childs
iff
nd
te
```
|
| | |
|
| |
|
|
|
|
| |
It's too hard to keep G.name consistently updated
throughout the codebase. Let users do it.
This stops from deprecating G.name altogether, but
it is a first step toward that if we decide to go that route.
|
| |
|
|
|
|
|
| |
I didn't change functions defined in tests.
I also left drawing routines as is at least for now.
Addresses #1582
Fixes #1583
|
| |
|
| |
As suggested by @mddddd in #2728
|
| |
|
|
|
| |
Fixes #2743
Addresses #2716
Relates to #2687
|