<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/networkx.git/networkx/algorithms/simple_paths.py, branch main</title>
<subtitle>github.com: networkx/networkx.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/networkx.git/'/>
<entry>
<title>Lint using Ruff (#6371)</title>
<updated>2023-02-19T17:14:00+00:00</updated>
<author>
<name>danieleades</name>
<email>33452915+danieleades@users.noreply.github.com</email>
</author>
<published>2023-02-19T17:14:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/networkx.git/commit/?id=5fcf01b9a43a097c4f579486023d1279b2b88619'/>
<id>5fcf01b9a43a097c4f579486023d1279b2b88619</id>
<content type='text'>
* lint and fix using ruff

* add flake8-pie lints

* remove useless import alias

* bump version

* bump deps

---------

Co-authored-by: daniel.eades &lt;daniel.eades@hotmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lint and fix using ruff

* add flake8-pie lints

* remove useless import alias

* bump version

* bump deps

---------

Co-authored-by: daniel.eades &lt;daniel.eades@hotmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Update developer requirements (#6429)</title>
<updated>2023-02-14T20:52:22+00:00</updated>
<author>
<name>Jarrod Millman</name>
<email>jarrod.millman@gmail.com</email>
</author>
<published>2023-02-14T20:52:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/networkx.git/commit/?id=79586c3f1a0f47e6643919887ace7e7e9335db8a'/>
<id>79586c3f1a0f47e6643919887ace7e7e9335db8a</id>
<content type='text'>
* Update developer requirements

* Run linter</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Update developer requirements

* Run linter</pre>
</div>
</content>
</entry>
<entry>
<title>Update simple_paths.py: consistent behaviour for `is_simple_path` when path contains nodes not in the graph. (#6272)</title>
<updated>2022-12-20T16:39:54+00:00</updated>
<author>
<name>Sultan Orazbayev</name>
<email>contact@econpoint.com</email>
</author>
<published>2022-12-20T16:39:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/networkx.git/commit/?id=b15b5168d5648e4e33b62b7a316b0d7886f60dcf'/>
<id>b15b5168d5648e4e33b62b7a316b0d7886f60dcf</id>
<content type='text'>
* Update simple_paths.py

Current version of `is_simple_path` fails with `KeyError` if the first element of the node list is not in the graph.

* Update simple_paths.py

* Update simple_paths.py

Simplify the test condition. Checking for a single node in the list can be combined with checking for duplicates in the list without meaningful efficiency loss.

* Update test_simple_paths.py

Add the case when the start of the path is a node not in the graph.

* Update simple_paths.py

* Update simple_paths.py

* Update simple_paths.py

* Update simple_paths.py

* Update simple_paths.py

Still need to check the special case of a list with 1 item.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Update simple_paths.py

Current version of `is_simple_path` fails with `KeyError` if the first element of the node list is not in the graph.

* Update simple_paths.py

* Update simple_paths.py

Simplify the test condition. Checking for a single node in the list can be combined with checking for duplicates in the list without meaningful efficiency loss.

* Update test_simple_paths.py

Add the case when the start of the path is a node not in the graph.

* Update simple_paths.py

* Update simple_paths.py

* Update simple_paths.py

* Update simple_paths.py

* Update simple_paths.py

Still need to check the special case of a list with 1 item.</pre>
</div>
</content>
</entry>
<entry>
<title>Update simple_paths.py to improve readability of the BFS. (#6273)</title>
<updated>2022-12-12T14:35:52+00:00</updated>
<author>
<name>Sultan Orazbayev</name>
<email>contact@econpoint.com</email>
</author>
<published>2022-12-12T14:35:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/networkx.git/commit/?id=75be68f55d836819ba00b1615c9464adc8d468f3'/>
<id>75be68f55d836819ba00b1615c9464adc8d468f3</id>
<content type='text'>
* Update simple_paths.py

Improve readability of the BFS.

* Update simple_paths.py

remove `value` kwarg.

* Update networkx/algorithms/simple_paths.py

Co-authored-by: Dan Schult &lt;dschult@colgate.edu&gt;

* Update simple_paths.py

Co-authored-by: Dan Schult &lt;dschult@colgate.edu&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Update simple_paths.py

Improve readability of the BFS.

* Update simple_paths.py

remove `value` kwarg.

* Update networkx/algorithms/simple_paths.py

Co-authored-by: Dan Schult &lt;dschult@colgate.edu&gt;

* Update simple_paths.py

Co-authored-by: Dan Schult &lt;dschult@colgate.edu&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>plugin based backend infrastructure to use multiple computation backends (#6000)</title>
<updated>2022-11-08T18:39:27+00:00</updated>
<author>
<name>Mridul Seth</name>
<email>seth.mridul@gmail.com</email>
</author>
<published>2022-11-08T18:39:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/networkx.git/commit/?id=0f91550007fd3a95261d858b1a6a623ef8bda38a'/>
<id>0f91550007fd3a95261d858b1a6a623ef8bda38a</id>
<content type='text'>
* 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 &lt;jim22k@gmail.com&gt;
Co-authored-by: Erik Welch &lt;erik.n.welch@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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 &lt;jim22k@gmail.com&gt;
Co-authored-by: Erik Welch &lt;erik.n.welch@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>Improved documentation for all_simple_paths (#5944)</title>
<updated>2022-09-01T07:34:43+00:00</updated>
<author>
<name>pmlpm1986</name>
<email>96069104+pmlpm1986@users.noreply.github.com</email>
</author>
<published>2022-09-01T07:34:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/networkx.git/commit/?id=53f766aa94b5aa5d3f87178418e794c4cc5f77eb'/>
<id>53f766aa94b5aa5d3f87178418e794c4cc5f77eb</id>
<content type='text'>
* Improved documentation for all_simple_paths

Improved the documentation for all_simple_paths.

* Update simple_paths.py

Black code style compliance edits.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Improved documentation for all_simple_paths

Improved the documentation for all_simple_paths.

* Update simple_paths.py

Black code style compliance edits.</pre>
</div>
</content>
</entry>
<entry>
<title> Use isort with pre-commit to enforce import guidelines (#5659)</title>
<updated>2022-06-02T15:54:09+00:00</updated>
<author>
<name>Mridul Seth</name>
<email>seth.mridul@gmail.com</email>
</author>
<published>2022-06-02T15:54:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/networkx.git/commit/?id=5c0b11afb4c0882a070d522ef3fa41482ba935d3'/>
<id>5c0b11afb4c0882a070d522ef3fa41482ba935d3</id>
<content type='text'>
* Add isort to pre-commit

* Run isort on all python files (except __init__.py ones)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add isort to pre-commit

* Run isort on all python files (except __init__.py ones)</pre>
</div>
</content>
</entry>
<entry>
<title>Add note about checking for path existence to all_simple_paths. (#5059)</title>
<updated>2021-10-18T16:14:06+00:00</updated>
<author>
<name>Ross Barnowski</name>
<email>rossbar@berkeley.edu</email>
</author>
<published>2021-10-18T16:14:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/networkx.git/commit/?id=d2ba0ef672eb53e362e65195715d3bcba9a6077f'/>
<id>d2ba0ef672eb53e362e65195715d3bcba9a6077f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Change exception varname e to err (#5130)</title>
<updated>2021-10-15T19:01:14+00:00</updated>
<author>
<name>Dan Schult</name>
<email>dschult@colgate.edu</email>
</author>
<published>2021-10-15T19:01:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/networkx.git/commit/?id=e611fa1e439f6bd0c35fd8db2ca1ced56070a915'/>
<id>e611fa1e439f6bd0c35fd8db2ca1ced56070a915</id>
<content type='text'>
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.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.</pre>
</div>
</content>
</entry>
<entry>
<title>Bug fix for issue #5023 :  corner-case bug in single_source_dijkstra (#5033)</title>
<updated>2021-09-12T23:41:07+00:00</updated>
<author>
<name>Divyansh</name>
<email>55907095+divyanx@users.noreply.github.com</email>
</author>
<published>2021-09-12T23:41:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/networkx.git/commit/?id=bcc7a7e42b6e152ac57658e884f5184b33463b0b'/>
<id>bcc7a7e42b6e152ac57658e884f5184b33463b0b</id>
<content type='text'>
Some of the shortest_path functions have a fast-path for the case when source==target.
In some of these functions, there was no check that the source node was in the graph,
leading to incorrect results when a NodeNotFound error would be more appropriate.
This PR fixes these cases.

In addition, checking that nodes are actually in the graph was formerly done in the internal
`_dijkstra_multisource` function. These checks have been factored out and moved to the
client functions for efficiency and to prevent redundant checking.

Co-authored-by: Ross Barnowski &lt;rossbar@berkeley.edu&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some of the shortest_path functions have a fast-path for the case when source==target.
In some of these functions, there was no check that the source node was in the graph,
leading to incorrect results when a NodeNotFound error would be more appropriate.
This PR fixes these cases.

In addition, checking that nodes are actually in the graph was formerly done in the internal
`_dijkstra_multisource` function. These checks have been factored out and moved to the
client functions for efficiency and to prevent redundant checking.

Co-authored-by: Ross Barnowski &lt;rossbar@berkeley.edu&gt;</pre>
</div>
</content>
</entry>
</feed>
