Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/murfey/client/contexts/spa.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,16 @@
break
else:
raise ValueError(f"Could not determine grid square metadata path for {f}")
return (
metadata_file = (

Check warning on line 69 in src/murfey/client/contexts/spa.py

View check run for this annotation

Codecov / codecov/patch

src/murfey/client/contexts/spa.py#L69

Added line #L69 was not covered by tests
base_dir
/ visit
/ mid_dir.parent.parent.parent
/ "Metadata"
/ f"GridSquare_{grid_square}.dm"
)
if not metadata_file.is_file():
logger.warning(f"Grid square metadata file {str(metadata_file)} does not exist")
return metadata_file

Check warning on line 78 in src/murfey/client/contexts/spa.py

View check run for this annotation

Codecov / codecov/patch

src/murfey/client/contexts/spa.py#L77-L78

Added lines #L77 - L78 were not covered by tests


def _get_source(file_path: Path, environment: MurfeyInstanceEnvironment) -> Path | None:
Expand Down
4 changes: 4 additions & 0 deletions src/murfey/client/contexts/spa_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
required_key = key
break
if not required_key:
logger.warning(f"Required key not found for {str(xml_path)}")

Check warning on line 33 in src/murfey/client/contexts/spa_metadata.py

View check run for this annotation

Codecov / codecov/patch

src/murfey/client/contexts/spa_metadata.py#L33

Added line #L33 was not covered by tests
return {}
foil_holes = {}
for fh_block in serialization_array[required_key]:
Expand Down Expand Up @@ -186,6 +187,9 @@
and environment
):
gs_name = transferred_file.stem.split("_")[1]
logger.info(

Check warning on line 190 in src/murfey/client/contexts/spa_metadata.py

View check run for this annotation

Codecov / codecov/patch

src/murfey/client/contexts/spa_metadata.py#L190

Added line #L190 was not covered by tests
f"Collecting foil hole positions for {str(transferred_file)} and grid square {int(gs_name)}"
)
fh_positions = _foil_hole_positions(transferred_file, int(gs_name))
source = _get_source(transferred_file, environment=environment)
visitless_source = str(source).replace(f"/{environment.visit}", "")
Expand Down
3 changes: 3 additions & 0 deletions src/murfey/util/spa_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@
f"Images-Disc*/GridSquare_{grid_square}/GridSquare_*.jpg"
)
)
logger.info(

Check warning on line 126 in src/murfey/util/spa_metadata.py

View check run for this annotation

Codecov / codecov/patch

src/murfey/util/spa_metadata.py#L126

Added line #L126 was not covered by tests
f"{len(image_paths)} images found when searching {str(xml_path.parent.parent)}"
)
if image_paths:
image_paths.sort(key=lambda x: x.stat().st_ctime)
image_path = image_paths[-1]
Expand Down
Loading