Skip to content

Commit

Permalink
Remove auto-checking of file existence in file list.
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael Townshend committed Feb 4, 2021
1 parent e486b2d commit 1767b38
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 0 additions & 2 deletions atom3d/datasets/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 6 additions & 0 deletions tests/datasets/test_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/test_data/list/nonexistent.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../pdb/gone.pdb

0 comments on commit 1767b38

Please sign in to comment.