Skip to content

Commit 9ffaf74

Browse files
committed
Bumping version to 0.0b19
1 parent 9377338 commit 9ffaf74

File tree

12 files changed

+49
-30
lines changed

12 files changed

+49
-30
lines changed

awswrangler/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
__title__ = "awswrangler"
22
__description__ = "Utility belt to handle data on AWS."
3-
__version__ = "0.0b18"
3+
__version__ = "0.0b19"
44
__license__ = "Apache License 2.0"

awswrangler/pandas.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,22 @@ def _read_csv_iterator(
154154
logger.debug(f"total_size: {total_size}")
155155
if total_size <= 0:
156156
raise EmptyS3Object(metadata)
157+
elif total_size <= max_result_size:
158+
yield Pandas._read_csv_once(
159+
client_s3=client_s3,
160+
bucket_name=bucket_name,
161+
key_path=key_path,
162+
header=header,
163+
names=names,
164+
dtype=dtype,
165+
sep=sep,
166+
lineterminator=lineterminator,
167+
quotechar=quotechar,
168+
quoting=quoting,
169+
escapechar=escapechar,
170+
parse_dates=parse_dates,
171+
infer_datetime_format=infer_datetime_format,
172+
encoding=encoding)
157173
else:
158174
bounders = calculate_bounders(num_items=total_size,
159175
max_size=max_result_size)

awswrangler/session.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ class SessionPrimitives:
227227
It is required to "share" the session attributes to other processes.
228228
That must be "pickable"!
229229
"""
230-
231230
def __init__(
232231
self,
233232
profile_name=None,

building/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
FROM lambci/lambda:build-python3.6
1+
FROM lambci/lambda:build-python3.7
22

33
RUN pip install --upgrade pip
44

55
ADD requirements.txt /root/
6-
RUN pip install -r /root/requirements.txt
6+
RUN pip install --upgrade -r /root/requirements.txt
77
RUN rm -rf /root/requirements.txt
88
ADD requirements-dev.txt /root/
9-
RUN pip install -r /root/requirements-dev.txt
9+
RUN pip install --upgrade -r /root/requirements-dev.txt
1010
RUN rm -rf /root/requirements-dev.txt
1111

1212
ENTRYPOINT ["/bin/sh"]

building/build-image.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22

33
cp ../requirements.txt .
44
cp ../requirements-dev.txt .
5-
pip install -r requirements.txt
6-
pip install -r requirements-dev.txt
75
docker build -t awswrangler-building .

building/build-lambda-layer.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cd ~
66
# Clone desired Arrow version
77
rm -rf arrow dist pyarrow*
88
git clone \
9-
--branch apache-arrow-0.14.0 \
9+
--branch apache-arrow-0.14.1 \
1010
--single-branch \
1111
https://github.com/apache/arrow.git
1212

@@ -18,7 +18,7 @@ yum install -y \
1818
flex \
1919
autoconf \
2020
python36-devel
21-
pip install six numpy pandas cython pytest cmake wheel
21+
pip install --upgrade six numpy pandas cython pytest cmake wheel
2222

2323
# Build Arrow
2424
export ARROW_HOME=$(pwd)/dist
@@ -55,7 +55,7 @@ cp dist/pyarrow-*.whl ~
5555
popd
5656

5757
# Extracting files
58-
pip install pyarrow-*whl -t pyarrow_files
58+
pip install pyarrow-*whl -t pyarrow_files
5959

6060
# Go back to AWSWRANGLER directory
6161
cd /aws-data-wrangler/

install-dev.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22

33
pip install --upgrade pip
4-
pip install -r requirements.txt
5-
pip install -r requirements-dev.txt
4+
pip install --upgrade -r requirements.txt
5+
pip install --upgrade -r requirements-dev.txt
66
cd testing
77
./build-image.sh
88
cd ../building

requirements-dev.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
yapf>=0.27.0
2-
flake8>=3.7.7
3-
pytest>=4.3.1
4-
cfn-lint>=0.22.0
1+
yapf>=0.28.0
2+
flake8>=3.7.8
3+
pytest>=5.0.1
4+
cfn-lint>=0.22.4
55
twine>=1.13.0
66
pyspark>=2.4.3
77
wheel>=0.33.4

requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
boto3>=1.9.164
2-
s3fs>=0.2.2
3-
pandas>=0.24.2
4-
pyarrow>=0.14.0
1+
boto3>=1.9.196
2+
pandas>=0.25.0
3+
s3fs>=0.3.1
4+
pyarrow>=0.14.1
55
tenacity>=5.0.4
66
pg8000>=1.13.2

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
exclude=["tests"]),
2323
python_requires=">=3.6",
2424
install_requires=[
25-
"pyarrow>=0.14.0",
26-
"pandas>=0.24.2",
27-
"boto3>=1.9.130",
28-
"s3fs>=0.2.1",
25+
"pyarrow>=0.14.1",
26+
"pandas>=0.25.0",
27+
"boto3>=1.9.196",
28+
"s3fs>=0.3.1",
2929
"tenacity>=5.0.4",
3030
"pg8000>=1.13.2",
3131
],

testing/build-image.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22

33
cp ../requirements.txt .
44
cp ../requirements-dev.txt .
5-
pip install -r requirements.txt
6-
pip install -r requirements-dev.txt
75
docker build -t awswrangler-testing .

testing/test_awswrangler/test_pandas.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,15 @@ def test_to_s3(
183183
assert factor * len(dataframe.index) == len(dataframe2.index)
184184

185185

186-
@pytest.mark.parametrize("sample, row_num", [("data_samples/micro.csv", 30),
187-
("data_samples/small.csv", 100)])
188-
def test_read_sql_athena_iterator(session, bucket, database, sample, row_num):
186+
@pytest.mark.parametrize("sample, row_num, max_result_size",
187+
[("data_samples/micro.csv", 30, 100),
188+
("data_samples/small.csv", 100, 100),
189+
("data_samples/micro.csv", 30, 500),
190+
("data_samples/small.csv", 100, 500),
191+
("data_samples/micro.csv", 30, 3000),
192+
("data_samples/small.csv", 100, 3000)])
193+
def test_read_sql_athena_iterator(session, bucket, database, sample, row_num,
194+
max_result_size):
189195
dataframe_sample = pandas.read_csv(sample)
190196
path = f"s3://{bucket}/test/"
191197
session.pandas.to_parquet(dataframe=dataframe_sample,
@@ -196,7 +202,9 @@ def test_read_sql_athena_iterator(session, bucket, database, sample, row_num):
196202
total_count = 0
197203
for counter in range(10):
198204
dataframe_iter = session.pandas.read_sql_athena(
199-
sql="select * from test", database=database, max_result_size=200)
205+
sql="select * from test",
206+
database=database,
207+
max_result_size=max_result_size)
200208
total_count = 0
201209
for dataframe in dataframe_iter:
202210
total_count += len(dataframe.index)

0 commit comments

Comments
 (0)