Skip to content

Commit 9e128e3

Browse files
author
Calvin Wang
committed
Refactor testing modules + testing spark3 bump
1 parent 1689156 commit 9e128e3

File tree

9 files changed

+11
-25
lines changed

9 files changed

+11
-25
lines changed

pydeequ/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
from pydeequ.analyzers import AnalysisRunner
2020
from pydeequ.checks import Check, CheckLevel
2121

22-
deequ_maven_coord = "com.amazon.deequ:deequ:1.0.3"
22+
# deequ_maven_coord = "com.amazon.deequ:deequ:1.1.0_spark-2.4-scala-2.11"
23+
deequ_maven_coord = "com.amazon.deequ:deequ:1.1.0_spark-3.0-scala-2.12"
2324
f2j_maven_coord = "net.sourceforge.f2j:arpack_combined_all"
2425

2526
class PyDeequSession:

tests/test_analyzers.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import unittest
22
from pyspark.sql import SparkSession, Row, DataFrame
33
from pydeequ.analyzers import *
4-
from pydeequ import PyDeequSession
4+
from pydeequ import *
55

66
class TestAnalyzers(unittest.TestCase):
77

88
@classmethod
99
def setUpClass(cls):
10-
deequ_maven_coord = "com.amazon.deequ:deequ:1.0.3" # TODO: get Maven Coord from Configs
11-
f2j_maven_coord = "net.sourceforge.f2j:arpack_combined_all" # This package is excluded because it causes an error in the SparkSession fig
1210
cls.spark = (SparkSession
1311
.builder
1412
.master('local[*]')

tests/test_anomaly_detection.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44
from pydeequ.anomaly_detection import *
55
from pydeequ.repository import *
66
from pydeequ.analyzers import *
7+
from pydeequ import *
78

89
class TestAnomalies(unittest.TestCase):
910
@classmethod
1011
def setUpClass(cls):
11-
deequ_maven_coord = "com.amazon.deequ:deequ:1.0.3"
12-
f2j_maven_coord = "net.sourceforge.f2j:arpack_combined_all" # This package is excluded because it causes an error in the SparkSession fig
1312
cls.spark = (SparkSession
1413
.builder
1514
.master('local[*]')

tests/test_checks.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22
from pyspark.sql import SparkSession, Row, DataFrame
33
from pydeequ.verification import *
44
from pydeequ.checks import *
5-
import py4j
5+
from pydeequ import *
66

77
class TestChecks(unittest.TestCase):
88
@classmethod
99
def setUpClass(cls):
10-
# TODO share spark context between test cases?
11-
deequ_maven_coord = "com.amazon.deequ:deequ:1.0.3" # TODO get Maven Coord from Configs
12-
f2j_maven_coord = "net.sourceforge.f2j:arpack_combined_all" # This package is excluded because it causes an error in the SparkSession fig
1310
cls.spark = (SparkSession
1411
.builder
1512
.master('local[*]')

tests/test_pandas_utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,14 @@
66
from pydeequ.profiles import ColumnProfilerRunBuilder, ColumnProfilerRunner
77
from pydeequ.verification import *
88
from pydeequ.checks import *
9-
from pydeequ import PyDeequSession
9+
from pydeequ import *
1010
from pandas import DataFrame as pandasDF
1111
import numpy as np
1212

1313
class TestPandasUtils(unittest.TestCase):
1414

1515
@classmethod
1616
def setUpClass(cls):
17-
deequ_maven_coord = "com.amazon.deequ:deequ:1.0.3" # TODO: get Maven Coord from Configs
18-
f2j_maven_coord = "net.sourceforge.f2j:arpack_combined_all" # This package is excluded because it causes an error in the SparkSession fig
1917
cls.spark = (SparkSession
2018
.builder
2119
.master('local[*]')

tests/test_profiles.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
from pydeequ.profiles import ColumnProfilerRunBuilder, ColumnProfilerRunner
33
from pydeequ.analyzers import KLLParameters
44
from pyspark.sql import SparkSession, Row
5-
5+
from pydeequ import *
66

77
class TestProfiles(unittest.TestCase):
88
@classmethod
99
def setUpClass(cls):
10-
deequ_maven_coord = "com.amazon.deequ:deequ:1.0.3"
11-
f2j_maven_coord = "net.sourceforge.f2j:arpack_combined_all" # This package is excluded because it causes an error in the SparkSession fig
1210
cls.spark = (SparkSession
1311
.builder
1412
.master('local[*]')

tests/test_repository.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44
from pydeequ.repository import *
55
from pydeequ.verification import *
66
from pydeequ.checks import *
7+
from pydeequ import *
78

89

910
class TestRepository(unittest.TestCase):
1011
@classmethod
1112
def setUpClass(cls):
12-
deequ_maven_coord = "com.amazon.deequ:deequ:1.0.3"
13-
f2j_maven_coord = "net.sourceforge.f2j:arpack_combined_all" # This package is excluded because it causes an error in the SparkSession fig
1413
cls.spark = (SparkSession
1514
.builder
1615
.master('local[*]')

tests/test_scala_utils.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import unittest
22
from pydeequ.scala_utils import ScalaFunction1, ScalaFunction2
33
from pyspark.sql import SparkSession
4-
4+
from pydeequ import *
55

66
class TestScalaUtils(unittest.TestCase):
77
@classmethod
88
def setUpClass(cls):
9-
# TODO share spark context between test cases?
10-
deequ_maven_coord = "com.amazon.deequ:deequ:1.0.3-rc2" # TODO get Maven Coord from Configs
11-
f2j_maven_coord = "net.sourceforge.f2j:arpack_combined_all" # This package is excluded because it causes an error in the SparkSession fig
9+
# deequ_maven_coord = "com.amazon.deequ:deequ:1.0.3-rc2" # TODO This ran rc2?
1210
cls.spark = (SparkSession
1311
.builder
1412
.master('local[*]')

tests/test_suggestions.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
from pyspark.sql import SparkSession, Row, DataFrame
33
from pydeequ.suggestions import *
44
import json
5-
5+
from pydeequ import *
66

77
class TestSuggestions(unittest.TestCase):
88
@classmethod
99
def setUpClass(cls):
10-
deequ_maven_coord = "com.amazon.deequ:deequ:1.0.3"
11-
f2j_maven_coord = "net.sourceforge.f2j:arpack_combined_all" # This package is excluded because it causes an error in the SparkSession fig
1210
cls.spark = (SparkSession
1311
.builder
1412
.master('local[*]')

0 commit comments

Comments
 (0)