diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 610dddc64..564f7e527 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] + python-version: ['3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 @@ -112,7 +112,7 @@ jobs: strategy: matrix: os: [ubuntu, macos, windows] - python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] + python-version: ['3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 diff --git a/pyproject.toml b/pyproject.toml index d39a01a27..e5e6cc12d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "xgi" dynamic = ["version"] description = "XGI is a Python package for higher-order networks." readme = "README.md" -requires-python = ">=3.9" +requires-python = ">=3.10" license = {file = "LICENSE.md"} authors = [ {name = "XGI Developers", email = "nicholas.landry@virginia.edu"} @@ -30,7 +30,6 @@ classifiers = [ "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -43,8 +42,8 @@ classifiers = [ "Topic :: Scientific/Engineering :: Physics", ] dependencies = [ - "numpy>=1.20", - "scipy>=1.8", + "numpy>=1.23.5", + "scipy>=1.15", "pandas>=1.3", "networkx>=2.7", "requests>=2.0", diff --git a/requirements/default.txt b/requirements/default.txt index c25b72295..0b67041e9 100644 --- a/requirements/default.txt +++ b/requirements/default.txt @@ -1,7 +1,7 @@ # Generated via tools/generate_requirements.py and pre-commit hook. # Do not edit this file; modify pyproject.toml instead. -numpy>=1.20 -scipy>=1.8 +numpy>=1.23.5 +scipy>=1.15 pandas>=1.3 networkx>=2.7 requests>=2.0 diff --git a/tests/linalg/test_matrix.py b/tests/linalg/test_matrix.py index cd59ff2f6..b66eb7350 100644 --- a/tests/linalg/test_matrix.py +++ b/tests/linalg/test_matrix.py @@ -255,6 +255,23 @@ def test_adjacency_matrix(edgelist1, edgelist4): assert np.all(A7 == A7_sp.todense()) +def test_fix_649(): # make sure diagonal is fully zero when sparse + + H = xgi.load_xgi_data(dataset="email-enron") + H.cleanup(isolates=True, singletons=False, connected=True, relabel=False, multiedges=False) + + weighted = True + order = 1 + + adj = xgi.adjacency_matrix(H, order=order, sparse=False, weighted=weighted, index=False) + + adj_sparse = xgi.adjacency_matrix(H, order=order, sparse=True, weighted=weighted, index=False) + adj_sparse = adj_sparse.todense() + + assert np.all(np.diag(adj_sparse)==0) + + + def test_laplacian(edgelist2, edgelist6): el1 = edgelist6 H1 = xgi.Hypergraph(el1) diff --git a/tools/generate_requirements.py b/tools/generate_requirements.py index 35fbe8a16..304defc9f 100644 --- a/tools/generate_requirements.py +++ b/tools/generate_requirements.py @@ -1,6 +1,8 @@ #!/usr/bin/env python """Generate requirements/*.txt files from pyproject.toml. +Run from repo root folder. + Copied from NetworkX: https://github.com/networkx/networkx/blob/main/tools/generate_requirements.py """