Commit b2851cad authored by nd-02110114's avatar nd-02110114
Browse files

🐛 fix flake8 error about data loader tests

parent ab911353
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
import os
from io import StringIO
import tempfile
import shutil
import deepchem as dc


+0 −22
Original line number Diff line number Diff line
@@ -3,7 +3,6 @@ Tests for FeaturizedSamples class
"""

import os
import unittest
import tempfile
import shutil
import deepchem as dc
@@ -22,13 +21,7 @@ def test_unlabelled():
def test_scaffold_test_train_valid_test_split():
  """Test of singletask RF ECFP regression API."""
  current_dir = os.path.dirname(os.path.abspath(__file__))
  splittype = "scaffold"
  input_transforms = []
  output_transforms = ["normalize"]
  model_params = {}
  tasks = ["log-solubility"]
  task_type = "regression"
  task_types = {task: task_type for task in tasks}
  input_file = os.path.join(current_dir, "../../models/tests/example.csv")
  featurizer = dc.feat.CircularFingerprint(size=1024)

@@ -50,13 +43,7 @@ def test_scaffold_test_train_valid_test_split():
def test_scaffold_test_train_test_split():
  """Test of singletask RF ECFP regression API."""
  current_dir = os.path.dirname(os.path.abspath(__file__))
  splittype = "scaffold"
  input_transforms = []
  output_transforms = ["normalize"]
  model_params = {}
  tasks = ["log-solubility"]
  task_type = "regression"
  task_types = {task: task_type for task in tasks}
  input_file = os.path.join(current_dir, "../../models/tests/example.csv")
  featurizer = dc.feat.CircularFingerprint(size=1024)

@@ -76,12 +63,7 @@ def test_scaffold_test_train_test_split():
def test_random_test_train_valid_test_split():
  """Test of singletask RF ECFP regression API."""
  current_dir = os.path.dirname(os.path.abspath(__file__))
  input_transforms = []
  output_transforms = ["normalize"]
  model_params = {}
  tasks = ["log-solubility"]
  task_type = "regression"
  task_types = {task: task_type for task in tasks}
  input_file = os.path.join(current_dir, "../../models/tests/example.csv")
  featurizer = dc.feat.CircularFingerprint(size=1024)

@@ -103,11 +85,7 @@ def test_random_test_train_valid_test_split():
def test_random_test_train_test_split():
  """Test of singletask RF ECFP regression API."""
  current_dir = os.path.dirname(os.path.abspath(__file__))
  #splittype = "random"
  model_params = {}
  tasks = ["log-solubility"]
  task_type = "regression"
  task_types = {task: task_type for task in tasks}
  input_file = os.path.join(current_dir, "../../models/tests/example.csv")
  featurizer = dc.feat.CircularFingerprint(size=1024)
  loader = dc.data.CSVLoader(
+0 −3
Original line number Diff line number Diff line
"""
Tests that FASTA files can be loaded.
"""
__author__ = "Bharath Ramsundar"
__license__ = "MIT"

import os
import unittest

+0 −1
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ class TestImageLoader(unittest.TestCase):
    Image.fromarray(self.face).save(self.face_copy_path)

    # Create zip of image file
    #self.zip_path = "/home/rbharath/misc/cells.zip"
    self.zip_path = os.path.join(self.data_dir, "face.zip")
    zipf = zipfile.ZipFile(self.zip_path, "w", zipfile.ZIP_DEFLATED)
    zipf.write(self.face_path)