Skip to content

Commit

Permalink
bring old progress bar appearance back
Browse files Browse the repository at this point in the history
  • Loading branch information
kmike committed Nov 10, 2015
1 parent 3bec8f9 commit ef3831f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions formasaurus/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ def iter_annotations(self, drop_duplicates=True, verbose=False, leave=False):
)

if verbose:
sorted_items = tqdm(sorted_items, "Loading", mininterval=0, leave=leave)
sorted_items = tqdm(sorted_items, "Loading", mininterval=0,
leave=leave, ascii=True, ncols=80)

seen = set()
for filename, info in sorted_items:
Expand Down Expand Up @@ -139,7 +140,8 @@ def check(self):
index = self.get_index()
items = list(index.items())
errors = 0
for fn, info in tqdm(items, "Checking", leave=True, mininterval=0):
for fn, info in tqdm(items, "Checking", leave=True, mininterval=0,
ascii=True, ncols=80):
fn_full = os.path.join(self.folder, fn)
if not os.path.exists(fn_full):
print("\nFile not found: %r" % fn_full)
Expand All @@ -158,9 +160,9 @@ def check(self):
print(msg)

if not errors:
print(" OK")
print("Status: OK")
else:
print(" %d error(s) found" % errors)
print("Status: %d error(s) found" % errors)

return errors

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
lxml
docopt
tqdm
tqdm >= 2.0
tldextract

# 0.15 is need for make_pipeline and make_union functions;
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def get_version():
url='https://github.com/TeamHG-Memex/Formasaurus',
zip_safe=False,
packages=['formasaurus'],
install_requires=["tqdm", "tldextract", "docopt", "six"],
install_requires=["tqdm >= 2.0", "tldextract", "docopt", "six"],
package_data={
'formasaurus': ['data/index.json', 'data/html/*.html'],
},
Expand Down

0 comments on commit ef3831f

Please sign in to comment.