| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Wrappers classes to dispatch to a backend
* Rework the backend dispatching
- Use __networkx_plugin__=name to find graph-like objects instead of
subclassing
- Add PluginInfo to smooth over differences in importlib.metadata across
python versions
- Add dispatch behavior override via environment variable to aid in
testing plugins
* Dispatch more algorithms and improve auto-test capabilities
* Allow dispatcher decorator without a name
- Name is taken from the decorated function
- Raise error if backend doesn't implement a decorated function which is called
- Check for duplicate names for dispatching algorithms
* Make sphinx pick up backend docs
* make black happy
* Rename decorator to _dispatch as it's experimental
* A few more dispatched functions
* Make convert to and from methods for auto-testing
- Rename `convert` to `convert_from_nx`
- Add `convert_to_nx` function
These will allow backends to return native objects when dispatching,
but provide a mechanism to convert the result to the type expected
by NetworkX tests for the auto-test plugin mechanism.
* More dispatching
* Include name with `convert_**_nx` methods
* Remove known plugin names
This check is not needed, as any plugin can register itself in the entry points section.
The dispatching and auto-testing explicitly specify the plugin to use, so there is no
need to hardcode the options.
These were originally included for security, but any malicious actor would simply use one
of the valid names, so having a hardcoded list does not actually provide any meaningful
security.
* Add `dispatchname` to dispatchable functions
Co-authored-by: Jim Kitchen <jim22k@gmail.com>
Co-authored-by: Erik Welch <erik.n.welch@gmail.com>
|
| |
|
|
|
|
|
| |
* index costs the size of the stack, which is always greater than or equal to the size of the newly discovered biconnnected component, and in general much larger.
Instead, introduce a dict that maps the edge to an index instead of using the list.index method on the full stack.
Co-authored-by: Kelly Boothby <boothby@dwavesys.com>
|
| |
|
|
|
|
|
|
|
| |
* Fix examples section formatting in condensed docstr.
* Rm stray reference to ordered grpahs.
* Add naive LCA algs to reference guide.
* Fix heading names in LCA docstrings.
|
| |
|
|
|
| |
* Add examples for the condensation function
* Added comments and removed unnecessary operation
|
| | |
|
| | |
|
| |
|
| |
Dont compute all biconnected components in is_biconnected()
|
| |
|
|
|
| |
* Add isort to pre-commit
* Run isort on all python files (except __init__.py ones)
|
| |
|
|
|
|
|
|
|
|
|
| |
* documentation
* added examples
* Update branchings.py
* Update branchings.py
* simplified
|
| |
|
|
|
|
|
|
|
| |
* added examples
* Update networkx/algorithms/components/connected.py
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
|
|
|
| |
have O(|E|+|V|) time complexity instead of O(|V|^3). (#5288)
Prevent unnecessary traversal of edges multiple times
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* added argmap decorator
* removed most dependency on decorator
* removed last reference to decorator?
* Made the compilation of argmap-decorated functions lazy to reduce import time.
* black
* reworked try_finally to make cleanup cleaner
* first pass at documentation; general cleanup
* incorporated dschult's comments
* rest formatted docstrings
* added unit tests and fixed a few bugs that cropped up
* Apply suggestions from code review
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Dan Schult <dschult@colgate.edu>
* Exapnd docstrings for decorators.py
* * refactored try_finally into a keyword-only argument
* more tweaks to documentation re: @stefanv's comments
* additional unit test for signature-clobbering decorators
* spellcheck my txt and expand new test to help me grok it
* rehash docstrings for sphinx
* rewrite docs to provide some examples where argmap used without @argmap
* doc tweak
* last touches
* documentation clarifications
* run black
* doc review
* remove decorator module from github workflows and INSTALL.rst
* add text to release_dev to describe highlights and improvements here
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Dan Schult <dschult@colgate.edu>
|
| |
|
|
|
|
|
|
|
|
|
| |
* Fix links, use DOI links, wayback machine where required
* Add nx-guides to intersphinx mapping.
* Replace external mpl link w/ intersphinx.
* Update mpl intersphinx mapping.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| | |
|
| |
|
|
|
| |
* Reenable test
* Delete old test
|
| |
|
|
|
|
|
| |
* Setup for numpydoc.
* Add to doc requirements.
* Replace napoleon with numpydoc in conf.py.
* DOC: Fixups from numpydoc.
|
| |
|
|
| |
3823) (#4333)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| | |
|
| |
|
|
|
|
|
| |
* Deprecate context_manager reversed in favor of reversed_view
* change pep8 stuff
Fixes #3936
|
| |
|
| |
Co-authored-by: rbusche <rbusche@inserve.de>
|
| |
|
|
|
|
|
|
|
| |
* added test for issue 3823
* fixed (networkx #3823)
* minor performance tweak
* pep8
|
| |
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This reverts commit b4cb5145b2734c4dcaea109888ad1af789665ee9.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
* Remove the unnecessary usage of the nbrs dictionary.
* Update scc_found just once.
|
| |
|
|
|
|
| |
Replaced the scc_found dictionary with a set since we don't use the value of the
dictionary.
Changed done's variable type to boolean so that PyPy's JIT would
recognize that there are only two possible states for the condition.
|
| |
|
| |
Fixes #3446
|
| | |
|
| |
|
|
|
|
| |
* Fixed problem in documentation view of this function
* Replacing `Return` to `Returns` in function docs
|