Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies = [
"pyshacl>=0.25",
"owlrl>=6.0",
"pandas>=2.0",
"pyyaml>=6.0",
]

[project.optional-dependencies]
Expand Down
5 changes: 4 additions & 1 deletion tests/test_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion tests/test_partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions tests/test_stress.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -263,13 +264,15 @@ 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")
kc = KnowledgeComplex(schema=sb)
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")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_topology.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""
r"""
tests/test_topology.py

Tests for topological query methods on KnowledgeComplex:
Expand Down
2 changes: 2 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading