diff options
author | Jim Kitchen <jim22k@users.noreply.github.com> | 2023-03-28 18:17:46 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-28 19:17:46 -0400 |
commit | abd0a82d06c0ae8ecc1c60e5a9bde4c0dee08d48 (patch) | |
tree | f84c8b95d9fbbaaf3bedacbc4dacefc0587e192c /setup.py | |
parent | 3aad1e8974e5e457adbe37fc55ac9755b5f7a388 (diff) | |
download | networkx-abd0a82d06c0ae8ecc1c60e5a9bde4c0dee08d48.tar.gz |
Test dispatching via nx-loopback backend (#6536)
* 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
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -151,6 +151,11 @@ package_data = { "networkx.utils": ["tests/*.py"], } +# Loopback dispatcher required for testing nx._dispatch decorator +entry_points = { + "networkx.plugins": "nx-loopback = networkx.classes.tests.dispatch_interface:dispatcher" +} + def parse_requirements_file(filename): with open(filename) as fid: @@ -188,6 +193,7 @@ if __name__ == "__main__": package_data=package_data, install_requires=install_requires, extras_require=extras_require, + entry_points=entry_points, python_requires=">=3.8", zip_safe=False, ) |