Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianhao-Gu committed Jun 6, 2024
1 parent 62526df commit d12f80a
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Run tests
shell: bash
run: PYTHONPATH=. pytest --cov=src --cov-report=xml test
run: PYTHONPATH=src pytest --cov=src --cov-report=xml test

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down
117 changes: 117 additions & 0 deletions coverage.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<?xml version="1.0" ?>
<coverage version="7.5.1" timestamp="1717704152939" lines-valid="80" lines-covered="42" line-rate="0.525" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0">
<!-- Generated by coverage.py: https://coverage.readthedocs.io/en/7.5.1 -->
<!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd -->
<sources>
<source>/Users/tgu/Development/kb_apps/cdm-jupyterhub/src</source>
</sources>
<packages>
<package name="db_ops" line-rate="0.2353" branch-rate="0" complexity="0">
<classes>
<class name="spark_db_utils.py" filename="db_ops/spark_db_utils.py" complexity="0" line-rate="0.2353" branch-rate="0">
<methods/>
<lines>
<line number="6" hits="1"/>
<line number="9" hits="1"/>
<line number="22" hits="0"/>
<line number="23" hits="0"/>
<line number="26" hits="1"/>
<line number="41" hits="0"/>
<line number="43" hits="0"/>
<line number="44" hits="0"/>
<line number="45" hits="0"/>
<line number="46" hits="0"/>
<line number="47" hits="0"/>
<line number="48" hits="0"/>
<line number="49" hits="0"/>
<line number="52" hits="1"/>
<line number="67" hits="0"/>
<line number="69" hits="0"/>
<line number="70" hits="0"/>
</lines>
</class>
</classes>
</package>
<package name="minio_utils" line-rate="0.75" branch-rate="0" complexity="0">
<classes>
<class name="minio_utils.py" filename="minio_utils/minio_utils.py" complexity="0" line-rate="0.75" branch-rate="0">
<methods/>
<lines>
<line number="5" hits="1"/>
<line number="7" hits="1"/>
<line number="10" hits="1"/>
<line number="16" hits="0"/>
</lines>
</class>
</classes>
</package>
<package name="spark" line-rate="0.5932" branch-rate="0" complexity="0">
<classes>
<class name="utils.py" filename="spark/utils.py" complexity="0" line-rate="0.5932" branch-rate="0">
<methods/>
<lines>
<line number="1" hits="1"/>
<line number="2" hits="1"/>
<line number="3" hits="1"/>
<line number="4" hits="1"/>
<line number="6" hits="1"/>
<line number="7" hits="1"/>
<line number="8" hits="1"/>
<line number="10" hits="1"/>
<line number="13" hits="1"/>
<line number="14" hits="1"/>
<line number="15" hits="1"/>
<line number="16" hits="1"/>
<line number="19" hits="1"/>
<line number="22" hits="1"/>
<line number="30" hits="1"/>
<line number="32" hits="1"/>
<line number="33" hits="1"/>
<line number="34" hits="1"/>
<line number="36" hits="1"/>
<line number="39" hits="1"/>
<line number="51" hits="0"/>
<line number="65" hits="1"/>
<line number="66" hits="0"/>
<line number="67" hits="0"/>
<line number="70" hits="1"/>
<line number="82" hits="1"/>
<line number="89" hits="1"/>
<line number="106" hits="1"/>
<line number="107" hits="0"/>
<line number="109" hits="1"/>
<line number="110" hits="1"/>
<line number="112" hits="1"/>
<line number="114" hits="1"/>
<line number="117" hits="0"/>
<line number="119" hits="0"/>
<line number="120" hits="0"/>
<line number="121" hits="0"/>
<line number="122" hits="0"/>
<line number="124" hits="1"/>
<line number="125" hits="1"/>
<line number="126" hits="1"/>
<line number="128" hits="1"/>
<line number="131" hits="1"/>
<line number="140" hits="0"/>
<line number="141" hits="0"/>
<line number="142" hits="0"/>
<line number="143" hits="0"/>
<line number="144" hits="0"/>
<line number="145" hits="0"/>
<line number="148" hits="1"/>
<line number="167" hits="0"/>
<line number="168" hits="0"/>
<line number="169" hits="0"/>
<line number="170" hits="0"/>
<line number="171" hits="0"/>
<line number="172" hits="0"/>
<line number="173" hits="0"/>
<line number="175" hits="0"/>
<line number="177" hits="0"/>
</lines>
</class>
</classes>
</package>
</packages>
</coverage>
2 changes: 1 addition & 1 deletion test/src/db_ops/spark_db_utils_test.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from src.db_ops.spark_db_utils import *
from db_ops.spark_db_utils import *
2 changes: 1 addition & 1 deletion test/src/minio_utils/minio_utils_test.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from src.minio_utils.minio_utils import *
from minio_utils.minio_utils import *
2 changes: 1 addition & 1 deletion test/src/spark/utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pyspark import SparkConf
from pyspark.sql import SparkSession

from src.spark.utils import get_spark_session, _get_jars, _get_base_spark_conf, JAR_DIR
from spark.utils import get_spark_session, _get_jars, _get_base_spark_conf, JAR_DIR


@pytest.fixture(scope="session")
Expand Down

0 comments on commit d12f80a

Please sign in to comment.