Skip to content

Commit c177681

Browse files
committed
Adjust analyser logic so that Tomo and SPA-related data processing is triggered if an extension is present; iterate through all contexts for the first file the analyser receives that is used to determine the context
1 parent 0128b06 commit c177681

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/murfey/client/analyser.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -411,14 +411,11 @@ def _analyse(self, transferred_file: Path):
411411
elif transferred_file.suffix == ".mdoc":
412412
self._mdoc_for_reading = transferred_file
413413
if not self._context:
414-
if not self._find_extension(transferred_file):
415-
logger.debug(f"No extension found for {transferred_file}")
416-
return
417414
if not self._find_context(transferred_file):
418415
logger.debug(f"Couldn't find context for {str(transferred_file)!r}")
419416
return
420-
elif self._extension:
421-
logger.info(f"Context found successfully for {transferred_file}")
417+
logger.info(f"Context found successfully for {transferred_file}")
418+
if self._find_extension(transferred_file):
422419
try:
423420
if self._context is not None:
424421
self._context.post_first_transfer(
@@ -474,8 +471,9 @@ def _analyse(self, transferred_file: Path):
474471
"is not set"
475472
)
476473

474+
# Run through the contexts
477475
# Contexts that can be immediately posted without additional work
478-
elif "CLEMContext" in str(self._context):
476+
if "CLEMContext" in str(self._context):
479477
logger.debug(f"File {transferred_file.name!r} is part of CLEM workflow")
480478
self.post_transfer(transferred_file)
481479
elif "FIBContext" in str(self._context):

0 commit comments

Comments
 (0)