Skip to content
Snippets Groups Projects
Commit 1b3a420f authored by Alán Muñoz's avatar Alán Muñoz
Browse files

docs(pipeline): add typing

parent 01d698a9
No related branches found
No related tags found
No related merge requests found
...@@ -333,7 +333,12 @@ class Pipeline(ProcessABC): ...@@ -333,7 +333,12 @@ class Pipeline(ProcessABC):
return results return results
def create_pipeline(self, image_id, index=None): def create_pipeline(
self,
image_id: t.Tuple[str, t.Union[str, PosixPath, int]],
index: t.Optional[int] = None,
):
""" """
self._pool_index = index self._pool_index = index
name, image_id = image_id name, image_id = image_id
session = None session = None
...@@ -399,7 +404,6 @@ class Pipeline(ProcessABC): ...@@ -399,7 +404,6 @@ class Pipeline(ProcessABC):
config["extraction"]["sub_bg"] config["extraction"]["sub_bg"]
) )
#
av_channels_wsub = av_channels.union( av_channels_wsub = av_channels.union(
[c + "_bgsub" for c in config["extraction"]["sub_bg"]] [c + "_bgsub" for c in config["extraction"]["sub_bg"]]
) )
...@@ -580,7 +584,45 @@ class Pipeline(ProcessABC): ...@@ -580,7 +584,45 @@ class Pipeline(ProcessABC):
} }
return switch_case[step] return switch_case[step]
def _setup_pipeline(self, image_id: int): def _setup_pipeline(
self, image_id: int
) -> t.Tuple[
PosixPath,
MetaData,
t.Dict,
int,
t.Dict,
t.Dict,
t.Optional[int],
t.List[np.ndarray],
]:
"""
Initialise pipeline components and if necessary use
exising file to continue existing experiments.
Parameters
----------
image_id : int
identifier of image in OMERO server, or filename
Returns
---------
filename: str
meta:
config:
process_from:
tps:
steps:
earlystop:
session:
trackers_state:
Examples
--------
FIXME: Add docs.
"""
config = self.parameters.to_dict() config = self.parameters.to_dict()
pparams = config pparams = config
image_id = image_id image_id = image_id
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment