Skip to content

Commit d618b92

Browse files
committed
validate-schema: add progress bar
1 parent e9452e5 commit d618b92

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

tests/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
jsonschema==3.2.0
2+
progressbar2==4.4.2

tests/validate_schema.py

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

55
import json
66
import os
7+
import progressbar
78

89
from jsonschema import validate
910

@@ -14,9 +15,10 @@
1415
games_list = os.listdir(path)
1516
n = 0
1617

17-
for game in games_list:
18+
19+
for game in progressbar.progressbar(games_list, redirect_stdout=True):
1820
n += 1
19-
print(f"{n}/{len(games_list)} - Validating {game}..")
21+
print(f"Validating {game}..")
2022
with open(f"../entries/{game}/game.json") as f:
2123
game = json.load(f)
2224
validate(game, schema)

0 commit comments

Comments
 (0)