Skip to content

Commit

Permalink
remove deprecated terminaltables dependency (#120)
Browse files Browse the repository at this point in the history
* remove depracated terminaltables dependency

* remove terminaltable reference
  • Loading branch information
leslievandemark authored Dec 18, 2024
1 parent b4c73f1 commit e5567d5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 3.1.3
* Remove deprecated terminaltables dependency [#120](https://github.com/singer-io/tap-mongodb/pull/120)

## 3.1.2
* Allows to specify string values as projection [#94](https://github.com/singer-io/tap-mongodb/pull/94)

Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from setuptools import setup

setup(name='tap-mongodb',
version='3.1.2',
version='3.1.3',
description='Singer.io tap for extracting data from MongoDB',
author='Stitch',
url='https://singer.io',
Expand All @@ -13,7 +13,6 @@
'singer-python==6.0.0',
'pymongo==4.4.0',
'tzlocal==2.0.0',
'terminaltables==3.1.0',
],
extras_require={
'dev': [
Expand Down
2 changes: 1 addition & 1 deletion tap_mongodb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def do_sync(client, catalog, state):
for stream in streams_to_sync:
sync_stream(client, stream, state)

LOGGER.info(common.get_sync_summary(catalog))
common.get_sync_summary(catalog)


def main_impl():
Expand Down
12 changes: 6 additions & 6 deletions tap_mongodb/sync_strategies/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import bson
import singer
from singer import utils, metadata
from terminaltables import AsciiTable
from bson import objectid, timestamp, encode, decode, datetime as bson_datetime
from bson.binary import Binary, UuidRepresentation
from bson.codec_options import CodecOptions, DatetimeConversion
Expand All @@ -23,6 +22,8 @@
SCHEMA_COUNT = {}
SCHEMA_TIMES = {}

LOGGER = singer.get_logger()

class InvalidProjectionException(Exception):
"""Raised if projection blacklists _id"""

Expand Down Expand Up @@ -348,8 +349,7 @@ def get_sync_summary(catalog):
'{:.2f}%'.format(100*schema_duration/stream_time)
]
rows.append(row)

data = headers + rows
table = AsciiTable(data, title='Sync Summary')

return '\n\n' + table.table
LOGGER.info("\n**** Sync Summary:")
LOGGER.info(next(iter(headers), None))
for row in rows:
LOGGER.info(row)

0 comments on commit e5567d5

Please sign in to comment.