Skip to content

Commit

Permalink
Merge pull request #280 from FZJ-INM1-BDA/bugfix_imagePrecfgFolder
Browse files Browse the repository at this point in the history
bugfix: Image should not  have configuration folder + misc fixes
  • Loading branch information
xgui3783 authored Feb 24, 2023
2 parents f291554 + 41ef266 commit 9305158
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
8 changes: 8 additions & 0 deletions e2e/features/test_get.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import pytest
import siibra

# We get all registered subclasses of Feature
@pytest.mark.parametrize('Cls', [Cls for Cls in siibra.features.Feature.SUBCLASSES[siibra.features.Feature]])
def test_get_instances(Cls: siibra.features.Feature):
instances = Cls.get_instances()
assert isinstance(instances, list)
1 change: 1 addition & 0 deletions siibra/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,5 @@ def __dir__():
"set_ebrains_token",
"vocabularies",
"__version__",
"cache",
]
2 changes: 2 additions & 0 deletions siibra/features/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class Feature:
SUBCLASSES: Dict[Type['Feature'], List[Type['Feature']]] = defaultdict(list)

CATEGORIZED: Dict[str, Type['InstanceTable']] = defaultdict(InstanceTable)

category: str = None

def __init__(
self,
Expand Down
2 changes: 1 addition & 1 deletion siibra/features/image/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __str__(self):
return f"Bounding box of image in {self.space.name}"


class Image(feature.Feature, _volume.Volume, configuration_folder='features/images/sections'):
class Image(feature.Feature, _volume.Volume):

def __init__(
self,
Expand Down
4 changes: 2 additions & 2 deletions siibra/locations/point.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
import json
import numbers
import hashlib
from typing import Union
from typing import Union, Tuple


class Point(location.Location):
"""A single 3D point in reference space."""

@staticmethod
def parse(spec, unit="mm"):
def parse(spec, unit="mm") -> Tuple[float, float, float]:
"""Converts a 3D coordinate specification into a 3D tuple of floats.
Parameters
Expand Down

0 comments on commit 9305158

Please sign in to comment.