Skip to content

Commit

Permalink
Test case where ng config path is not present.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgadling committed Oct 22, 2024
1 parent e592a59 commit 6e34538
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions ingestion_tools/scripts/importers/db/tomogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ def get_tomogram_type(self) -> str:

def generate_neuroglancer_data(self, config_path) -> str:
if not config_path:
return {}
tomogram_id = self.dir_prefix.split("/").pop()
return "{}"
config = self.config.load_key_json(config_path, is_file_required=True)
# TODO: Log warning
return json.dumps(config, separators=(",", ":")) if config else "{}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def expected_tomograms_by_run(http_prefix: str) -> dict[str, dict[float, list[di
"offset_x": 0,
"offset_y": 0,
"offset_z": 0,
"neuroglancer_config": '{"foo":"bar","baz":"test"}',
"neuroglancer_config": "{}",
"type": "CANONICAL",
"deposition_id": 300,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"last_modified_date": "2023-09-02",
"release_date": "2024-06-01"
},
"alignment_metadata_path": "test-public-bucket/30001/RUN1/Alignments/100/alignment_metadata.json",
"neuroglancer_config_path": "test-public-bucket/30001/RUN1/Reconstructions/VoxelSpacing12.300/NeuroglancerPrecompute/100-neuroglancer_config.json",
"alignment_metadata_path": "30001/RUN1/Alignments/100/alignment_metadata.json",
"neuroglancer_config_path": "30001/RUN1/Reconstructions/VoxelSpacing12.300/NeuroglancerPrecompute/100/neuroglancer_config.json",
"last_updated_at": 1728676818
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,5 @@
"release_date": "2022-06-01"
},
"alignment_metadata_path": "foo",
"neuroglancer_config_path": "test-public-bucket/30001/RUN2/Reconstructions/VoxelSpacing3.456/NeuroglancerPrecompute/100-neuroglancer_config.json",
"last_updated_at": 1728676818
}

0 comments on commit 6e34538

Please sign in to comment.