Skip to content

Commit 93c08ea

Browse files
committed
Adjusted naming convention for LIF and TIFF processing functions and endpoints
1 parent 3fd77b4 commit 93c08ea

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ murfey = "murfey.client:run"
9898
[project.entry-points."murfey.config.extraction"]
9999
"murfey_machine" = "murfey.util.config:get_extended_machine_config"
100100
[project.entry-points."murfey.workflows.clem"]
101-
"lif_to_stack" = "murfey.workflows.clem.lif_to_stack:zocalo_cluster_request"
102-
"register_lif_preprocessing_result" = "murfey.workflows.clem.register_results:register_lif_preprocessing_result"
103-
"register_tiff_preprocessing_result" = "murfey.workflows.clem.register_results:register_tiff_preprocessing_result"
104-
"tiff_to_stack" = "murfey.workflows.clem.tiff_to_stack:zocalo_cluster_request"
101+
"process_raw_lifs" = "murfey.workflows.clem.process_raw_lifs:zocalo_cluster_request"
102+
"process_raw_tiffs" = "murfey.workflows.clem.process_raw_tiffs:zocalo_cluster_request"
103+
"register_lif_preprocessing_result" = "murfey.workflows.clem.register_preprocessing_results:register_lif_preprocessing_result"
104+
"register_tiff_preprocessing_result" = "murfey.workflows.clem.register_preprocessing_results:register_tiff_preprocessing_result"
105105

106106
[tool.setuptools]
107107
package-dir = {"" = "src"}

src/murfey/client/contexts/clem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def process_lif_file(
386386

387387
try:
388388
# Construct the URL to post the request to
389-
url = f"{str(environment.url.geturl())}/sessions/{environment.murfey_session}/clem/preprocessing/lif_to_stack?lif_file={quote(str(lif_file), safe='')}"
389+
url = f"{str(environment.url.geturl())}/sessions/{environment.murfey_session}/clem/preprocessing/process_raw_lifs?lif_file={quote(str(lif_file), safe='')}"
390390
# Validate
391391
if not url:
392392
logger.error(
@@ -442,7 +442,7 @@ def process_tiff_series(
442442

443443
try:
444444
# Construct URL for Murfey server to communicate with
445-
url = f"{str(environment.url.geturl())}/sessions/{environment.murfey_session}/clem/preprocessing/tiff_to_stack"
445+
url = f"{str(environment.url.geturl())}/sessions/{environment.murfey_session}/clem/preprocessing/process_raw_tiffs"
446446
if not url:
447447
logger.error(
448448
"URL could not be constructed from the environment and file path"

src/murfey/server/api/clem.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -632,16 +632,16 @@ def register_image_stack(
632632

633633

634634
@router.post(
635-
"/sessions/{session_id}/clem/preprocessing/lif_to_stack"
635+
"/sessions/{session_id}/clem/preprocessing/process_raw_lifs"
636636
) # API posts to this URL
637-
def lif_to_stack(
637+
def process_raw_lifs(
638638
session_id: int, # Used by the decorator
639639
lif_file: Path,
640640
db: Session = murfey_db,
641641
):
642642
# Get command line entry point
643643
murfey_workflows = entry_points().select(
644-
group="murfey.workflows.clem", name="lif_to_stack"
644+
group="murfey.workflows.clem", name="process_raw_lifs"
645645
)
646646

647647
# Use entry point if found
@@ -657,7 +657,7 @@ def lif_to_stack(
657657
# Pass arguments along to the correct workflow
658658
workflow: EntryPoint = list(murfey_workflows)[0]
659659
workflow.load()(
660-
# Match the arguments found in murfey.workflows.lif_to_stack
660+
# Match the arguments found in murfey.workflows.process_raw_lifs
661661
file=lif_file,
662662
root_folder="images",
663663
session_id=session_id,
@@ -671,15 +671,15 @@ def lif_to_stack(
671671
raise RuntimeError("The relevant Murfey workflow was not found")
672672

673673

674-
@router.post("/sessions/{session_id}/clem/preprocessing/tiff_to_stack")
675-
def tiff_to_stack(
674+
@router.post("/sessions/{session_id}/clem/preprocessing/process_raw_tiffs")
675+
def process_raw_tiffs(
676676
session_id: int, # Used by the decorator
677677
tiff_info: TIFFSeriesInfo,
678678
db: Session = murfey_db,
679679
):
680680
# Get command line entry point
681681
murfey_workflows = entry_points().select(
682-
group="murfey.workflows.clem", name="tiff_to_stack"
682+
group="murfey.workflows.clem", name="process_raw_tiffs"
683683
)
684684

685685
# Use entry point if found
@@ -694,7 +694,7 @@ def tiff_to_stack(
694694
# Pass arguments to correct workflow
695695
workflow: EntryPoint = list(murfey_workflows)[0]
696696
workflow.load()(
697-
# Match the arguments found in murfey.workflows.tiff_to_stack
697+
# Match the arguments found in murfey.workflows.process_raw_tiffs
698698
tiff_list=tiff_info.tiff_files,
699699
root_folder="images",
700700
session_id=session_id,
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)