diff --git a/atom3d/datasets/datasets.py b/atom3d/datasets/datasets.py index 4f2f580..b0930be 100644 --- a/atom3d/datasets/datasets.py +++ b/atom3d/datasets/datasets.py @@ -358,8 +358,6 @@ def get_file_list(input_path, filetype): if not fo.is_type(x, filetype): continue x = os.path.join(input_dir, x) - if not os.path.exists(x): - raise RuntimeError(f'{x} does not exist!') file_list.append(x) else: file_list = fi.find_files(input_path, fo.patterns[filetype]) diff --git a/setup.py b/setup.py index 2d7b8eb..3836067 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ 'atom3d.filters', 'atom3d.data', ]), - version='0.1.5', + version='0.1.6', description='ATOM3D: Tasks On Molecules in 3 Dimensions', author='ATOM3D developers', license='MIT', diff --git a/tests/datasets/test_datasets.py b/tests/datasets/test_datasets.py index 144107a..22573d3 100644 --- a/tests/datasets/test_datasets.py +++ b/tests/datasets/test_datasets.py @@ -27,6 +27,12 @@ def test_load_dataset_list(): assert df['atoms'].y.dtype == 'float' assert df['atoms'].z.dtype == 'float' +def test_load_dataset_list_nonexistent(): + dataset = da.load_dataset('tests/test_data/list/nonexistent.txt', 'pdb') + assert len(dataset) == 1 + with pytest.raises(FileNotFoundError): + df = dataset[0] + #def test_load_dataset_sharded(): # dataset = da.load_dataset('tests/test_data/sharded', 'sharded') # assert len(dataset) == 4 diff --git a/tests/test_data/list/nonexistent.txt b/tests/test_data/list/nonexistent.txt new file mode 100644 index 0000000..022bc0c --- /dev/null +++ b/tests/test_data/list/nonexistent.txt @@ -0,0 +1 @@ +../pdb/gone.pdb \ No newline at end of file