From 574c83e71df11b896328f59e7e72471bbe1fe4d8 Mon Sep 17 00:00:00 2001 From: bw4sz Date: Wed, 27 Nov 2024 10:11:04 -0800 Subject: [PATCH] local tests pass besides integration tests with ssh keys --- conf/config.yaml | 2 +- tests/test_visualization.py | 21 --------------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/conf/config.yaml b/conf/config.yaml index 2086828..af4f340 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -64,7 +64,7 @@ pipeline_evaluation: reporting: image_dir: /blue/ewhite/b.weinstein/BOEM/reporting/samples report_dir: /blue/ewhite/b.weinstein/BOEM/reporting/reports - metadata_dir: /blue/ewhite/b.weinstein/BOEM/reporting/metadata + metadata: /blue/ewhite/b.weinstein/BOEM/reporting/metadata.csv active_learning: image_dir: /blue/ewhite/b.weinstein/BOEM/sample_flight/JPG_2024_Jan27 diff --git a/tests/test_visualization.py b/tests/test_visualization.py index c90e8a9..d80e363 100644 --- a/tests/test_visualization.py +++ b/tests/test_visualization.py @@ -89,28 +89,7 @@ def test_create_summary_image(mock_model, tmp_path, test_predictions): summary = visualizer.create_summary_image(predictions_list) assert isinstance(summary, np.ndarray) assert summary.shape == (600, 800, 3) - -def test_empty_image_dir(mock_model, tmp_path, test_predictions): - """Test handling of empty image directory.""" - empty_dir = tmp_path / "empty" - empty_dir.mkdir() - visualizer = PredictionVisualizer(test_predictions, tmp_path) - with pytest.raises(ValueError, match="No images found"): - visualizer.create_visualization(list(empty_dir.glob("*.jpg"))) - -def test_invalid_image(mock_model, tmp_path): - """Test handling of invalid image file.""" - image_dir = tmp_path / "images" - image_dir.mkdir() - - # Create invalid image file - (image_dir / "invalid.jpg").write_text("not an image") - - visualizer = PredictionVisualizer(test_predictions, tmp_path) - with pytest.raises(ValueError, match="Could not read first image"): - visualizer.create_visualization(list(image_dir.glob("*.jpg"))) - @pytest.mark.parametrize("confidence_threshold", [0.3, 0.7, 0.9]) def test_confidence_thresholds(mock_model, tmp_path, test_image, test_predictions, confidence_threshold): """Test different confidence thresholds."""