Skip to content

Commit

Permalink
update tests and workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamaedler committed May 31, 2024
1 parent 2a67c0b commit 63bfaf1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/generate_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ jobs:
- name: Install Sphinx and additional dependences
run: |
pip install sphinx sphinx-rtd-theme sphinx-autodoc-typehints sphinx-argparse nbsphinx renku-sphinx-theme
- name: Install Pandoc
uses: pandoc/actions/setup
- name: Generate Documentation
uses: docker://pandoc/core:2.9
run: |
cd docs_source
make clean
Expand Down
6 changes: 3 additions & 3 deletions src/sparcscore/processing_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_segment_threshold():
), "Output labels and input image shapes are not equal"

# Check if output has the correct dtype (int)
assert isinstance(labels.dtype, np.int), "Output label dtype is not integer"
assert isinstance(labels.dtype, int), "Output label dtype is not integer"

# Check if values are non-negative
assert np.all(labels >= 0), "Output labels contain negative values"
Expand All @@ -55,7 +55,7 @@ def test_segment_global_threshold():
), "Output labels and input image shapes are not equal"

# Check if output has the correct dtype (int)
assert isinstance(labels.dtype, np.int), "Output label dtype is not integer"
assert isinstance(labels.dtype, int), "Output label dtype is not integer"

# Check if values are non-negative
assert np.all(labels >= 0), "Output labels contain negative values"
Expand Down Expand Up @@ -234,7 +234,7 @@ def test_numba_mask_centroid():
centers, points_class, ids = numba_mask_centroid(mask)
expected_centers = np.array([[0.33333333, 1.66666667], [1.5, 1.5]])
expected_points_class = np.array([3, 2], dtype=np.uint32)
expected_ids = np.array([1, 2], dtype=np.int32)
expected_ids = np.array([1, 2], dtype=int)

assert np.allclose(centers, expected_centers, atol=1e-6)
assert np.all(points_class == expected_points_class)
Expand Down

0 comments on commit 63bfaf1

Please sign in to comment.