Skip to content

Commit d07a554

Browse files
authored
Merge pull request #2 from BlockScience/dev
debug
2 parents 9c76f17 + b4a440c commit d07a554

File tree

7 files changed

+17
-5
lines changed

7 files changed

+17
-5
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
with:
2222
python-version: ${{ matrix.python-version }}
2323

24-
- name: Install package and dev dependencies
25-
run: pip install -e ".[dev]"
24+
- name: Install package with all dependencies
25+
run: pip install -e ".[dev,analysis,viz,viz-interactive]"
2626

2727
- name: Run tests
2828
run: python -m pytest tests/ -v --tb=short

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ dependencies = [
1111
"pyshacl>=0.25",
1212
"owlrl>=6.0",
1313
"pandas>=2.0",
14+
"pyyaml>=6.0",
1415
]
1516

1617
[project.optional-dependencies]

tests/test_analysis.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
"""
1212

1313
import pytest
14-
import numpy as np
14+
15+
np = pytest.importorskip("numpy")
16+
scipy = pytest.importorskip("scipy")
17+
1518
from numpy.testing import assert_allclose
1619

1720
from knowledgecomplex.schema import SchemaBuilder, vocab

tests/test_partition.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
"""
1313

1414
import pytest
15-
import numpy as np
15+
16+
np = pytest.importorskip("numpy")
17+
scipy = pytest.importorskip("scipy")
18+
1619
from numpy.testing import assert_allclose
1720

1821
from knowledgecomplex.schema import SchemaBuilder, vocab

tests/test_stress.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ def test_from_function_all_same_value(self):
255255
class TestAnalysisEdgeCases:
256256

257257
def test_betti_single_vertex(self):
258+
pytest.importorskip("scipy")
258259
from knowledgecomplex.analysis import betti_numbers
259260
sb = SchemaBuilder(namespace="test")
260261
sb.add_vertex_type("N")
@@ -263,13 +264,15 @@ def test_betti_single_vertex(self):
263264
assert betti_numbers(kc) == [1, 0, 0]
264265

265266
def test_betti_no_elements(self):
267+
pytest.importorskip("scipy")
266268
from knowledgecomplex.analysis import betti_numbers
267269
sb = SchemaBuilder(namespace="test")
268270
sb.add_vertex_type("N")
269271
kc = KnowledgeComplex(schema=sb)
270272
assert betti_numbers(kc) == [0, 0, 0]
271273

272274
def test_boundary_matrices_vertices_only(self):
275+
pytest.importorskip("scipy")
273276
from knowledgecomplex.analysis import boundary_matrices
274277
sb = SchemaBuilder(namespace="test")
275278
sb.add_vertex_type("N")

tests/test_topology.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""
1+
r"""
22
tests/test_topology.py
33
44
Tests for topological query methods on KnowledgeComplex:

uv.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)