| 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 clear edges method to the list of methods to be frozen by the nx.freeze function
* Change tests to create new graph instead of using class attribute
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Touch up docstring.
* Condense conditional.
* Minor refactor of ispath test - parametrize and rm redundant.
* Add release note.
* Update networkx/classes/function.py
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| |
|
|
|
|
| |
exception (#5943)
Formerly, is_path raised a KeyError when one of the nodes in the input path was not actually in G.
This PR modifies the function so that it returns False in this case instead of raising an exception.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Updated networkx/classes/function.py
* Reformatted using black
* Update networkx/classes/function.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update networkx/classes/function.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Update networkx/classes/function.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Applying style manually
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Apply style manually
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* Added example
* Updated
* Update case of multigraph and case of using G.edges to set H
* format doc_string example
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| |
|
|
|
|
|
|
|
|
| |
* Remove deprecated function nx.info
* remove functions from TOC
* replace print(nx.info(G)) with print(G) in example
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
| |
* Add isort to pre-commit
* Run isort on all python files (except __init__.py ones)
|
| | |
|
| |
|
|
|
|
|
|
|
| |
* Correct typo in docstring (int -> float)
This is based on https://stackoverflow.com/q/71494698/10693596
* Update function.py
* Update function.py
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Drop Py37
* XML serialization issue
* Use math.comb
Co-authored-by: Simone Gasperini <simone.gasperini2@studio.unibo.it>
* Run pyupgrade --py38-plus
* Run black
* More documentation
* Deprecate euclidean
Co-authored-by: Simone Gasperini <simone.gasperini2@studio.unibo.it>
|
| |
|
|
| |
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.
|
| | |
|
| |
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* TST: parametrize set_node_attributes test.
* TST: Add test to improve set_node_attribute coverage.
* TST: parametrize set_edge_attribute tests.
* TST: add test for set_edge_attributes w/ missing edges.
* Add tests for missing edges in values dict.
* Add examples to set_{node/edge}_attributes docstrings.
Add examples illustrating the silent ignoring of nodes/edges
in the values dict that are not in G.
|
| |
|
|
|
|
|
|
|
|
| |
* Modify graph __str__ to return nx.info.
Returns the result of nx.info(self) instead of only the
instance name.
* TST: Modify tests for new str dunder.
* MAINT: move graph summary to __str__ from info
|
| |
|
|
|
| |
Report name, number of nodes, and number of edges of a graph.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
| |
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Began writing function for specified path cost and associated tests
* Cleaned up formatting and finished writing test
* Made minor changes as suggested in PR comment. Name changes and syntax changes
* polished up and wrote tests for is_path, adjusted tests to include Digraph and MultiDiGraph, added sphinx shorthand in docs
* Fixed most pep8 warnings (excluding line too long)
* Updated docstring and fixed is_path to have lower memory footprint
* minor tweaks to allow rebase
* Add credits for contributor
* Run black
Co-authored-by: DNiquette16 <Dniquette16@gmail.com>
Co-authored-by: Dan Schult <dschult@colgate.edu>
Co-authored-by: Jarrod Millman <jarrod.millman@gmail.com>
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
* documenting the behaviour correctly
* adding tests to lock the behaviour
* PEP
* one-line docstring
* pep
|
| |
|
|
| |
find networkx -name \*.py -exec pyupgrade --py36-plus {} \;
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
| |
Fixes #3625
|
| |
|
| |
The `as_view=True` argument is missing so the function returns a deepcopy instead of a view.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
* Fixed problem in documentation view of this function
* Replacing `Return` to `Returns` in function docs
|
| |
|
|
|
|
|
|
|
|
| |
Fixes #3277
* adding support for singleton in add_path and add_star
* adding test cases for singleton
* adding test cases that cover the try-except loop for add_star and add_cycle
|
| |
|
|
| |
frozen should have kwargs otherwise when calling a frozen graph method with a keyword you get
a TypeError : frozen() got an unexpected keyword argument ..
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
| |
* 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()
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Found via `codespell -q 3 -I ../networkx-whitelist.txt` where whitelist consisted of:
```
ans
childs
iff
nd
te
```
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
I didn't change functions defined in tests.
I also left drawing routines as is at least for now.
Addresses #1582
Fixes #1583
|
| | |
|
| |
|
|
|
|
| |
* Fix links
* Comply with pep8
|
| |
|
|
|
| |
Fixes #2648
Noticed hidden errors with G.name in operators.py
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Shortcut chains of subgraph views in common cases.
Turns out the general case of chains of subgraph views is
hard to make a shortcut for. So this only does the common
case of node induced subgraphs of subgraphs.
* Add tests for subgraph chains
* Add more tests of chains of subgraphs
|
| | |
|