From de7b34773ab8222a520ab309a101ad29d7e89a24 Mon Sep 17 00:00:00 2001 From: Nicholas Landry Date: Sat, 28 Oct 2023 12:15:06 -0400 Subject: [PATCH] added python 3.12 (#488) * added python 3.12 * remove slice tests --- .github/workflows/coverage.yml | 2 +- .github/workflows/test.yml | 4 ++-- docs/source/about.rst | 2 +- docs/source/index.rst | 2 +- tests/core/test_dihypergraph.py | 4 ---- tests/core/test_diviews.py | 12 ------------ tests/core/test_hypergraph.py | 2 -- tests/core/test_views.py | 3 --- 8 files changed, 5 insertions(+), 26 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 11132460d..f475c8d25 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: '3.12' - name: Install packages run: | python -m pip install --upgrade pip wheel setuptools diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 000ca18eb..b0d7d7ac7 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.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v2 @@ -56,7 +56,7 @@ jobs: strategy: matrix: os: [ubuntu, macos, windows] - python-version: ['3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v2 diff --git a/docs/source/about.rst b/docs/source/about.rst index 15d5b2527..9b37b7c3e 100644 --- a/docs/source/about.rst +++ b/docs/source/about.rst @@ -55,7 +55,7 @@ If that command does not work, you may try the following instead pip install -e .\[all\] -XGI was developed and tested for Python 3.8-3.11 on Mac OS, Windows, and Ubuntu. +XGI was developed and tested for Python 3.8-3.12 on Mac OS, Windows, and Ubuntu. Academic References diff --git a/docs/source/index.rst b/docs/source/index.rst index 68a523c0f..391263fe3 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -100,7 +100,7 @@ If that command does not work, you may try the following instead pip install -e .\[all\] -XGI was developed and tested for Python 3.8-3.11 on Mac OS, Windows, and Ubuntu. +XGI was developed and tested for Python 3.8-3.12 on Mac OS, Windows, and Ubuntu. Corresponding Data diff --git a/tests/core/test_dihypergraph.py b/tests/core/test_dihypergraph.py index 80301a14b..1bb3a25ed 100644 --- a/tests/core/test_dihypergraph.py +++ b/tests/core/test_dihypergraph.py @@ -96,8 +96,6 @@ def test_memberships(diedgelist1): assert H.nodes([1, 2, 6]).memberships() == {1: {0}, 2: {0}, 6: {1}} with pytest.raises(IDNotFound): H.nodes.memberships(0) - with pytest.raises(TypeError): - H.nodes.memberships(slice(1, 4)) def test_dimemberships(diedgelist1): @@ -114,8 +112,6 @@ def test_dimemberships(diedgelist1): } with pytest.raises(IDNotFound): H.nodes.memberships(0) - with pytest.raises(TypeError): - H.nodes.memberships(slice(1, 4)) def test_add_edge_accepts_different_types(): diff --git a/tests/core/test_diviews.py b/tests/core/test_diviews.py index d7b0c5ac9..1b40fc1bd 100644 --- a/tests/core/test_diviews.py +++ b/tests/core/test_diviews.py @@ -108,9 +108,6 @@ def test_edge_members(diedgelist2): with pytest.raises(XGIError): H.edges.members(dtype=np.array) - with pytest.raises(TypeError): - H.edges.members(slice(1, 4, 1)) - with pytest.raises(TypeError): H.edges.members([1, 2]) @@ -130,9 +127,6 @@ def test_edge_dimembers(diedgelist2): with pytest.raises(XGIError): H.edges.dimembers(dtype=np.array) - with pytest.raises(TypeError): - H.edges.dimembers(slice(1, 4, 1)) - with pytest.raises(TypeError): H.edges.dimembers([1, 2]) @@ -150,9 +144,6 @@ def test_edge_tail(diedgelist2): with pytest.raises(XGIError): H.edges.tail(dtype=np.array) - with pytest.raises(TypeError): - H.edges.tail(slice(1, 4, 1)) - with pytest.raises(TypeError): H.edges.tail([1, 2]) @@ -169,9 +160,6 @@ def test_edge_head(diedgelist2): with pytest.raises(XGIError): H.edges.head(dtype=np.array) - with pytest.raises(TypeError): - H.edges.head(slice(1, 4, 1)) - with pytest.raises(TypeError): H.edges.head([1, 2]) diff --git a/tests/core/test_hypergraph.py b/tests/core/test_hypergraph.py index 74fbe74ee..b3a330c58 100644 --- a/tests/core/test_hypergraph.py +++ b/tests/core/test_hypergraph.py @@ -169,8 +169,6 @@ def test_memberships(edgelist1): assert H.nodes([1, 2, 6]).memberships() == {1: {0}, 2: {0}, 6: {2, 3}} with pytest.raises(IDNotFound): H.nodes.memberships(0) - with pytest.raises(TypeError): - H.nodes.memberships(slice(1, 4)) def test_add_edge(): diff --git a/tests/core/test_views.py b/tests/core/test_views.py index 6676f7c1d..b6af56f99 100644 --- a/tests/core/test_views.py +++ b/tests/core/test_views.py @@ -161,9 +161,6 @@ def test_edge_members(edgelist3): with pytest.raises(XGIError): H.edges.members(dtype=np.array) - with pytest.raises(TypeError): - H.edges.members(slice(1, 4, 1)) - with pytest.raises(TypeError): H.edges.members([1, 2])