From d71fec062b3fb21bd8b87736767851dfe3843e7b Mon Sep 17 00:00:00 2001 From: CodyCBakerPhD Date: Fri, 16 Aug 2024 14:13:18 -0400 Subject: [PATCH] remove from main testing --- .../expected_output/000003/0.210812.1448.tsv | 3 - .../expected_output/000003/0.230629.1955.tsv | 3 - .../expected_output/000003/draft.tsv | 3 - .../expected_output/000013/0.220126.2143.tsv | 3 - .../expected_output/000013/draft.tsv | 3 - .../58c53789-eec4-4080-ad3b-207cf2a1cac9.tsv | 3 - .../cad9e87d-9154-464c-91d6-2f08f2a9c354.tsv | 3 - .../test_map_reduced_logs_to_all_dandisets.py | 56 ------------------- 8 files changed, 77 deletions(-) delete mode 100644 tests/examples/mapped_to_dandiset_example_0/expected_output/000003/0.210812.1448.tsv delete mode 100644 tests/examples/mapped_to_dandiset_example_0/expected_output/000003/0.230629.1955.tsv delete mode 100644 tests/examples/mapped_to_dandiset_example_0/expected_output/000003/draft.tsv delete mode 100644 tests/examples/mapped_to_dandiset_example_0/expected_output/000013/0.220126.2143.tsv delete mode 100644 tests/examples/mapped_to_dandiset_example_0/expected_output/000013/draft.tsv delete mode 100644 tests/examples/mapped_to_dandiset_example_0/reduced_logs/blobs/58c/537/58c53789-eec4-4080-ad3b-207cf2a1cac9.tsv delete mode 100644 tests/examples/mapped_to_dandiset_example_0/reduced_logs/blobs/cad/9e8/cad9e87d-9154-464c-91d6-2f08f2a9c354.tsv delete mode 100644 tests/test_map_reduced_logs_to_all_dandisets.py diff --git a/tests/examples/mapped_to_dandiset_example_0/expected_output/000003/0.210812.1448.tsv b/tests/examples/mapped_to_dandiset_example_0/expected_output/000003/0.210812.1448.tsv deleted file mode 100644 index 953e052..0000000 --- a/tests/examples/mapped_to_dandiset_example_0/expected_output/000003/0.210812.1448.tsv +++ /dev/null @@ -1,3 +0,0 @@ - filename timestamp bytes_sent region -0 sub-YutaMouse20/sub-YutaMouse20_ses-YutaMouse20-140327_behavior+ecephys.nwb 2022-03-16 02:21:12 512 unknown -1 sub-YutaMouse20/sub-YutaMouse20_ses-YutaMouse20-140327_behavior+ecephys.nwb 2022-05-04 05:06:35 512 unknown diff --git a/tests/examples/mapped_to_dandiset_example_0/expected_output/000003/0.230629.1955.tsv b/tests/examples/mapped_to_dandiset_example_0/expected_output/000003/0.230629.1955.tsv deleted file mode 100644 index 953e052..0000000 --- a/tests/examples/mapped_to_dandiset_example_0/expected_output/000003/0.230629.1955.tsv +++ /dev/null @@ -1,3 +0,0 @@ - filename timestamp bytes_sent region -0 sub-YutaMouse20/sub-YutaMouse20_ses-YutaMouse20-140327_behavior+ecephys.nwb 2022-03-16 02:21:12 512 unknown -1 sub-YutaMouse20/sub-YutaMouse20_ses-YutaMouse20-140327_behavior+ecephys.nwb 2022-05-04 05:06:35 512 unknown diff --git a/tests/examples/mapped_to_dandiset_example_0/expected_output/000003/draft.tsv b/tests/examples/mapped_to_dandiset_example_0/expected_output/000003/draft.tsv deleted file mode 100644 index 953e052..0000000 --- a/tests/examples/mapped_to_dandiset_example_0/expected_output/000003/draft.tsv +++ /dev/null @@ -1,3 +0,0 @@ - filename timestamp bytes_sent region -0 sub-YutaMouse20/sub-YutaMouse20_ses-YutaMouse20-140327_behavior+ecephys.nwb 2022-03-16 02:21:12 512 unknown -1 sub-YutaMouse20/sub-YutaMouse20_ses-YutaMouse20-140327_behavior+ecephys.nwb 2022-05-04 05:06:35 512 unknown diff --git a/tests/examples/mapped_to_dandiset_example_0/expected_output/000013/0.220126.2143.tsv b/tests/examples/mapped_to_dandiset_example_0/expected_output/000013/0.220126.2143.tsv deleted file mode 100644 index 919df08..0000000 --- a/tests/examples/mapped_to_dandiset_example_0/expected_output/000013/0.220126.2143.tsv +++ /dev/null @@ -1,3 +0,0 @@ - filename timestamp bytes_sent region -0 sub-anm215592/sub-anm215592_ses-20131015_obj-odx8px_behavior+icephys+ogen.nwb 2021-04-24 12:03:05 1443 unknown -1 sub-anm215592/sub-anm215592_ses-20131015_obj-odx8px_behavior+icephys+ogen.nwb 2021-12-31 23:06:42 1443 unknown diff --git a/tests/examples/mapped_to_dandiset_example_0/expected_output/000013/draft.tsv b/tests/examples/mapped_to_dandiset_example_0/expected_output/000013/draft.tsv deleted file mode 100644 index 919df08..0000000 --- a/tests/examples/mapped_to_dandiset_example_0/expected_output/000013/draft.tsv +++ /dev/null @@ -1,3 +0,0 @@ - filename timestamp bytes_sent region -0 sub-anm215592/sub-anm215592_ses-20131015_obj-odx8px_behavior+icephys+ogen.nwb 2021-04-24 12:03:05 1443 unknown -1 sub-anm215592/sub-anm215592_ses-20131015_obj-odx8px_behavior+icephys+ogen.nwb 2021-12-31 23:06:42 1443 unknown diff --git a/tests/examples/mapped_to_dandiset_example_0/reduced_logs/blobs/58c/537/58c53789-eec4-4080-ad3b-207cf2a1cac9.tsv b/tests/examples/mapped_to_dandiset_example_0/reduced_logs/blobs/58c/537/58c53789-eec4-4080-ad3b-207cf2a1cac9.tsv deleted file mode 100644 index 570c480..0000000 --- a/tests/examples/mapped_to_dandiset_example_0/reduced_logs/blobs/58c/537/58c53789-eec4-4080-ad3b-207cf2a1cac9.tsv +++ /dev/null @@ -1,3 +0,0 @@ -timestamp bytes_sent ip_address line_index -2022-03-16 02:21:12 512 192.0.2.0 1 -2022-05-04 05:06:35 512 192.0.2.0 1 diff --git a/tests/examples/mapped_to_dandiset_example_0/reduced_logs/blobs/cad/9e8/cad9e87d-9154-464c-91d6-2f08f2a9c354.tsv b/tests/examples/mapped_to_dandiset_example_0/reduced_logs/blobs/cad/9e8/cad9e87d-9154-464c-91d6-2f08f2a9c354.tsv deleted file mode 100644 index 0851ae8..0000000 --- a/tests/examples/mapped_to_dandiset_example_0/reduced_logs/blobs/cad/9e8/cad9e87d-9154-464c-91d6-2f08f2a9c354.tsv +++ /dev/null @@ -1,3 +0,0 @@ -timestamp bytes_sent ip_address line_index -2021-04-24 12:03:05 1443 192.0.2.0 0 -2021-12-31 23:06:42 1443 192.0.2.0 0 diff --git a/tests/test_map_reduced_logs_to_all_dandisets.py b/tests/test_map_reduced_logs_to_all_dandisets.py deleted file mode 100644 index 5bbc7a2..0000000 --- a/tests/test_map_reduced_logs_to_all_dandisets.py +++ /dev/null @@ -1,56 +0,0 @@ -import pathlib - -import pandas -import py - -import dandi_s3_log_parser - - -def test_map_reduced_logs_to_dandisets(tmpdir: py.path.local): - tmpdir = pathlib.Path(tmpdir) - - file_parent = pathlib.Path(__file__).parent - examples_folder_path = file_parent / "examples" / "mapped_to_dandiset_example_0" - reduced_s3_logs_folder_path = examples_folder_path / "reduced_logs" - dandiset_logs_folder_path = tmpdir - - dandi_s3_log_parser.map_reduced_logs_to_dandisets( - reduced_s3_logs_folder_path=reduced_s3_logs_folder_path, - dandiset_logs_folder_path=dandiset_logs_folder_path, - ) - - expected_output_folder_path = examples_folder_path / "expected_output" - - # Ensure to extra folders were created - test_dandiset_id_folder_paths = [ - dandiset_id_folder_path.stem for dandiset_id_folder_path in dandiset_logs_folder_path.iterdir() - ] - expected_dandiset_id_folder_paths = [ - dandiset_id_folder_path.stem for dandiset_id_folder_path in expected_output_folder_path.iterdir() - ] - assert set(test_dandiset_id_folder_paths) == set(expected_dandiset_id_folder_paths) - - test_dandiset_version_id_file_paths = { - f"{version_id_file_path.parent.name}/{version_id_file_path.name}": version_id_file_path - for dandiset_id_folder_path in dandiset_logs_folder_path.iterdir() - for version_id_file_path in dandiset_id_folder_path.iterdir() - } - expected_dandiset_version_id_file_paths = { - f"{version_id_file_path.parent.name}/{version_id_file_path.name}": version_id_file_path - for dandiset_id_folder_path in expected_output_folder_path.iterdir() - for version_id_file_path in dandiset_id_folder_path.iterdir() - } - assert set(test_dandiset_version_id_file_paths.keys()) == set(expected_dandiset_version_id_file_paths.keys()) - - for expected_version_id_file_path in expected_dandiset_version_id_file_paths.values(): - # Pandas assertion makes no reference to the file being tested when it fails - print(expected_version_id_file_path) - - test_version_id_file_path = ( - dandiset_logs_folder_path / expected_version_id_file_path.parent.name / expected_version_id_file_path.name - ) - - test_mapped_log = pandas.read_table(filepath_or_buffer=test_version_id_file_path, index_col=0) - expected_mapped_log = pandas.read_table(filepath_or_buffer=expected_version_id_file_path, index_col=0) - - pandas.testing.assert_frame_equal(left=test_mapped_log, right=expected_mapped_log)