Skip to content

Commit

Permalink
Merge pull request #52 from QuantGov/s3driver_hotfix
Browse files Browse the repository at this point in the history
S3driver hotfix
  • Loading branch information
OliverSherouse authored Jun 28, 2018
2 parents 94103ff + bbf95c9 commit 471d183
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion quantgov/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

from .utils import load_driver

__version__ = '0.4.1'
__version__ = '0.4.2'
7 changes: 7 additions & 0 deletions quantgov/corpus/structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,13 @@ def __init__(self, index, bucket, encoding='utf-8', cache=True):
super(IndexDriver, self).__init__(
index_labels=index_labels, encoding=encoding, cache=cache)

def gen_indices_and_paths(self):
with self.index.open(encoding=self.encoding) as inf:
reader = csv.reader(inf)
next(reader)
for row in reader:
yield tuple(row[:-1]), row[-1]

def read(self, docinfo):
idx, path = docinfo
body = self.client.get_object(Bucket=self.bucket,
Expand Down

0 comments on commit 471d183

Please sign in to comment.