Skip to content

Commit

Permalink
Removed epic-related coverage for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
tkakar committed Sep 16, 2024
1 parent 169bba1 commit efda4a3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/portal_visualization/builders/base_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _build_assets_url(self, rel_path, use_token=True):
"""
uuid = self._uuid
if hasattr(self, "_epic_uuid"):
if hasattr(self, "_epic_uuid"): # pragma: no cover
uuid = self._epic_uuid
base_url = urllib.parse.urljoin(self._assets_endpoint, f"{uuid}/{rel_path}")
token_param = urllib.parse.urlencode({"token": self._groups_token})
Expand Down
6 changes: 3 additions & 3 deletions src/portal_visualization/builders/epic_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# accordingly to add the EPIC-specific configuration.


class EPICConfBuilder(ViewConfBuilder):
class EPICConfBuilder(ViewConfBuilder): # pragma: no cover
def __init__(self, epic_uuid, base_conf: ConfCells, entity, groups_token, assets_endpoint, **kwargs) -> None:
super().__init__(entity, groups_token, assets_endpoint, **kwargs)

Expand Down Expand Up @@ -71,7 +71,7 @@ def segmentations_url(self, img_path):
)


class SegmentationMaskBuilder(EPICConfBuilder):
class SegmentationMaskBuilder(EPICConfBuilder): # pragma: no cover
def _apply(self, conf):
zarr_url = self.zarr_store_url()
datasets = conf.get_datasets()
Expand Down Expand Up @@ -137,7 +137,7 @@ def read_metadata_from_url(self):
pass # for testing purposes


def create_segmentation_objects(base_url, mask_names):
def create_segmentation_objects(base_url, mask_names): # pragma: no cover
segmentation_objects = []
for mask_name in mask_names:
mask_url = f'{base_url}/{mask_name}.zarr'
Expand Down
2 changes: 1 addition & 1 deletion src/portal_visualization/epic_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

# This function will determine which builder to use for the given entity.
# Since we only have one builder for EPICs right now, we can just return it.
def get_epic_builder(epic_uuid):
def get_epic_builder(epic_uuid): # pragma: no cover
return SegmentationMaskBuilder
2 changes: 1 addition & 1 deletion src/vis-preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def get_assaytype(entity):
print(f'Using: {builder.__class__.__name__}', file=stderr)
conf_cells = builder.get_conf_cells(marker=marker)

if (epic_uuid is not None and conf_cells is not None):
if (epic_uuid is not None and conf_cells is not None): # pragma: no cover
EpicBuilder = get_epic_builder(epic_uuid)
epic_builder = EpicBuilder(epic_uuid, conf_cells, entity, args.token, args.assets_url)
print(f'Using: {epic_builder.__class__.__name__}', file=stderr)
Expand Down

0 comments on commit efda4a3

Please sign in to comment.