summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorJim Kitchen <jim22k@users.noreply.github.com>2023-03-28 18:17:46 -0500
committerGitHub <noreply@github.com>2023-03-28 19:17:46 -0400
commitabd0a82d06c0ae8ecc1c60e5a9bde4c0dee08d48 (patch)
treef84c8b95d9fbbaaf3bedacbc4dacefc0587e192c /setup.py
parent3aad1e8974e5e457adbe37fc55ac9755b5f7a388 (diff)
downloadnetworkx-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.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index c40405a5..30a75746 100644
--- a/setup.py
+++ b/setup.py
@@ -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,
)