Change card db handling (#286)

* reorganize card db, add doit file
* make card_db_src a true source by removing untranslated entries, removing the untranslated field
* turn update language script into a better compiler
* move tools into submodule
* remove language db comparison test; add travis compile and check-in of card db
Co-authored-by: Nick Vance <nickv2002@users.noreply.github.com>
This commit is contained in:
Peter authored and GitHub committed 2020-01-04 15:26:51 -08:00
1 parent 6fd593f1b6
commit 69c0a66868
57 files changed
+25019 -4677

No files matched your search

+3 -17
View File
@@ -1,5 +1,4 @@
from __future__ import print_function
import subprocess
import shutil
import os
import contextlib
@@ -23,12 +22,12 @@ def rmtestcardb(request):
def test_cardread():
cardsExpected = 576
num_cards_expected = 576
options = main.parse_opts([])
options.data_path = "."
cards = main.read_card_data(options)
assert len(cards) == cardsExpected
assert len(cards) == num_cards_expected
valid_cardsets = {
u"base",
u"dominion1stEdition",
@@ -73,7 +72,7 @@ def test_cardread():
# Curse: +2 * 4 sets = +8
# Start Decks: +4 * 4 sets = +16
# Blanks: +7 = +7
assert len(cards) == cardsExpected + 28
assert len(cards) == num_cards_expected + 28
def test_languages():
@@ -103,19 +102,6 @@ def change_cwd(d):
os.chdir(curdir)
def test_languagetool_run(pytestconfig):
with change_cwd(str(pytestconfig.rootdir)):
cmd = "python tools/update_language.py"
print(cmd)
assert subprocess.check_call(cmd.split()) == 0
cmd = "diff -rwB src/domdiv/card_db tools/card_db"
try:
out = subprocess.check_output(cmd.split(), stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
assert e.output == ""
assert out.decode("utf-8") == ""
def test_only_type():
options = main.parse_opts(
[