Skip to content

Commit

Permalink
Document all the algorithm implementations (#1554)
Browse files Browse the repository at this point in the history
This is the same as #1510 except for all the algorithm implementations.

Depends on #1553
  • Loading branch information
Tony Tung authored Sep 18, 2019
1 parent 9f64c76 commit c16c8de
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 5 deletions.
2 changes: 1 addition & 1 deletion starfish/core/image/Filter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
all_filters = {
filter_name: filter_cls
for filter_name, filter_cls in locals().items()
if isinstance(filter_cls, type) and FilterAlgorithm in filter_cls.__mro__
if isinstance(filter_cls, type) and issubclass(filter_cls, FilterAlgorithm)
}
__all__ = list(all_filters.keys())
9 changes: 9 additions & 0 deletions starfish/core/image/Segment/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
from ._base import SegmentAlgorithm
from .watershed import Watershed

# autodoc's automodule directive only captures the modules explicitly listed in __all__.
all_filters = {
filter_name: filter_cls
for filter_name, filter_cls in locals().items()
if isinstance(filter_cls, type) and issubclass(filter_cls, SegmentAlgorithm)
}
__all__ = list(all_filters.keys())
9 changes: 9 additions & 0 deletions starfish/core/image/_registration/ApplyTransform/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
from ._base import ApplyTransformAlgorithm
from .warp import Warp

# autodoc's automodule directive only captures the modules explicitly listed in __all__.
all_filters = {
filter_name: filter_cls
for filter_name, filter_cls in locals().items()
if isinstance(filter_cls, type) and issubclass(filter_cls, ApplyTransformAlgorithm)
}
__all__ = list(all_filters.keys())
9 changes: 9 additions & 0 deletions starfish/core/image/_registration/LearnTransform/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
from ._base import LearnTransformAlgorithm
from .translation import Translation

# autodoc's automodule directive only captures the modules explicitly listed in __all__.
all_filters = {
filter_name: filter_cls
for filter_name, filter_cls in locals().items()
if isinstance(filter_cls, type) and issubclass(filter_cls, LearnTransformAlgorithm)
}
__all__ = list(all_filters.keys())
9 changes: 9 additions & 0 deletions starfish/core/spots/AssignTargets/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
from ._base import AssignTargetsAlgorithm
from .label import Label

# autodoc's automodule directive only captures the modules explicitly listed in __all__.
all_filters = {
filter_name: filter_cls
for filter_name, filter_cls in locals().items()
if isinstance(filter_cls, type) and issubclass(filter_cls, AssignTargetsAlgorithm)
}
__all__ = list(all_filters.keys())
9 changes: 9 additions & 0 deletions starfish/core/spots/Decode/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
from ._base import DecodeAlgorithm
from .metric_decoder import MetricDistance
from .per_round_max_channel_decoder import PerRoundMaxChannel

# autodoc's automodule directive only captures the modules explicitly listed in __all__.
all_filters = {
filter_name: filter_cls
for filter_name, filter_cls in locals().items()
if isinstance(filter_cls, type) and issubclass(filter_cls, DecodeAlgorithm)
}
__all__ = list(all_filters.keys())
9 changes: 9 additions & 0 deletions starfish/core/spots/DetectPixels/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
from ._base import DetectPixelsAlgorithm
from .pixel_spot_decoder import PixelSpotDecoder

# autodoc's automodule directive only captures the modules explicitly listed in __all__.
all_filters = {
filter_name: filter_cls
for filter_name, filter_cls in locals().items()
if isinstance(filter_cls, type) and issubclass(filter_cls, DetectPixelsAlgorithm)
}
__all__ = list(all_filters.keys())
13 changes: 9 additions & 4 deletions starfish/core/spots/DetectSpots/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# from starfish.core.pipeline import import_all_submodules
# from ._base import DetectSpots
# import_all_submodules(__file__, __package__)

from ._base import DetectSpotsAlgorithm
from .blob import BlobDetector
from .local_max_peak_finder import LocalMaxPeakFinder
from .local_search_blob_detector import LocalSearchBlobDetector
from .trackpy_local_max_peak_finder import TrackpyLocalMaxPeakFinder

# autodoc's automodule directive only captures the modules explicitly listed in __all__.
all_filters = {
filter_name: filter_cls
for filter_name, filter_cls in locals().items()
if isinstance(filter_cls, type) and issubclass(filter_cls, DetectSpotsAlgorithm)
}
__all__ = list(all_filters.keys())

0 comments on commit c16c8de

Please sign in to comment.