use AtomicNumberPreprocessor in tests
import numpy
+import pandas
import pytest
-from chainer_chemistry.dataset.parsers.smiles_parser import SmilesParser # NOQA
-from chainer_chemistry.dataset.preprocessors import NFPPreprocessor
+from chainer_chemistry.dataset.parsers.data_frame_parser import DataFrameParser # NOQA
+# from chainer_chemistry.dataset.preprocessors import NFPPreprocessor
+from chainer_chemistry.dataset.preprocessors import AtomicNumberPreprocessor
from chainer_chemistry.dataset.splitters.scaffold_splitter import generate_scaffold # NOQA
from chainer_chemistry.dataset.splitters.scaffold_splitter import ScaffoldSplitter # NOQA
from chainer_chemistry.datasets.numpy_tuple_dataset import NumpyTupleDataset
@@ -27,9 +29,11 @@ def smiles_list():
@pytest.fixture
def dataset(smiles_list):
- pp = NFPPreprocessor()
- parser = SmilesParser(pp)
- dataset = parser.parse(smiles_list, return_smiles=True)
+ df = pandas.DataFrame(data={'smiles': smiles_list,
+ 'value': numpy.random.rand(10)})
+ pp = AtomicNumberPreprocessor()
+ parser = DataFrameParser(pp, labels='value')
+ dataset = parser.parse(df, return_smiles=True)
return dataset
