Skip to content

Commit

Permalink
Python3.8 (ydataai#356)
Browse files Browse the repository at this point in the history
* Add Python 3.8 to Travis
* Change Pyarrow to Fastparquest backend for tests.
* Update unit test with fastparquet

Co-authored-by: Gábor Lipták
  • Loading branch information
sbrugman authored Feb 2, 2020
1 parent 2144c4d commit 036aa91
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
sudo: required
dist: bionic
language: python
cache:
Expand All @@ -9,6 +10,7 @@ python:
- "3.5"
- "3.6"
- "3.7"
- "3.8"

env:
- TEST=unit
Expand Down
2 changes: 1 addition & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ codecov
pytest-cov
pytest-black
nbval
pyarrow
fastparquet==0.3.2
flake8
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
# Could be optional
"missingno==0.4.2",
"phik==0.9.8",
"astropy>=3.2.3", # preferred 4.0
"astropy>=3.2.3", # preferred 4.0
],
extras_require={
"notebook": ["jupyter-client==5.3.4", "jupyter-core==4.6.1", "ipywidgets"],
Expand Down
2 changes: 1 addition & 1 deletion tests/issues/test_issue147.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def test_issue147(get_data_file):
"https://github.com/Teradata/kylo/raw/master/samples/sample-data/parquet/userdata2.parquet",
)

df = pd.read_parquet(str(file_name), engine="pyarrow")
df = pd.read_parquet(str(file_name), engine="fastparquet")
report = ProfileReport(df, title="PyArrow with Pandas Parquet Backend")
html = report.to_html()
assert type(html) == str
Expand Down
7 changes: 6 additions & 1 deletion tests/unit/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ def test_read_pandas_parquet():
with pytest.raises(OSError) as e:
read_pandas(p)

assert str(e.value) == "Passed non-file path: dataframe.parquet"
assert str(e.value) in [
# pyarrow
"Passed non-file path: dataframe.parquet",
# fastparquet
"[Errno 2] No such file or directory: 'dataframe.parquet'",
]


def test_read_pandas_csv():
Expand Down

0 comments on commit 036aa91

Please sign in to comment.