From b802c03b6c64b01e8779a3f0fb01d873278c6e33 Mon Sep 17 00:00:00 2001 From: Michael Zargham Date: Fri, 20 Mar 2026 23:11:46 -0400 Subject: [PATCH 1/4] debug --- pyproject.toml | 1 + tests/test_topology.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 877689a..d1de699 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,6 +11,7 @@ dependencies = [ "pyshacl>=0.25", "owlrl>=6.0", "pandas>=2.0", + "pyyaml>=6.0", ] [project.optional-dependencies] diff --git a/tests/test_topology.py b/tests/test_topology.py index 2a20b8e..438a1e4 100644 --- a/tests/test_topology.py +++ b/tests/test_topology.py @@ -1,4 +1,4 @@ -""" +r""" tests/test_topology.py Tests for topological query methods on KnowledgeComplex: From 851d543bfd4b5f86ff39af8b0f0a650205688816 Mon Sep 17 00:00:00 2001 From: Michael Zargham Date: Fri, 20 Mar 2026 23:15:07 -0400 Subject: [PATCH 2/4] scipy.numpy handling in tests --- tests/test_analysis.py | 5 ++++- tests/test_partition.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/test_analysis.py b/tests/test_analysis.py index 658e487..e57c1d5 100644 --- a/tests/test_analysis.py +++ b/tests/test_analysis.py @@ -11,7 +11,10 @@ """ import pytest -import numpy as np + +np = pytest.importorskip("numpy") +scipy = pytest.importorskip("scipy") + from numpy.testing import assert_allclose from knowledgecomplex.schema import SchemaBuilder, vocab diff --git a/tests/test_partition.py b/tests/test_partition.py index 9be1735..ace934a 100644 --- a/tests/test_partition.py +++ b/tests/test_partition.py @@ -12,7 +12,10 @@ """ import pytest -import numpy as np + +np = pytest.importorskip("numpy") +scipy = pytest.importorskip("scipy") + from numpy.testing import assert_allclose from knowledgecomplex.schema import SchemaBuilder, vocab From 94a8892d3a5f99a51a7b7b3e45def61c02847988 Mon Sep 17 00:00:00 2001 From: Michael Zargham Date: Fri, 20 Mar 2026 23:29:13 -0400 Subject: [PATCH 3/4] fix analysis dependencies --- .github/workflows/ci.yml | 4 ++-- tests/test_stress.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d665cd7..3cd66bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,8 +21,8 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install package and dev dependencies - run: pip install -e ".[dev]" + - name: Install package with all dependencies + run: pip install -e ".[dev,analysis,viz,viz-interactive]" - name: Run tests run: python -m pytest tests/ -v --tb=short diff --git a/tests/test_stress.py b/tests/test_stress.py index 24fe5c2..c201bbb 100644 --- a/tests/test_stress.py +++ b/tests/test_stress.py @@ -255,6 +255,7 @@ def test_from_function_all_same_value(self): class TestAnalysisEdgeCases: def test_betti_single_vertex(self): + pytest.importorskip("scipy") from knowledgecomplex.analysis import betti_numbers sb = SchemaBuilder(namespace="test") sb.add_vertex_type("N") @@ -263,6 +264,7 @@ def test_betti_single_vertex(self): assert betti_numbers(kc) == [1, 0, 0] def test_betti_no_elements(self): + pytest.importorskip("scipy") from knowledgecomplex.analysis import betti_numbers sb = SchemaBuilder(namespace="test") sb.add_vertex_type("N") @@ -270,6 +272,7 @@ def test_betti_no_elements(self): assert betti_numbers(kc) == [0, 0, 0] def test_boundary_matrices_vertices_only(self): + pytest.importorskip("scipy") from knowledgecomplex.analysis import boundary_matrices sb = SchemaBuilder(namespace="test") sb.add_vertex_type("N") From b4a440c07d4b29af0d79cb153830916aadb2b98b Mon Sep 17 00:00:00 2001 From: Michael Zargham Date: Fri, 20 Mar 2026 23:36:15 -0400 Subject: [PATCH 4/4] Update uv.lock --- uv.lock | 2 ++ 1 file changed, 2 insertions(+) diff --git a/uv.lock b/uv.lock index 3df45d5..3bc2200 100644 --- a/uv.lock +++ b/uv.lock @@ -584,6 +584,7 @@ dependencies = [ { name = "owlrl" }, { name = "pandas" }, { name = "pyshacl" }, + { name = "pyyaml" }, { name = "rdflib" }, ] @@ -628,6 +629,7 @@ requires-dist = [ { name = "pyshacl", specifier = ">=0.25" }, { name = "pytest", marker = "extra == 'dev'", specifier = ">=8.0" }, { name = "pytest-cov", marker = "extra == 'dev'" }, + { name = "pyyaml", specifier = ">=6.0" }, { name = "rdflib", specifier = ">=7.0" }, { name = "ruff", marker = "extra == 'dev'" }, { name = "scipy", marker = "extra == 'analysis'", specifier = ">=1.10" },